Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE] equivalent of --include-related for mu query #2804

Open
titibandit opened this issue Jan 7, 2025 · 10 comments
Open

[RFE] equivalent of --include-related for mu query #2804

titibandit opened this issue Jan 7, 2025 · 10 comments

Comments

@titibandit
Copy link

Is your feature request related to a problem? Please describe.
I would like to "follow" threads of a mailing list. For this my idea was to just flag one of the message of the thread, and setup a bookmark of the sort maildir:/maillist AND flag:flagged. That only selects the flagged message and not new incoming messages related to that thread.

Describe the solution you'd like
Having the possibility to have a --include-related switch that is present for mu find, but there is no equivalent (to my knowledge) for mu query. This would catch new messages related to the "flagged" threads so I can follow them more closely and not need to find them in high volume mailing lists.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
None.

Cheers.

@djcb
Copy link
Owner

djcb commented Jan 8, 2025

Not sure I quite understand -- --include-related would work for this use case, i.e. all the flagged messages + related?

@djcb djcb added needinfo and removed new labels Jan 8, 2025
@titibandit
Copy link
Author

-include-related indeed works, but that's an option that's just available to mu find and not mu query, which is what I would like to use to have that behaviour "programmed in" a mu4e bookmark. Or can you use mu find for mu4e bookmarks?
Sorry for not being clear the first time.

@djcb
Copy link
Owner

djcb commented Jan 9, 2025

But, there is no mu query command. Or do you mean searching in mu4e?

@titibandit
Copy link
Author

titibandit commented Jan 9, 2025

Yes, I mean searching in mu4e, which, if I understood correctly, uses queries behind the scene, which are documented in the mu-query man page.

The mu find command also uses these queries in the background, which can be understood using mu find <some query> --analyze. But running mu find <some query> --analyze and mu find <same query> --include-related --analyze yields the same underlying queries, even if they yield, without the --analyze part, a different set of messages.

@djcb
Copy link
Owner

djcb commented Jan 9, 2025

Yeah, both mu find and mu4e use queries. And with mu find you can use --include-related; while in mu4e you can set mu4e-search-include-related. But, it's not clear to me what you want. You mean to have search options associated with a bookmark?

@titibandit
Copy link
Author

Yes exactly, to have the include-related search option associated with a bookmark.

@djcb
Copy link
Owner

djcb commented Jan 10, 2025

Ah, you can manipulate those fields by customizing mu4e-search-bookmark-hook.

@titibandit
Copy link
Author

Customizing the options through mu4e-search-bookmark-hook only works when you actually "click on" the bookmark (which triggers the mu4e-search-bookmark function).
I mean to have the results of the bookmark query (with include-related set to t) reflected on the / cookie. Because the creation of that cookie, as far as I can tell, never uses the mu4e-search-bookmark function (which is the only place where mu4e-search-bookmark-hook is referenced), I don't think I can currently get the desired behaviour using that hook.

The entire point is to be able to tell if something happened on the threads I follow just at a glance, without having to trigger the headers view associated with the bookmark.

@djcb
Copy link
Owner

djcb commented Jan 11, 2025

Ah, so it's those counts you want to influence.

The queries to gather the bookmark counts are deliberately just simple count-queries, which are not affected by any of the
properties for a "normal" search. I don't expect that to change (at least not any time soon).

However, for your initial question, perhaps it's possible to add some way to add a quick bookmark for the current thread (based on the thread-id); that should get quite close; I'll think about that.

I'll move this RFE to IDEAS.org, thanks for the suggestions.

@titibandit
Copy link
Author

Ah, so it's those counts you want to influence.

Yes, since they update automatically and would allow one to see quickly what's up.

The queries to gather the bookmark counts are deliberately just simple count-queries, which are not affected by any of the properties for a "normal" search. I don't expect that to change (at least not any time soon).

I see. If one were able to represent the concept of include-related directly in the query with e.g. something of the form maildir:/maillist AND flag:flagged --include-related, instead of just being able to do it using options, that would solve the problem as well I guess. But I don't know what that all entails implementation-wise.

However, for your initial question, perhaps it's possible to add some way to add a quick bookmark for the current thread (based on the thread-id); that should get quite close; I'll think about that.

That would work too!

Thanks for taking the time and for sticking with me on understanding that rather complicated RFE of mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants