[PATCH] emacs: filter tag completions by current query

David Edmondson dme at dme.org
Mon Oct 8 05:14:29 PDT 2018


Looks good - a nice usability improvement.

On Monday, 2018-10-08 at 04:47:52 -07, William Casarin wrote:

> 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 at 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
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

dme.
-- 
Oh there ain't no way to say I love you more.


More information about the notmuch mailing list