From: Mark Walters Date: Wed, 10 Feb 2016 21:05:25 +0000 (+0000) Subject: Re: [PATCH v2] emacs: Report a lack of matches when calling `notmuch-show'. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5aaaf53e711a97f0f3d25bf9741a3bfee00e17c5;p=notmuch-archives.git Re: [PATCH v2] emacs: Report a lack of matches when calling `notmuch-show'. --- diff --git a/4e/1b297619d4cf4eb44af57c497afa58fd8e79ff b/4e/1b297619d4cf4eb44af57c497afa58fd8e79ff new file mode 100644 index 000000000..847747d67 --- /dev/null +++ b/4e/1b297619d4cf4eb44af57c497afa58fd8e79ff @@ -0,0 +1,128 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 76F6E6DE0BF6 + for ; Wed, 10 Feb 2016 13:05:31 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.236 +X-Spam-Level: +X-Spam-Status: No, score=-0.236 tagged_above=-999 required=5 tests=[AWL=0.334, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, + RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] + 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 5zcP7GkW4j5h for ; + Wed, 10 Feb 2016 13:05:29 -0800 (PST) +Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com + [74.125.82.65]) by arlo.cworth.org (Postfix) with ESMTPS id 2882C6DE0B36 for + ; Wed, 10 Feb 2016 13:05:29 -0800 (PST) +Received: by mail-wm0-f65.google.com with SMTP id c200so6711228wme.0 + for ; Wed, 10 Feb 2016 13:05:29 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:user-agent:date:message-id + :mime-version:content-type; + bh=aYyK8J7ZlfylLkp6CLJVp27u2O0p3pUzJHowm3+Pocg=; + b=I3rLZRKTU+dIX9XywReWMnV9o49iksYRHgrtcVQeh7VIqUvCujz/fD/qTXPi0QEJBf + dBoGPfFAggEL2qyzeC9Z22b/gqaJOHLoROPOzGSc/lcc+jf2zT5wTpnv/NDHbXbHTcas + kLgTV7ZNdcbUQDwbibVZJo19YE6ufsRm4jXFRqaaqDLmSY2ZTvyYd0nTq1YadS+Eyjh1 + IUmAN+/33TNWcxLJW5FNjqFB915sdwWk/33qYhxa9fsGAobOWTrwgMFwst7i82o7bhzs + CtsqrwhW6yb2vp4wTRlIRyB42A5VHk5rYm+2z8bhmkP1Woobtu3Pe9kMqCMtz2AnOPC8 + aDJg== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=aYyK8J7ZlfylLkp6CLJVp27u2O0p3pUzJHowm3+Pocg=; + b=g9/N1+Ak5SdN6e00zMX+3bRfGjiQoHmrK20gB1y74bF3DVsyrsZsWtiNGyD3OYJGXA + WKrhnWnc0s1ZIYzuKB4WwL+Ha+TCalrxI+1jDHmPUy/d3nM4syHBwk+uyZ8qLM5Gkeyb + s1p3HLOkgn9HvhtVbl5ATnVfMp6Q8KZGX19tEZ0OxMfpUrSlcZcY/qCk2q0qqaFv9TXU + jICBcM8nEwyi52N55gqu2sTFrQIcBl6nfoj6cKGP/X8q3lLTW39SzFzz9cnqsyB9mSV+ + Y9uhbgqf2ffVlPMcV6aU0hvmD/SL6j0NkHLPABlKBtWlEquz3GiE5teqnljQr0yE2KKJ + 4jUw== +X-Gm-Message-State: + AG10YORevTE9Me3bfhUXM9etm05UoEuKh+USFcmSf+8TLtOWa3Msy1bAaXTteA3K+Eygcg== +X-Received: by 10.28.210.143 with SMTP id j137mr13161038wmg.13.1455138327703; + Wed, 10 Feb 2016 13:05:27 -0800 (PST) +Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) + by smtp.gmail.com with ESMTPSA id c7sm5035587wmd.13.2016.02.10.13.05.26 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Wed, 10 Feb 2016 13:05:27 -0800 (PST) +From: Mark Walters +To: David Edmondson , notmuch@notmuchmail.org +Subject: Re: [PATCH v2] emacs: Report a lack of matches when calling + `notmuch-show'. +In-Reply-To: +References: <1455112878-23497-1-git-send-email-dme@dme.org> + <1455112878-23497-2-git-send-email-dme@dme.org> <87oabo5rix.fsf@qmul.ac.uk> + +User-Agent: Notmuch/0.18.1+485~gca076ce (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Wed, 10 Feb 2016 21:05:25 +0000 +Message-ID: <87lh6s5l9m.fsf@qmul.ac.uk> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Wed, 10 Feb 2016 21:05:31 -0000 + + +On Wed, 10 Feb 2016, David Edmondson wrote: +> On Wed, Feb 10 2016, Mark Walters wrote: +>> This basically looks fine to me and all tests pass. The code movement +>> and cleanup all looks fine. +> +> Thanks. +> +>> Two minor things, one tiny nit below; and I wonder whether just having +>> the buffer say "No search results" (or something similar) and leave +>> the user to kill it would be nicer than dinging (and more in line with +>> the way search and tree behave). +>> +>> [In some sense I think this way is right and search and tree are wrong, +>> but that is probably difficult to get round as search and tree run +>> asynchronously.] +> +> What if we did "notmuch count $query" first in the search and tree case, +> and did the "(ding) (message ...)" thing if the count returned 0? (Just +> wondering about whether having everything behave that way would be +> possible and acceptable.) +> +> The original impetus for this change was someone who hits an id: button +> that is either a false match (i.e it wasn't ever intended to be a +> notmuch reference) or for a message that they don't have. In both of +> those cases popping up a buffer that says only "No match." would be +> annoying. If we were considering the case where people are using "M-x +> notmuch-show", it seems less clear on the right thing to do, but overall +> I prefer this approach to the useless buffer that I have to kill/quit. +> + +I am quite happy to leave it as you have it with the ding; currently we +have an obscure error message and this is obviously better so (with the +comment change below) +1 from me. + +Best wishes + +Mark + +>>> + ;; Cache the original tags for each message so that we can display +>>> + ;; changes. +>> +>> ^^ I think "Store the original tags for each message" would be better, +>> particularly as this is nothing to do with the tag cache as used by say +>> notmuch-tag-clear-cache. +> +> Agreed - fixed.