[PATCH v3] emacs: postpone/resume support

Tomi Ollila tomi.ollila at iki.fi
Sun Jun 5 03:43:26 PDT 2016


On Sat, Jun 04 2016, Mark Walters <markwalters1009 at gmail.com> wrote:

> 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).
>
> Current bindings are C-x C-s to save a draft, C-c C-p to postpone a

According to the discussion on IRC this feature seems like a thing
many people are enthusiastically eager to have...

... but I am not -- I've been happy with the current draft handling
(yes, I had to set message-save-directory)...

... but I think I am not biased when I think that if ctrl-x ctrl-s
does something more magical than simple (save-buffer) in buffers that
looks like text editing buffer, that is going to be unexpected disturbing
functionality to someone (else like me)...

... I can easily add (and will do if this functionaly lands... :):

(put 'notmuch-message-save-draft 'disabled t)
(define-key notmuch-message-mode-map (kbd "C-x C-s") #'save-buffer)

to my $HOME/.emacs.d/notmuch-config.el

(or actually my init-notmuch.el which is in my git-clonable dotfiles so it
goes automatically everywhere; notmuch-config.el is for system-local configs)

but how are others protected?

It might be that no-one else notices nor cares (or they can handle the
situation themselves). anyway, now if this lands and we get tons of
angry responses then I can say 'I said so' >;/

Tomi

PS: the brief look I had to the code I can say Mark has done pretty good
work with it.


> draft (save and exit compose buffer), and e to resume a draft from
> show or tree mode.
>
> Previous drafts get tagged deleted on subsequent saves, or on the
> message being sent.
>
> Each draft gets its own message-id, and we use the namespace
> draft-.... for draft message ids (so, at least for most people, drafts
> are easily distinguisable).
> ---
>
> Sorry to be rather spamming the list. This is another version of the
> postpone/resume series. This replaces the third patch in the series at
> id:1464976195-23134-1-git-send-email-markwalters1009 at gmail.com (so
> should be applied on top of the first two).
>
> There are three main changes --
>
> 1) It seems that editing an already sent message does work -- as it is
> not heavily tested we warn before doing it. But now when you send the
> new version it does not tag the old version as deleted (we only tag
> drafts deleted).
>
> 2) We quote secure mml tags before saving. This avoids problems with
> signing the wrong message, stale signatures, and using the wrong keys
> for encryption. Note the draft message will be stored in the mail
> store unencrypted.
>
> 3) You can choose to quote more mml tags than just secure; there is a
> custom variable notmuch-message-quoted-tags under notmuch-send which
> should be a list of tags to quote. If you set it to '("secure" "part")
> then attachments won't be saved with the draft. This may be desired in
> some cases (but may break things like postponing rfc822 forwarded
> messages).  Anyway the option is there for anyone who wants to test!
>
> Best wishes
>
> Mark
>
>


More information about the notmuch mailing list