[Patch v5 4/4] emacs: resume messages

David Bremner david at tethera.net
Sun Nov 13 05:13:25 PST 2016


Mark Walters <markwalters1009 at gmail.com> writes:

> On Sat, 12 Nov 2016, David Bremner <david at tethera.net> wrote:
>>> +(defun notmuch-show-resume-message ()
>>> +  "Resume EDITING the current draft message."
>>> +  (interactive)
>>> +  (let ((id (notmuch-show-get-message-id)))
>>> +    (when id
>>> +      (notmuch-draft-resume id))))
>
>>
>> The error handling is not very clear to me
>> here. notmuch-show-get-message-id is not documented to return nil on
>> error. Should some docstring be changed here?
>
> Do you mean if we are not on a message? I think this may not be needed:
> I think all I intended to check was that we are on a message, but that
> seems to always be true in the show buffer (unlike threads in the search
> buffer).

Well, two issues:

1) it's not clear that notmuch-show-returns nil on an error. When I
tested it in a random buffer it errored because it passed nill to
notmuch-id-to-query.

2) If we're not going to resume, we'd hope some error message would be
   printed, and it might be the job of this function to print it.


More information about the notmuch mailing list