From 3e2dd76144d4fc83f1a95b597a3760f3488badc6 Mon Sep 17 00:00:00 2001 From: Martin Michlmayr Date: Sun, 22 Dec 2002 11:17:24 +0000 Subject: [PATCH] Add %A to the format strings, which expands to the reply-to address (if present) or to the author's address when there's no Reply-To header. --- hdrline.c | 9 +++++++++ init.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hdrline.c b/hdrline.c index 33c8108a..5634a6b5 100644 --- a/hdrline.c +++ b/hdrline.c @@ -205,6 +205,7 @@ int mutt_user_is_recipient (HEADER *h) } /* %a = address of author + * %A = reply-to address (if present; otherwise: address of author * %b = filename of the originating folder * %B = the list to which the letter was sent * %c = size of message in bytes @@ -267,6 +268,14 @@ hdr_format_str (char *dest, dest[0] = 0; switch (op) { + case 'A': + if(hdr->env->reply_to && hdr->env->reply_to->mailbox) + { + mutt_format_s (dest, destlen, prefix, hdr->env->reply_to->mailbox); + break; + } + /* fall through if 'A' returns nothing */ + case 'a': if(hdr->env->from && hdr->env->from->mailbox) { diff --git a/init.h b/init.h index 41eb2cf0..2de7883e 100644 --- a/init.h +++ b/init.h @@ -875,6 +875,7 @@ struct option_t MuttVars[] = { ** .pp ** .dl ** .dt %a .dd address of the author + ** .dt %A .dd reply-to address (if present; otherwise: address of author) ** .dt %b .dd filename of the original message folder (think mailBox) ** .dt %B .dd the list to which the letter was sent, or else the folder name (%b). ** .dt %c .dd number of characters (bytes) in the message -- 2.40.0