Of course, the following simple patch is not intended for inclusion
in the tree (i rather sent this upstream), but since mutt is probably
used by several people round here, i thought i might share just in
case anybody finds this useful...

With this patch, if you set askreply, mutt-1.5.16 will ask you for
a Reply-To: header, just like it is asking for To:, Subject:, and
optionally Cc: and Bcc:.  Otherwise, i would often forget setting
the Reply-To: properly.  In case i do not want to set the header -
like in this mail - hitting "enter" once is not that much work.
OK, it's a matter of taste, so by default, askreply is still off.

This patch is also available here:
  http://www.studis.de/Software/mutt-1.5.16p0u0.patch

Or without OpenBSD ports markup:
  http://www.studis.de/Software/mutt-1.5.16-noport-u0.patch

Enjoy,
  Ingo


Index: snapshot/Makefile
===================================================================
RCS file: /cvs/ports/mail/mutt/snapshot/Makefile,v
retrieving revision 1.44
diff -u -r1.44 Makefile
--- snapshot/Makefile   16 Sep 2007 00:17:05 -0000      1.44
+++ snapshot/Makefile   25 Sep 2007 00:44:39 -0000
@@ -4,7 +4,7 @@
 
 VERSION=       1.5.16
 DISTNAME=      mutt-${VERSION}
-PKGNAME=       ${DISTNAME}p0
+PKGNAME=       ${DISTNAME}p0u0
 MASTER_SITES=  ${MASTER_SITES_MUTT:=devel/}
 
 FLAVORS=       idn sasl sidebar
Index: snapshot/patches/patch-edit_c
===================================================================
RCS file: snapshot/patches/patch-edit_c
diff -N snapshot/patches/patch-edit_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ snapshot/patches/patch-edit_c       25 Sep 2007 00:44:39 -0000
@@ -0,0 +1,31 @@
+$OpenBSD$
+--- edit.c.orig        Sun Apr  1 23:58:55 2007
++++ edit.c     Tue Sep 25 02:13:26 2007
+@@ -311,6 +311,27 @@ static void be_edit_header (ENVELOPE *e, int force)
+       mutt_addrlist_to_idna (e->bcc, NULL);
+     addch ('\n');
+   }
++
++  if (option (OPTASKREPLY) || force)
++  {
++    addstr ("Reply-To: ");
++    tmp[0] = 0;
++    mutt_addrlist_to_local (e->reply_to);
++    rfc822_write_address (tmp, sizeof (tmp), e->reply_to, 0);
++    if (mutt_enter_string (tmp, sizeof (tmp), LINES-1, 10, 0) == 0)
++    {
++      rfc822_free_address (&e->reply_to);
++      e->reply_to = mutt_parse_adrlist (e->reply_to, tmp);
++      e->reply_to = mutt_expand_aliases (e->reply_to);
++      mutt_addrlist_to_idna (e->reply_to, NULL);
++      tmp[0] = 0;
++      rfc822_write_address (tmp, sizeof (tmp), e->reply_to, 1);
++      mvaddstr (LINES - 1, 10, tmp);
++    }
++    else
++      mutt_addrlist_to_idna (e->reply_to, NULL);
++    addch ('\n');
++  }
+ }
+ 
+ int mutt_builtin_editor (const char *path, HEADER *msg, HEADER *cur)
Index: snapshot/patches/patch-init_h
===================================================================
RCS file: snapshot/patches/patch-init_h
diff -N snapshot/patches/patch-init_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ snapshot/patches/patch-init_h       25 Sep 2007 00:44:39 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- init.h.orig        Sun Jun 10 04:29:21 2007
++++ init.h     Tue Sep 25 02:02:39 2007
+@@ -169,6 +169,12 @@ struct option_t MuttVars[] = {
+   ** If set, Mutt will prompt you for carbon-copy (Cc) recipients before
+   ** editing the body of an outgoing message.
+   */  
++  { "askreply",               DT_BOOL, R_NONE, OPTASKREPLY, 0 },
++  /*
++  ** .pp
++  ** If set, Mutt will prompt you for a reply-to address before editing
++  ** the body of an outgoing message.
++  */
+   { "assumed_charset", DT_STR, R_NONE, UL &AssumedCharset, UL 0},
+   /*
+   ** .pp
Index: snapshot/patches/patch-mutt_h
===================================================================
RCS file: snapshot/patches/patch-mutt_h
diff -N snapshot/patches/patch-mutt_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ snapshot/patches/patch-mutt_h       25 Sep 2007 00:44:39 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- mutt.h.orig        Wed Apr 11 05:14:01 2007
++++ mutt.h     Tue Sep 25 02:04:23 2007
+@@ -332,6 +332,7 @@ enum
+   OPTASCIICHARS,
+   OPTASKBCC,
+   OPTASKCC,
++  OPTASKREPLY,
+   OPTATTACHSPLIT,
+   OPTAUTOEDIT,
+   OPTAUTOTAG,
Index: snapshot/patches/patch-send_c
===================================================================
RCS file: snapshot/patches/patch-send_c
diff -N snapshot/patches/patch-send_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ snapshot/patches/patch-send_c       25 Sep 2007 00:44:39 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- send.c.orig        Tue Apr 10 06:34:53 2007
++++ send.c     Tue Sep 25 02:15:34 2007
+@@ -225,6 +225,8 @@ static int edit_envelope (ENVELOPE *en)
+     return (-1);
+   if (option (OPTASKBCC) && edit_address (&en->bcc, "Bcc: ") == -1)
+     return (-1);
++  if (option (OPTASKREPLY) && edit_address (&en->reply_to, "Reply-To: ") == 
-1)
++    return (-1);
+ 
+   if (en->subject)
+   {

Reply via email to