From: Kevin McCarthy Date: Tue, 8 Mar 2016 23:57:50 +0000 (-0800) Subject: Add $resume_draft_files option. X-Git-Tag: neomutt-20160404~64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f36e582491b966bb1d4977663cf54561d68ac3f9;p=neomutt Add $resume_draft_files option. When set, draft files are processed the same as when resuming postponed messages. One use of this option is to avoid multiple user-defined headers and signatures being added to the message. (e.g. when -E is used repeatedly on the draft files). --- diff --git a/init.h b/init.h index e00308dce..f610fffa6 100644 --- a/init.h +++ b/init.h @@ -2461,6 +2461,15 @@ struct option_t MuttVars[] = { ** (possibly undeleted) message whenever a command that modifies the ** current message is executed. */ + { "resume_draft_files", DT_BOOL, R_NONE, OPTRESUMEDRAFTFILES, 0 }, + /* + ** .pp + ** If \fIset\fP, draft files (specified by \fC-H\fP on the command + ** line) are processed similarly to when resuming a postponed + ** message. Recipients are not prompted for; send-hooks are not + ** evaluated; no alias expansion takes place; user-defined headers + ** and signatures are not added to the message. + */ { "reverse_alias", DT_BOOL, R_BOTH, OPTREVALIAS, 0 }, /* ** .pp diff --git a/mutt.h b/mutt.h index 113133299..a290fa64e 100644 --- a/mutt.h +++ b/mutt.h @@ -418,6 +418,7 @@ enum OPTREFLOWTEXT, OPTREPLYSELF, OPTRESOLVE, + OPTRESUMEDRAFTFILES, OPTREVALIAS, OPTREVNAME, OPTREVREAL, diff --git a/send.c b/send.c index b986578a7..d4ac0377c 100644 --- a/send.c +++ b/send.c @@ -1287,7 +1287,8 @@ ci_send_message (int flags, /* send mode */ msg->env->from = set_reverse_name (cur->env); } - if (! (flags & (SENDPOSTPONED|SENDRESEND))) + if (! (flags & (SENDPOSTPONED|SENDRESEND)) && + ! ((flags & SENDDRAFTFILE) && option (OPTRESUMEDRAFTFILES))) { if ((flags & (SENDREPLY | SENDFORWARD)) && ctx && envelope_defaults (msg->env, ctx, cur, flags) == -1)