Once upon a time Jeremy Blosser shaped the electrons to say...
> On Feb 12, Daniel Sully [[EMAIL PROTECTED]] wrote:
> > Hi - I'm not finding the functionality (or it's hiding from me) of when I
> > hit 'c' for composing a message, the ability to set a From: address right
> > there, just like a To: and Subject: line is set.
> >
> > No, I don't want to just edit the headers afterwards, I want this to be a
> > pseudo send-hook. I have a send-hook setup for when I reply to a message that
> > comes in to a a certain address, but there doesn't seem to be an easy way to
> > do that when I want to compose a new email *as* that from address.
>
> Right now the only ways to manually change the From: header are by using
> $edit_hds or using <edit-from> (default bound to <esc>f) from the compose
> menu. There's no option to have it show up as one of the headers you're
> prompted for before composing. I guess that would be $askfrom if it were
> there, but it isn't.
How is this?
diff -rup mutt-1.3.27.orig/init.h mutt-1.3.27/init.h
--- mutt-1.3.27.orig/init.h Mon Dec 10 02:09:03 2001
+++ mutt-1.3.27/init.h Tue Feb 12 12:28:01 2002
@@ -181,6 +181,12 @@ struct option_t MuttVars[] = {
** If set, Mutt will use plain ASCII characters when displaying thread
** and attachment trees, instead of the default \fIACS\fP characters.
*/
+ { "askfrom", DT_BOOL, R_NONE, OPTASKFROM, 0 },
+ /*
+ ** .pp
+ ** If set, Mutt will prompt you for a From: address
+ ** before editing an outgoing message.
+ */
{ "askbcc", DT_BOOL, R_NONE, OPTASKBCC, 0 },
/*
** .pp
diff -rup mutt-1.3.27.orig/mutt.h mutt-1.3.27/mutt.h
--- mutt-1.3.27.orig/mutt.h Tue Jan 15 13:00:32 2002
+++ mutt-1.3.27/mutt.h Tue Feb 12 12:30:20 2002
@@ -307,6 +307,7 @@ enum
OPTALLOWANSI,
OPTARROWCURSOR,
OPTASCIICHARS,
+ OPTASKFROM,
OPTASKBCC,
OPTASKCC,
OPTATTACHSPLIT,
diff -rup mutt-1.3.27.orig/send.c mutt-1.3.27/send.c
--- mutt-1.3.27.orig/send.c Fri Dec 28 09:14:36 2001
+++ mutt-1.3.27/send.c Tue Feb 12 12:23:27 2002
@@ -201,6 +201,8 @@ static int edit_envelope (ENVELOPE *en)
char buf[HUGE_STRING];
LIST *uh = UserHeader;
+ if (option (OPTASKFROM) && edit_address (&en->from, "From: ") == -1 || en->from ==
+NULL)
+ return (-1);
if (edit_address (&en->to, "To: ") == -1 || en->to == NULL)
return (-1);
if (option (OPTASKCC) && edit_address (&en->cc, "Cc: ") == -1)
-D
--
There is no spoon.