On 2000-01-31 17:11:54 +0200, Mikko Hänninen wrote: > Well, as a further hint, it's a quad-option. So other than "yes" > and "no" you can also have "ask-yes" and "ask-no". I guess very > few people have it set to "yes", "ask-yes" is much nicer (IMHO > anyway). > But, you're right, it's still a bug or a mis-feature at least... The attached patch partially fixes this kind of behaviour. It's against the current unstable code, and may not apply to 1.0.1. However, I don't think I'll really include it with the CVS: Setting recall to "yes" will still have strange effects when there is only one postponed message, and fixing _that_ would essentially make the "ask-yes" setting superfluous. So, as a bottom line, only use "recall=yes" when you know what you're doing. Otherwise, either bind "recall-message" to some key, or set $recall to "ask-yes". -- http://www.guug.de/~roessler/
Index: send.c =================================================================== RCS file: /home/roessler/cvsroot/mutt/send.c,v retrieving revision 2.39 diff -u -p -u -r2.39 send.c --- send.c 2000/01/29 07:56:38 2.39 +++ send.c 2000/01/31 18:23:57 @@ -940,6 +940,25 @@ int mutt_resend_message (FILE *fp, CONTE return ci_send_message (SENDRESEND, msg, NULL, ctx, cur); } +#ifdef _PGPPATH + +static void set_pgp_sign_params (char *signas, char *signmic) +{ + if(signas) + { + safe_free((void **) &PgpSignAs); + PgpSignAs = signas; + } + + if(signmic) + { + safe_free((void **) &PgpSignMicalg); + PgpSignMicalg = signmic; + } +} + +#endif + int ci_send_message (int flags, /* send mode */ HEADER *msg, /* template to use for new message */ @@ -953,6 +972,8 @@ ci_send_message (int flags, /* send mod BODY *pbody; int i, killfrom = 0; + short recall = 0; + #ifdef _PGPPATH BODY *save_content = NULL; BODY *clear_content = NULL; @@ -974,7 +995,10 @@ ci_send_message (int flags, /* send mod return rv; if(i == M_YES) + { flags |= SENDPOSTPONED; + recall = 1; + } } @@ -996,23 +1020,18 @@ ci_send_message (int flags, /* send mod { msg = mutt_new_header (); -#if 0 - - /* this is no longer used. */ - - if (flags == SENDRESEND) - { - if (mutt_prepare_template (fp, ctx, msg, cur, 1) < 0) - goto cleanup; - } - else - -#endif - if (flags == SENDPOSTPONED) { if ((flags = mutt_get_postponed (ctx, msg, &cur, fcc, sizeof (fcc))) < 0) - goto cleanup; + { + if (!recall || quadoption (OPT_RECALL) != M_YES) + goto cleanup; + + flags = recall = 0; +#ifdef _PGPPATH + set_pgp_sign_params (signas, signmic); +#endif + } } if (flags & (SENDPOSTPONED|SENDRESEND)) @@ -1507,20 +1526,7 @@ cleanup: #ifdef _PGPPATH if (flags & SENDPOSTPONED) - { - - if(signas) - { - safe_free((void **) &PgpSignAs); - PgpSignAs = signas; - } - - if(signmic) - { - safe_free((void **) &PgpSignMicalg); - PgpSignMicalg = signmic; - } - } + set_pgp_sign_params (signas, signmic); #endif /* _PGPPATH */ if (tempfp)