From: Alfredo Finelli <alf@computationes.de>
To: David Bremner <david@tethera.net>
Subject: Re: fcc and external attachments
Date: Wed, 09 Feb 2022 10:16:56 +0100 [thread overview]
Message-ID: <87o83gpfg7.fsf@computationes.de> (raw)
In-Reply-To: <87pmnx1q62.fsf@tethera.net>
David Bremner <david@tethera.net> writes:
> It seems likely this is an unintended consequence of
> da302e1cbaaab89b2bbb32c0f59e1aa6ee708455.
>
> Since notmuch-emacs does it's own Fcc processing, it's a bit
> hit-and-miss whether a given message-fcc-* variable is respected. I'll
> have a look at how hard it is to fix, but first I need a reliable recipe
> for triggering the externalization in message-mode (i.e. without
> involving notmuch). I tried in emacs -q, customize
> message-fcc-externalize-attachments, and running M-x compose-mail, but
> that still saved the whole attachments. Maybe it was the type of
> attachement or something, I don't understand it yet.
>
> d
While trying to understand the problem I found out that gnus had a
somewhat related issue, as you can see in this commit from emacs branch
"emacs-28":
https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-28&id=d8bd7d015e626c73351938626a01288028ebe1c5
So I made this little modification to notmuch in the function
notmuch-maildir-setup-message-for-saving:
diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el
index 51020788..d58f209b 100644
--- a/emacs/notmuch-maildir-fcc.el
+++ b/emacs/notmuch-maildir-fcc.el
@@ -159,6 +159,8 @@ Otherwise set it according to `notmuch-fcc-dirs'."
This should be called on a temporary copy.
This is taken from the function message-do-fcc."
+ (when mml-externalize-attachments
+ (setq message-encoded-mail-cache nil))
(if (not message-encoded-mail-cache)
(message-encode-message-body)
(erase-buffer)
Now I have again the original behaviour with external attachments in fcc
copies. I understand that this forces a new encoding for the local copy
in the fcc-externalize case and ignores the cached encoded message, which
is maybe what you were trying to avoid in the first place. I did not test
what happens to a signed message with attachments.
prev parent reply other threads:[~2022-02-09 10:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 8:27 fcc and external attachments Alfredo Finelli
2022-02-08 12:47 ` David Bremner
2022-02-09 9:16 ` Alfredo Finelli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o83gpfg7.fsf@computationes.de \
--to=alf@computationes.de \
--cc=david@tethera.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).