* [PATCH] emacs: filter tag completions by current query
@ 2018-10-08 11:47 William Casarin
2018-10-08 12:14 ` David Edmondson
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: William Casarin @ 2018-10-08 11:47 UTC (permalink / raw)
To: notmuch
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: filter tag completions by current query
2018-10-08 11:47 [PATCH] emacs: filter tag completions by current query William Casarin
@ 2018-10-08 12:14 ` David Edmondson
2018-10-08 12:46 ` Jeff Templon
2018-11-24 20:52 ` William Casarin
2018-12-07 1:26 ` David Bremner
2 siblings, 1 reply; 9+ messages in thread
From: David Edmondson @ 2018-10-08 12:14 UTC (permalink / raw)
To: William Casarin, notmuch
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@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@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
dme.
--
Oh there ain't no way to say I love you more.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: filter tag completions by current query
2018-10-08 12:14 ` David Edmondson
@ 2018-10-08 12:46 ` Jeff Templon
2018-10-08 13:01 ` David Edmondson
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Templon @ 2018-10-08 12:46 UTC (permalink / raw)
To: David Edmondson, William Casarin, notmuch
hi guys,
a question from a newbie - where are all these things documented? The
notmuch-emacs documentation that I could find was pretty basic IIRC.
Be glad to hear that I've been looking in the wrong places.
David Edmondson <dme@dme.org> writes:
> Looks good - a nice usability improvement.
JT
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: filter tag completions by current query
2018-10-08 12:46 ` Jeff Templon
@ 2018-10-08 13:01 ` David Edmondson
2018-10-08 13:14 ` Jeff Templon
0 siblings, 1 reply; 9+ messages in thread
From: David Edmondson @ 2018-10-08 13:01 UTC (permalink / raw)
To: Jeff Templon, William Casarin, notmuch
On Monday, 2018-10-08 at 14:46:25 +02, Jeff Templon wrote:
> hi guys,
>
> a question from a newbie - where are all these things documented? The
> notmuch-emacs documentation that I could find was pretty basic IIRC.
Jeff, which things do you mean?
> Be glad to hear that I've been looking in the wrong places.
>
> David Edmondson <dme@dme.org> writes:
>
>> Looks good - a nice usability improvement.
>
> JT
dme.
--
Please don't stand so close to me.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: filter tag completions by current query
2018-10-08 13:01 ` David Edmondson
@ 2018-10-08 13:14 ` Jeff Templon
2018-10-08 13:29 ` David Edmondson
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Templon @ 2018-10-08 13:14 UTC (permalink / raw)
To: David Edmondson, William Casarin, notmuch
Hi,
David Edmondson <dme@dme.org> writes:
> On Monday, 2018-10-08 at 14:46:25 +02, Jeff Templon wrote:
>
>> hi guys,
>>
>> a question from a newbie - where are all these things documented? The
>> notmuch-emacs documentation that I could find was pretty basic IIRC.
>
> Jeff, which things do you mean?
I see all sorts of things being discussed in these patches that look
useful, but they didn't seem to show up in the manual. I'll try to
remember to jot it down next time, but there are a lot of things that
only seem to be mentioned if one does "C-h m" in the mode itself.
There is this "basic guide" (quotes from the doc itself):
https://notmuchmail.org/notmuch-emacs/
and this tips and tricks page
https://notmuchmail.org/emacstips/
I haven't found more documentation than this, except via Google and "C-h
m"
JT
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: filter tag completions by current query
2018-10-08 13:14 ` Jeff Templon
@ 2018-10-08 13:29 ` David Edmondson
2018-10-08 15:24 ` David Bremner
0 siblings, 1 reply; 9+ messages in thread
From: David Edmondson @ 2018-10-08 13:29 UTC (permalink / raw)
To: Jeff Templon, William Casarin, notmuch
On Monday, 2018-10-08 at 15:14:50 +02, Jeff Templon wrote:
> Hi,
>
> David Edmondson <dme@dme.org> writes:
>
>> On Monday, 2018-10-08 at 14:46:25 +02, Jeff Templon wrote:
>>
>>> hi guys,
>>>
>>> a question from a newbie - where are all these things documented? The
>>> notmuch-emacs documentation that I could find was pretty basic IIRC.
>>
>> Jeff, which things do you mean?
>
> I see all sorts of things being discussed in these patches that look
> useful, but they didn't seem to show up in the manual. I'll try to
> remember to jot it down next time, but there are a lot of things that
> only seem to be mentioned if one does "C-h m" in the mode itself.
We don't have a good manual, I agree.
Producing one is hard :-(
> There is this "basic guide" (quotes from the doc itself):
>
> https://notmuchmail.org/notmuch-emacs/
>
> and this tips and tricks page
>
> https://notmuchmail.org/emacstips/
>
> I haven't found more documentation than this, except via Google and "C-h
> m"
dme.
--
They like the smell of it in Hollywood.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: filter tag completions by current query
2018-10-08 13:29 ` David Edmondson
@ 2018-10-08 15:24 ` David Bremner
0 siblings, 0 replies; 9+ messages in thread
From: David Bremner @ 2018-10-08 15:24 UTC (permalink / raw)
To: David Edmondson, Jeff Templon, William Casarin, notmuch
David Edmondson <dme@dme.org> writes:
> On Monday, 2018-10-08 at 15:14:50 +02, Jeff Templon wrote:
>
>> Hi,
>>
>> David Edmondson <dme@dme.org> writes:
>>
>>> On Monday, 2018-10-08 at 14:46:25 +02, Jeff Templon wrote:
>>>
>>>> hi guys,
>>>>
>>>> a question from a newbie - where are all these things documented? The
>>>> notmuch-emacs documentation that I could find was pretty basic IIRC.
>>>
>>> Jeff, which things do you mean?
>>
>> I see all sorts of things being discussed in these patches that look
>> useful, but they didn't seem to show up in the manual. I'll try to
>> remember to jot it down next time, but there are a lot of things that
>> only seem to be mentioned if one does "C-h m" in the mode itself.
>
> We don't have a good manual, I agree.
>
> Producing one is hard :-(
>
I posted a patch series some time ago [1] to bring docstrings into the
manual. It doesn't magically make it a good manual, but it makes it a
bit less discouraging to work on the manual, at least for me.
[1]: https://nmbug.notmuchmail.org/nmweb/show/20180614003245.25112-1-david%40tethera.net
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: filter tag completions by current query
2018-10-08 11:47 [PATCH] emacs: filter tag completions by current query William Casarin
2018-10-08 12:14 ` David Edmondson
@ 2018-11-24 20:52 ` William Casarin
2018-12-07 1:26 ` David Bremner
2 siblings, 0 replies; 9+ messages in thread
From: William Casarin @ 2018-11-24 20:52 UTC (permalink / raw)
To: notmuch
William Casarin <jb55@jb55.com> 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 <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)))
For some more context here to move this patch along:
notmuch-select-tag-with-completion only has one caller, this one.
notmuch-select-tag-with-completion seems to expect this argument, for
some reason it was never passed along.
When it is not passed, it uses all tags ("*") for further refinement,
which doesn't make sense in this context.
Cheers,
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] emacs: filter tag completions by current query
2018-10-08 11:47 [PATCH] emacs: filter tag completions by current query William Casarin
2018-10-08 12:14 ` David Edmondson
2018-11-24 20:52 ` William Casarin
@ 2018-12-07 1:26 ` David Bremner
2 siblings, 0 replies; 9+ messages in thread
From: David Bremner @ 2018-12-07 1:26 UTC (permalink / raw)
To: William Casarin, notmuch
William Casarin <jb55@jb55.com> 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 <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))
>
pushed to master. Sorry it took so long.
d
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-12-07 1:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08 11:47 [PATCH] emacs: filter tag completions by current query William Casarin
2018-10-08 12:14 ` 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
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).