Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 496D4431FB6 for ; Fri, 9 Nov 2012 09:53:59 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sRoVq347VHsI for ; Fri, 9 Nov 2012 09:53:57 -0800 (PST) Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU [18.7.68.37]) by olra.theworths.org (Postfix) with ESMTP id 365DB431FAE for ; Fri, 9 Nov 2012 09:53:57 -0800 (PST) X-AuditID: 12074425-b7fcc6d00000091f-26-509d433464d7 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id 64.10.02335.4334D905; Fri, 9 Nov 2012 12:53:56 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id qA9HrtPv031420; Fri, 9 Nov 2012 12:53:56 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qA9Hrsnk012538 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Fri, 9 Nov 2012 12:53:55 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1TWsmA-0005wZ-0h; Fri, 09 Nov 2012 12:53:54 -0500 Date: Fri, 9 Nov 2012 12:53:53 -0500 From: Austin Clements To: Mark Walters Subject: Re: [PATCH] contrib: pick: bugfix when trying to show a non-message Message-ID: <20121109175353.GI22284@mit.edu> References: <1351797983-19707-1-git-send-email-markwalters1009@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1351797983-19707-1-git-send-email-markwalters1009@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42IRYrdT0TVxnhtgsOaopsXquTwW12/OZHZg 8tg56y67x7NVt5gDmKK4bFJSczLLUov07RK4Mk4cnsJUcIujovnPL7YGxlb2LkZODgkBE4m9 s2+xQdhiEhfurQeyuTiEBPYxSiz80MAC4axnlHjf2MgO4ZxgkjjbNQPKWcIo8e7kIqAeDg4W ARWJJc2iIKPYBDQktu1fzghiiwjoSNw+tABsHbOAtMS3381MILawgI/Eg40TmUFsXqCa3puT WEBsIQFPie+zF7FCxAUlTs58wgLRqyVx499LJpBVIHOW/+MACXMKeEn0P10A9oEo0AVTTm5j m8AoNAtJ9ywk3bMQuhcwMq9ilE3JrdLNTczMKU5N1i1OTszLSy3StdDLzSzRS00p3cQIDmoX 1R2MEw4pHWIU4GBU4uHd8Wh2gBBrYllxZe4hRkkOJiVR3vWOcwOE+JLyUyozEosz4otKc1KL DzFKcDArifBOZgLK8aYkVlalFuXDpKQ5WJTEeW+k3PQXEkhPLEnNTk0tSC2CycpwcChJ8Bo4 ATUKFqWmp1akZeaUIKSZODhBhvMADbcEqeEtLkjMLc5Mh8ifYtTlOPpm7kNGIZa8/LxUKXFe XZAiAZCijNI8uDmwZPSKURzoLWFeIZAqHmAig5v0CmgJE9CSxiNzQJaUJCKkpBoY19VYz7G3 dHXcePjnrbPWDH+9+d4lHtX2/avwlsV91zXt2uVmXMpOdy+sOH46smYD3/QIT+tcZvfsiYUb LXmPMtWzemvGmytGGzb82euUEXr7a8uihXwqTHW9dyt41Terba78o5fvfvvW5ZP3vgq6vK/M nh9+9PV9q6tTl/OEtHK01D2uzV2kxFKckWioxVxUnAgArzUMZyEDAAA= Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Fri, 09 Nov 2012 17:53:59 -0000 Quoth Mark Walters on Nov 01 at 7:26 pm: > If the user pressed return on the end result status line it gave a > blank message. Modify the function notmuch-pick-get-message-id to > return nil rather than an empty message-id in this case to fix this. > --- > contrib/notmuch-pick/notmuch-pick.el | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el > index 15ac5e8..1886469 100644 > --- a/contrib/notmuch-pick/notmuch-pick.el > +++ b/contrib/notmuch-pick/notmuch-pick.el > @@ -241,7 +241,9 @@ Some useful entries are: > > (defun notmuch-pick-get-message-id () > "Return the message id of the current message." > - (concat "id:\"" (notmuch-pick-get-prop :id) "\"")) > + (let ((id (notmuch-pick-get-prop :id))) > + (when id > + (concat "id:\"" id "\"")))) There's another bug here. The ID query should be constructed with notmuch-id-to-query so it gets properly escaped. > > (defun notmuch-pick-get-match () > "Return whether the current message is a match."