Re: [PATCH 2/2] emacs: postpone/resume support

Subject: Re: [PATCH 2/2] emacs: postpone/resume support

Date: Tue, 20 Sep 2016 15:45:09 -0400

To: David Bremner, Mark Walters, notmuch@notmuchmail.org

Cc:

From: Daniel Kahn Gillmor


On Sun 2016-09-11 08:05:20 -0400, David Bremner wrote:
> Mark Walters <markwalters1009@gmail.com> writes:
>
>> This provides preliminary support for postponing and resuming in the
>> emacs frontend. On postponing it uses notmuch insert to put the
>> message in the notmuch database; resume gets the raw file from notmuch
>> and using the emacs function mime-to-mml reconstructs the message
>> (including attachments).
>
> I haven't really reviewed this yet, but I noticed it seems to need some
> special handling for signed/encrypted messages.
>
> I created a test message consisting of the mml tag
>
>   "#secure method=pgpmime mode=sign"
>
> (added with C-c C-m C-s) and a pdf attachment.
>
> Saving with C-x C-s created a text/plain part with the #secure tag in
> it. When I edited (and sent) the saved draft, it did not sign
> anything. This might be related to a bug/undocumented-feature of mml
> only parsing #secure tags at the top of the message.

So this failure that bremner's reporting appears to happen only when
combining the #secure mode with a message with attachments.  It doesn't
happen when the draft itself is just plaintext and one of the #secure
flags is set.  And there's no problem if there are attachments without
the #secure flag.

Bremner, can you confirm this?

I also noticed that if you rearrange the text before sending so that the
#secure flag is at the top of the message, the structure of the message
looks weird -- in particular, there's a double layer of multipart/mixed
just within the crypto transformation, instead of a single layer.

that said, these patches are really useful to me even in their current
form, since most of my draft messages don't deal with both crypto and
attachments.  Is there some way to get the benefits here without the bug
at the intersection?

   --dkg
signature.asc (application/pgp-signature)

Thread: