From 6301c5f23c8d02c09fb556786c057c1424245699 Mon Sep 17 00:00:00 2001 From: Steffen Nurpmeso Date: Sat, 21 Jul 2018 22:50:33 +0200 Subject: [PATCH] *quote-as-attachment*: handle in compose-mode, very last.. More than once i was frustrated because i had to restart a reply from scratch because setting *quote-as-attachment* later will not become reflected. Now it will. Now we have ~Q, too, though. But so it is --- cmd-resend.c | 6 ------ collect.c | 11 +++++++++++ nail.1 | 42 ++++++++++-------------------------------- 3 files changed, 21 insertions(+), 38 deletions(-) diff --git a/cmd-resend.c b/cmd-resend.c index e985fba0..8b7b8bcb 100644 --- a/cmd-resend.c +++ b/cmd-resend.c @@ -514,12 +514,6 @@ j_lt_redo: a_crese_make_ref_and_cs(mp, &head); - if(ok_blook(quote_as_attachment)){ - head.h_attach = n_autorec_calloc(1, sizeof *head.h_attach); - head.h_attach->a_msgno = *msgvec; - head.h_attach->a_content_description = _("Original message content"); - } - if(mail1(&head, 1, mp, NULL, !!(hf & HF_RECIPIENT_RECORD), FAL0) != OKAY){ msgvec = NULL; goto jleave; diff --git a/collect.c b/collect.c index ee759a19..04a2c4a3 100644 --- a/collect.c +++ b/collect.c @@ -2930,6 +2930,17 @@ jskiptails: goto jerr; rewind(_coll_fp); + if(mp != NULL && ok_blook(quote_as_attachment)){ + struct attachment *ap; + + ap = n_autorec_calloc(1, sizeof *ap); + if((ap->a_flink = hp->h_attach) != NULL) + hp->h_attach->a_blink = ap; + hp->h_attach = ap; + ap->a_msgno = (int)PTR2SIZE(mp - message + 1); + ap->a_content_description = _("Original message content"); + } + jleave: if (linebuf != NULL) n_free(linebuf); diff --git a/nail.1 b/nail.1 index 3679af62..104bebbb 100644 --- a/nail.1 +++ b/nail.1 @@ -6350,37 +6350,15 @@ Both folders must be of the same type. . .Mx .It Ic Reply -(R) Replies to only the sender of each message of the given message +(R) Identical to +.Ic reply +except that it replies to only the sender of each message of the given list, by using the first message as the template to quote, for the .Ql Subject: -etc. +etc.; setting .Va flipr will exchange this command with .Ic reply . -Unless the internal variable -.Va fullnames -is set the recipient address will be stripped from comments, names etc. -.Ql Reply-To: -headers will be inspected if -.Va reply-to-honour -is set. -.Pp -This may generate the errors -.Va ^ERR Ns -DESTADDRREQ -if no receiver has been specified, -.Va ^ERR Ns -PERM -if some addressees where rejected by -.Va expandaddr , -.Va ^ERR Ns -NODATA -if no applicable messages have been given, -.Va ^ERR Ns -IO -if an I/O error occurs, -.Va ^ERR Ns -NOTSUP -if a necessary character set conversion fails, and -.Va ^ERR Ns -INVAL -for other errors. -Occurance of some of the errors depend on the value of -.Va expandaddr . . .Mx .It Ic reply @@ -6397,13 +6375,13 @@ influence response behaviour. Unless the internal variable .Va fullnames is set recipient addresses will be stripped from comments, names etc. -If +.Va quote +as well as +.Va quote-as-attachment +configure whether responded-to message shall be quoted etc.; setting .Va flipr -is set the commands -.Ic Reply -and -.Ic reply -are exchanged. +will exchange this command with +.Ic Reply . The command .Ic Lreply offers special support for replying to mailing lists. -- 2.11.4.GIT