Re: [Patch v5 4/4] emacs: resume messages

Subject: Re: [Patch v5 4/4] emacs: resume messages

Date: Sun, 13 Nov 2016 09:13:25 -0400

To: Mark Walters, notmuch@notmuchmail.org

Cc:

From: David Bremner


Mark Walters <markwalters1009@gmail.com> writes:

> On Sat, 12 Nov 2016, David Bremner <david@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.

Thread: