There isn't a way to reply to a message without pulling in message
headers as part of the body. This diff introduces a new tilde escape
to ignore all the message headers regardless of ignore, retain
commands.

Comments?

Index: collect.c
===================================================================
RCS file: /cvs/src/usr.bin/mail/collect.c,v
retrieving revision 1.33
diff -u -p -r1.33 collect.c
--- collect.c   6 Apr 2011 11:36:26 -0000       1.33
+++ collect.c   7 Jan 2014 13:55:28 -0000
@@ -303,6 +303,7 @@ cont:
                case 'M':
                case 'f':
                case 'F':
+               case 'i':
                        /*
                         * Interpolate the named messages, if we
                         * are in receiving mail mode.  Does the
@@ -529,7 +530,12 @@ forward(char *ms, FILE *fp, char *fn, in
                tabst = NULL;
        else if ((tabst = value("indentprefix")) == NULL)
                tabst = "\t";
-       ig = isupper(f) ? NULL : ignore;
+       if (isupper(f))
+               ig = NULL;
+       else if (f == 'i')
+               ig = ignoreall;
+       else
+               ig = ignore;
        fputs("Interpolating:", stdout);
        for (; *msgvec != 0; msgvec++) {
                struct message *mp = message + *msgvec - 1;
Index: mail.1
===================================================================
RCS file: /cvs/src/usr.bin/mail/mail.1,v
retrieving revision 1.61
diff -u -p -r1.61 mail.1
--- mail.1      18 Jul 2013 07:11:00 -0000      1.61
+++ mail.1      7 Jan 2014 13:55:29 -0000
@@ -768,6 +768,11 @@ Edit the message header fields by typing
 the user to append text to the end or modify the field by using the
 current terminal erase and kill characters.
 .Pp
+.It Ic ~i Ns Ar messages
+Identical to
+.Ic ~m ,
+except all message headers are excluded.
+.Pp
 .It Ic ~M Ns Ar messages
 Identical to
 .Ic ~m ,

Reply via email to