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 621446DE0232 for ; Thu, 6 Dec 2018 17:26:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[AWL=0.000, 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 Wu_NZcxnt9hX for ; Thu, 6 Dec 2018 17:26:39 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 3CBA36DE01E3 for ; Thu, 6 Dec 2018 17:26:39 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1gV4uY-000772-Kv; Thu, 06 Dec 2018 20:26:34 -0500 Received: (nullmailer pid 26519 invoked by uid 1000); Fri, 07 Dec 2018 01:26:33 -0000 From: David Bremner To: William Casarin , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: filter tag completions by current query In-Reply-To: <20181008114752.14457-1-jb55@jb55.com> References: <20181008114752.14457-1-jb55@jb55.com> Date: Thu, 06 Dec 2018 21:26:33 -0400 Message-ID: <87woomktyu.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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, 07 Dec 2018 01:26:43 -0000 William Casarin writes: > When filtering by tags in notmuch-search-filter-by-tag, only return tags > related to the current query. > > Before, it was returning all tags. There's no reason to refine the > current query with tags that don't exist in the current result set. > > Signed-off-by: William Casarin > --- > emacs/notmuch.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index 44402f8a..28c50425 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -1076,7 +1076,7 @@ current search results AND the additional query string provided." > Runs a new search matching only messages that match both the > current search results AND that are tagged with the given tag." > (interactive > - (list (notmuch-select-tag-with-completion "Filter by tag: "))) > + (list (notmuch-select-tag-with-completion "Filter by tag: " notmuch-search-query-string))) > (notmuch-search (concat notmuch-search-query-string " and tag:" tag) notmuch-search-oldest-first)) > pushed to master. Sorry it took so long. d