<<< Date Index >>>     <<< Thread Index >>>

mutt/2109: Add %h{Header}



>Number:         2109
>Notify-List:    bayartb@xxxxxxxxxxxxx
>Category:       mutt
>Synopsis:       Add %h{Header}
>Confidential:   no
>Severity:       normal
>Priority:       medium
>Responsible:    mutt-dev
>State:          open
>Keywords:       
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 10 13:31:22 +0200 2005
>Originator:     Benjamin Bayart
>Release:        
>Organization:
>Environment:
All
>Description:
The attached patch create a %h{Header} that can be used like that:
save-hook '~h "X-Stuff: ([0-9]+)"' ~/Mail/Thing-%h{X-Stuff}
Quite usefull :-)

The patch works against 1.5.11 (the one in Debian/Unstable), and used to work 
against 1.5.10 (same, from Debian). The only difference being 
1.5.10-"read_rfc822_line" have been renamed to 1.5.11-"mutt_read_rfc822_line".

Any comments are of course welcome!
>How-To-Repeat:
>Fix:
Unknown
>Add-To-Audit-Trail:

>Unformatted:
 ----gnatsweb-attachment----
 Content-Type: application/octet-stream; name="patch.zzz.benj"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment; filename="patch.zzz.benj"
 
 ZGlmZiAtcnVOIG11dHQtMS41LjEwLW9sZC9oZHJsaW5lLmMgbXV0dC0xLjUuMTAvaGRybGluZS5j
 Ci0tLSBtdXR0LTEuNS4xMC1vbGQvaGRybGluZS5jCTIwMDUtMDItMTIgMTk6NTM6MzUuMDAwMDAw
 MDAwICswMTAwCisrKyBtdXR0LTEuNS4xMC9oZHJsaW5lLmMJMjAwNS0wOC0yNiAxODoxMzoxMi4w
 MDAwMDAwMDAgKzAyMDAKQEAgLTI2LDYgKzI2LDcgQEAKICNpbmNsdWRlICJjaGFyc2V0LmgiCiAj
 aW5jbHVkZSAibXV0dF9jcnlwdC5oIgogI2luY2x1ZGUgIm11dHRfaWRuYS5oIgorI2luY2x1ZGUg
 Im1haWxib3guaCIKIAogI2luY2x1ZGUgPGN0eXBlLmg+CiAjaW5jbHVkZSA8c3RkbGliLmg+CkBA
 IC00NDIsNiArNDQzLDU2IEBACiAgICAgICAgIG9wdGlvbmFsID0gMDsKICAgICAgIGJyZWFrOwog
 CisgICAgY2FzZSAnaCc6CisgICAgeworICAgICAgY2hhciB0bXBbMTAyNF07CisgICAgICBpbnQg
 bGVuID0gMDsKKyAgICAgIGNoYXIgKnZhbCA9IE5VTEw7CisgICAgICBpbnQgbXNnbm87CisgICAg
 ICBNRVNTQUdFICptc2cgPSBOVUxMOworICAgICAgRklMRSAqZnA7CisgICAgICBjaGFyICpidWZm
 ZXI7CisgICAgICBpbnQgYmxlbjsKKworICAgICAgaWYgKCAqc3JjICE9ICd7JyApCisgICAgICAg
 IGJyZWFrOworICAgICAgICAgICAKKyAgICAgIHNyYysrOworICAgICAgd2hpbGUgKCAqc3JjICYm
 ICpzcmMgIT0gJ30nICkKKyAgICAgICAgdG1wW2xlbisrXSA9ICpzcmMrKzsKKyAgICAgIGlmICgg
 ISpzcmMgKQorICAgICAgICBicmVhazsKKworICAgICAgc3JjKys7IC8qIFNraXAgdGhlIGNsb3Np
 bmcgYnJhY2UgKi8KKyAgICAgIHRtcFtsZW4rK10gPSAnOic7CisgICAgICB0bXBbbGVuXSA9IDA7
 CisKKyAgICAgIG1zZ25vID0gaGRyLT5tc2dubzsKKyAgICAgIG1zZyA9IG14X29wZW5fbWVzc2Fn
 ZShjdHgsIG1zZ25vKTsKKyAgICAgIGZwID0gbXNnLT5mcDsKKyAgICAgIGZzZWVrIChmcCwgaGRy
 LT5vZmZzZXQsIDApOworCisgICAgICBibGVuID0gMTAyNDsKKyAgICAgIGJ1ZmZlciA9IG1hbGxv
 YyhibGVuKTsKKworICAgICAgRk9SRVZFUiB7CisgICAgICAgIGJ1ZmZlciA9IG11dHRfcmVhZF9y
 ZmM4MjJfbGluZShmcCxidWZmZXIsJmJsZW4pOworICAgICAgICBpZiAoICEqYnVmZmVyKQorICAg
 ICAgICAgIGJyZWFrOworICAgICAgICBidWZmZXJbbGVuXSA9IDA7CisgICAgICAgIGlmICggISBh
 c2NpaV9zdHJjYXNlY21wKHRtcCxidWZmZXIpICkgeworICAgICAgICAgIHZhbCA9IGJ1ZmZlcits
 ZW4rMTsKKyAgICAgICAgICB3aGlsZSAoICp2YWwgJiYgSVNTUEFDRSgqdmFsKSApCisgICAgICAg
 ICAgICB2YWwrKzsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgfQorICAgICAg
 bXV0dF9mb3JtYXRfcyAoZGVzdCwgZGVzdGxlbiwgcHJlZml4LCBOT05VTEwodmFsKSk7CisgICAg
 ICBmcmVlKGJ1ZmZlcik7CisgICAgICBteF9jbG9zZV9tZXNzYWdlKCZtc2cpOworICAgIH0KKyAg
 ICBicmVhazsKKyAKICAgICBjYXNlICdIJzoKICAgICAgIC8qIChIb3JtZWwpIHNwYW0gc2NvcmUg
 Ki8KICAgICAgIGlmIChvcHRpb25hbCkK