this still likely is incomplete. Please report missing items to
<mutt-ng-devel@lists.berlios.de>
+2005-03-14
+
+ New Configuration Variables:
+ - $strip_was
+ - $strip_was_regex
+
2005-03-10
New Configuration Command (based on CD's ifdef Patch):
** personal mailbox where you might have several unrelated messages with
** the subject ``hi'' which will get grouped together.
*/
+ { "strip_was", DT_BOOL, R_NONE, OPTSTRIPWAS, 0 },
+ /**
+ ** .pp
+ ** When \fIset\fP, mutt-ng will remove the trailing part of the ``Subject''
+ ** line which matches $$strip_was_regex when replying.
+ **/
+ { "strip_was_regex", DT_RX, R_NONE, UL &StripWasRegexp, UL "\\([Ww][Aa][RrSs]: .*\\)[ ]*$" },
+ /**
+ ** .pp
+ ** When non-empty and $$strip_was is \fIset\fP, mutt-ng will remove this
+ ** trailing part of the ``Subject'' line when replying if it won't be empty
+ ** afterwards.
+ **/
{ "stuff_quoted", DT_BOOL, R_BOTH, OPTSTUFFQUOTED, 0 },
/*
** .pp
OPTSTATUSONTOP,
OPTSTRICTMIME,
OPTSTRICTTHREADS,
+ OPTSTRIPWAS,
OPTSTUFFQUOTED,
OPTSUSPEND,
OPTTEXTFLOWED,
WHERE REGEXP ReplyRegexp;
WHERE REGEXP Smileys;
WHERE REGEXP GecosMask;
+WHERE REGEXP StripWasRegexp;
#endif /* MUTT_REGEX_H */
{
char buf[HUGE_STRING];
LIST *uh = UserHeader;
+ regmatch_t pat_match[1];
#ifdef USE_NNTP
if (option (OPTNEWSSEND))
}
}
}
-
+
+ if ((flags & (SENDREPLY)) && option (OPTSTRIPWAS) && StripWasRegexp.rx &&
+ regexec (StripWasRegexp.rx, buf, 1, pat_match, 0) == 0) {
+ unsigned int pos = pat_match->rm_so;
+ if (ascii_strncasecmp (buf, "re: ", pos) != 0) {
+ buf[pos] = '\0'; /* kill match */
+ while (pos-- && buf[pos] == ' ')
+ buf[pos] = '\0'; /* remove trailing spaces */
+ } else {
+ mutt_error (_("Ignoring $strip_was: Subject would be empty."));
+ sleep (2);
+ }
+ }
if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) != 0 ||
(!buf[0] && query_quadoption (OPT_SUBJECT, _("No subject, abort?")) != M_NO))
{