[PATCH v3] emacs: postpone/resume support

Tomi Ollila tomi.ollila at iki.fi
Fri Jul 8 04:08:41 PDT 2016


On Fri, Jul 08 2016, Daniel Kahn Gillmor <dkg at fifthhorseman.net> wrote:

> [ Unknown signature status ]
> On Sun 2016-06-05 07:18:25 -0400, David Bremner wrote:
>> Tomi Ollila <tomi.ollila at iki.fi> writes:
>>
>>> ... 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)...
>>
>> This is a valid point. On the other hand the binding is copied from
>> Gnus, which also includes at least _some_ magic
>>
>>       http://www.gnu.org/software/emacs/manual/html_node/gnus/Drafts.html
>
> gnus isn't the only thing that does something more "magical" than saving
> a raw buffer to a file.
>
> try the following:
>
>    echo test | gpg --output test.gpg --armor --default-recipient-self  --encrypt
>    emacs test.gpg
>
> emacs will prompt you to decrypt the file, then let you edit the
> cleartext buffer.
>
> a subsequent "C-x C-s" will re-save it encrypted.  (at least it does for
> me!)
>
> [ i note several weirdnesses here around the round-trip cleanliness and
>   safety of this operation which aren't relevant to notmuch, but that's
>   a different story, and i've reported them to emacs upstream ]
>
> Of course, this functionality appears to also happen within
> "save-buffer" itself -- so arguably it's not more "magical" than
> save-buffer, since it *is* save-buffer.
>
>
> Tomi, would you object if Mark's patches were somehow integrated into
> save-buffer itself, instead of just re-mapping C-x C-s ?  (i don't know
> elisp well enough to know how feasible that would be)

customizable hook might be tolerable ;)

(quick reply writing coat on)

>
> My bottom line:
>
> Mark's series here works well for me, and represents the best draft
> handling i've seen yet for notmuch-emacs.  It would be really good to
> incorporate something approximating this functionality in the mainline.
>
>         --dkg


More information about the notmuch mailing list