unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: William Casarin <jb55@jb55.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] emacs: filter tag completions by current query
Date: Mon,  8 Oct 2018 04:47:52 -0700	[thread overview]
Message-ID: <20181008114752.14457-1-jb55@jb55.com> (raw)

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 <jb55@jb55.com>
---
 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))
 
 ;;;###autoload
-- 
2.19.0

             reply	other threads:[~2018-10-08 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-08 11:47 William Casarin [this message]
2018-10-08 12:14 ` [PATCH] emacs: filter tag completions by current query David Edmondson
2018-10-08 12:46   ` Jeff Templon
2018-10-08 13:01     ` David Edmondson
2018-10-08 13:14       ` Jeff Templon
2018-10-08 13:29         ` David Edmondson
2018-10-08 15:24           ` David Bremner
2018-11-24 20:52 ` William Casarin
2018-12-07  1:26 ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181008114752.14457-1-jb55@jb55.com \
    --to=jb55@jb55.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).