Here's the patch. I wrote it, i'll let you test it. Don't forget to "sleep 1" or else mutt will assume your script didn't do anything.
-- Mike Schiraldi VeriSign Applied Research
Index: OPS =================================================================== RCS file: /home/roessler/cvs/mutt/OPS,v retrieving revision 3.0 diff -u -r3.0 OPS --- OPS 2002/01/24 12:10:47 3.0 +++ OPS 2002/03/21 16:57:45 @@ -55,6 +55,7 @@ OP_DISPLAY_HEADERS "display message and toggle header weeding" OP_DISPLAY_MESSAGE "display a message" OP_EDIT_MESSAGE "edit the raw message" +OP_EDIT_MESSAGE_WITH "edit the message with a specific editor" OP_EDITOR_BACKSPACE "delete the char in front of the cursor" OP_EDITOR_BACKWARD_CHAR "move the cursor one character to the left" OP_EDITOR_BACKWARD_WORD "move the cursor to the beginning of the word" Index: curs_main.c =================================================================== RCS file: /home/roessler/cvs/mutt/curs_main.c,v retrieving revision 3.2 diff -u -r3.2 curs_main.c --- curs_main.c 2002/02/28 08:23:59 3.2 +++ curs_main.c 2002/03/21 16:57:45 @@ -423,7 +423,7 @@ int oldcount = -1; int rc = -1; MUTTMENU *menu; - char *cp; /* temporary variable. */ + char *cp = NULL; /* temporary variable. */ int index_hint; /* used to restore cursor position */ int do_buffy_notify = 1; int close = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */ @@ -1702,6 +1702,19 @@ unset_option (OPTFORCEREDRAWPAGER); break; + case OP_EDIT_MESSAGE_WITH: + buf[0] = 0; + if (mutt_get_field (_("Edit with command: "), buf, sizeof (buf), 0) != 0 + || !buf[0]) + break; + + mutt_expand_path (buf, sizeof (buf)); + + cp = Editor; + Editor = buf; + + /* fallthrough intentional */ + case OP_EDIT_MESSAGE: CHECK_MSGCOUNT; @@ -1714,6 +1727,8 @@ { mutt_flushinp (); mutt_error _("Can't edit message on POP server."); + if (cp) + Editor = cp; break; } #endif @@ -1721,6 +1736,8 @@ mutt_edit_message (Context, tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; + if (cp) + Editor = cp; break; case OP_FORWARD_MESSAGE: Index: functions.h =================================================================== RCS file: /home/roessler/cvs/mutt/functions.h,v retrieving revision 3.1 diff -u -r3.1 functions.h --- functions.h 2002/01/24 21:53:19 3.1 +++ functions.h 2002/03/21 16:57:46 @@ -78,6 +78,7 @@ { "delete-thread", OP_DELETE_THREAD, "\004" }, { "delete-subthread", OP_DELETE_SUBTHREAD, "\033d" }, { "edit", OP_EDIT_MESSAGE, "e" }, + { "edit-with", OP_EDIT_MESSAGE_WITH, "&" }, { "edit-type", OP_EDIT_TYPE, "\005" }, { "forward-message", OP_FORWARD_MESSAGE, "f" }, { "flag-message", OP_FLAG_MESSAGE, "F" }, @@ -162,6 +163,7 @@ { "delete-thread", OP_DELETE_THREAD, "\004" }, { "delete-subthread", OP_DELETE_SUBTHREAD, "\033d" }, { "edit", OP_EDIT_MESSAGE, "e" }, + { "edit-with", OP_EDIT_MESSAGE_WITH, "&" }, { "edit-type", OP_EDIT_TYPE, "\005" }, { "forward-message", OP_FORWARD_MESSAGE, "f" }, { "flag-message", OP_FLAG_MESSAGE, "F" },
msg25862/pgp00000.pgp
Description: PGP signature