From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 58F2D6DE0008 for ; Sun, 13 Nov 2016 05:13:29 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.006 X-Spam-Level: X-Spam-Status: No, score=-0.006 tagged_above=-999 required=5 tests=[AWL=0.005, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gb14xpEr0sID for ; Sun, 13 Nov 2016 05:13:28 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 6D3516DE0005 for ; Sun, 13 Nov 2016 05:13:28 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1c5uap-0006VE-Bh; Sun, 13 Nov 2016 08:13:07 -0500 Received: (nullmailer pid 12483 invoked by uid 1000); Sun, 13 Nov 2016 13:13:25 -0000 From: David Bremner To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [Patch v5 4/4] emacs: resume messages In-Reply-To: <87eg2fu36m.fsf@qmul.ac.uk> References: <20161107125211.23405-1-david@tethera.net> <20161107125211.23405-5-david@tethera.net> <87mvh4u9mw.fsf@tethera.net> <87eg2fu36m.fsf@qmul.ac.uk> Date: Sun, 13 Nov 2016 09:13:25 -0400 Message-ID: <87shqv5xqi.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2016 13:13:29 -0000 Mark Walters writes: > On Sat, 12 Nov 2016, David Bremner 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.