Hi,
I'm playing with notumuch and mutt-kz trying to find out my optimal setup. For this I often want to see what tags have give message(s) assigned to them. I found some spare time on weekend I devoted to that, which resulted in the attached patch. It's alpha version, so it's in no way complete, bug free etc. But it can display tags assigned to given message(s). What I want to achieve in the end is
- display the tags in browser (similarly to how you browse available mailboxes for example) (done) - display how many messages from the group has given tag assigned - ability to add/remove the tags directly from browser. Ideally the browser would just remember which tags you added/removed and later it would call 'modify-labels' which would do rest of the work.
Comments welcome.
Cheers
Looking more into the sources, I think I didn't started right. Instead of re-using current "menu" I should create my own. It does not look so difficult after all.
I'll slowly progress on the patch whenever I have some time. My question is, would this functionality be considered to including into mutt-kz?
Thank you
On Tue, May 14, 2013 at 08:12:44AM +0200, Vladimir Marek wrote:
Looking more into the sources, I think I didn't started right. Instead of re-using current "menu" I should create my own. It does not look so difficult after all.
I'll slowly progress on the patch whenever I have some time. My question is, would this functionality be considered to including into mutt-kz?
As a user, I would love it :). I already use mutt-kz full time so if you need any testers, I would be happy to help.
Cheers,
Hi Vladimir,
On Mon, May 13, 2013 at 10:26:43AM +0200, Vladimir Marek wrote:
I'm playing with notumuch and mutt-kz trying to find out my optimal setup. For this I often want to see what tags have give message(s) assigned to them. I found some spare time on weekend I devoted to that,
I use '%g' in the index_format and pager_format to see the tags. Do you have so many tags per message that you need a special browser? :-) (It does not mean that I'll reject the patch, just curiosity.)
which resulted in the attached patch. It's alpha version, so it's in no way complete, bug free etc. But it can display tags assigned to given message(s). What I want to achieve in the end is
- display the tags in browser (similarly to how you browse available mailboxes for example) (done)
- display how many messages from the group has given tag assigned
- ability to add/remove the tags directly from browser. Ideally the browser would just remember which tags you added/removed and later it would call 'modify-labels' which would do rest of the work.
OK, probably make sense.
BTW, it would be nice to have all-tags browser (see "notmuch search --output=tags '*'") where we can generate on-the-fly list of all tags and use the list as list of virtual folders.
Karel
On Mon, May 13, 2013 at 10:26:43AM +0200, Vladimir Marek wrote:
I'm playing with notumuch and mutt-kz trying to find out my optimal setup. For this I often want to see what tags have give message(s) assigned to them. I found some spare time on weekend I devoted to that,
I use '%g' in the index_format and pager_format to see the tags. Do you have so many tags per message that you need a special browser? :-) (It does not mean that I'll reject the patch, just curiosity.)
D'oh! I missed '%g' completely! Well, at least I learned something about mutt sources :)
On the other hand, %g in index_format is hard to align with other messages on screen as every message has different number of tags. How do you do that?
Also I found discrepency between %g and the browser I botched up.
%g says: archive rpe-prg
my browser says: archive flagged rpe-prg
$ notmuch search --output=tags id:20120328130320.GG8295@pub.czech.sun.com archive flagged rpe-prg
Mutt too does not think that the mail is flagged (I have such mail colored by red, and this one is not).
I'll rethink my plans. If nothing else, the smaller notmuch patch is the btetter chance is to get to upstream. If there is any chance at all :)
which resulted in the attached patch. It's alpha version, so it's in no way complete, bug free etc. But it can display tags assigned to given message(s). What I want to achieve in the end is
- display the tags in browser (similarly to how you browse available mailboxes for example) (done)
- display how many messages from the group has given tag assigned
- ability to add/remove the tags directly from browser. Ideally the browser would just remember which tags you added/removed and later it would call 'modify-labels' which would do rest of the work.
OK, probably make sense.
BTW, it would be nice to have all-tags browser (see "notmuch search --output=tags '*'") where we can generate on-the-fly list of all tags and use the list as list of virtual folders.
Display all tags would be easy. But what to do with them? For example my vfolders are constructed as
notmuch://?query=tag:mutt-kz and NOT tag:archive
There would have to be a way to describe how to construct such virtual folders from just a tag name.
But creating the virtual folders definitions on the fly would be clear advantage over typing every single one into .muttrc ...
On Tue, May 14, 2013 at 02:38:30PM +0200, Vladimir Marek wrote:
On Mon, May 13, 2013 at 10:26:43AM +0200, Vladimir Marek wrote:
I'm playing with notumuch and mutt-kz trying to find out my optimal setup. For this I often want to see what tags have give message(s) assigned to them. I found some spare time on weekend I devoted to that,
I use '%g' in the index_format and pager_format to see the tags. Do you have so many tags per message that you need a special browser? :-) (It does not mean that I'll reject the patch, just curiosity.)
D'oh! I missed '%g' completely! Well, at least I learned something about mutt sources :)
On the other hand, %g in index_format is hard to align with other messages on screen as every message has different number of tags. How do you do that?
set index_format = "%4C %Z %[%d/%b] %-16.15F %s %> %?g?(%g)?" set pager_format = "-%Z- %C/%m: %-20.20n %s%* -- %?g?(%g)? - (%P)"
I have added this example to README.notmuch.
Also I found discrepency between %g and the browser I botched up.
%g says: archive rpe-prg
my browser says: archive flagged rpe-prg
$ notmuch search --output=tags id:20120328130320.GG8295@pub.czech.sun.com archive flagged rpe-prg
Read the README.notmuch file :-)
nm_hidden_tags = <comma delimited list>
This variable specifies private notmuch tags which should not be printed on screen (index, pager).
Default is "unread,draft,flagged,passed,replied,attachment".
There would have to be a way to describe how to construct such virtual folders from just a tag name.
But creating the virtual folders definitions on the fly would be clear advantage over typing every single one into .muttrc ...
Well, it's possible to use vfolder-from-query (<Esc>X) to create virtual folder from query on-the-fly.
I thought about some overview about all the tags, but it's nothing important.
Karel
Hi Karel,
On Tue, May 14, 2013 at 11:01:08AM +0200, Karel Zak wrote:
On Mon, May 13, 2013 at 10:26:43AM +0200, Vladimir Marek wrote:
I'm playing with notumuch and mutt-kz trying to find out my optimal setup. For this I often want to see what tags have give message(s) assigned to them. I found some spare time on weekend I devoted to that,
I use '%g' in the index_format and pager_format to see the tags. Do you have so many tags per message that you need a special browser? :-) (It does not mean that I'll reject the patch, just curiosity.)
%g doesn't seem to work for me. I get an empty string.
set pager_format="-%Z- %2e/%.2E: %{%b %d} %-20.20n (%g)%s %*- (%P)"
With the above $pager_format for your message I get:
- L- 2/05: May 14 Karel Zak ()Re: tags browser ------- (91%)
The two following two tags should be there. What am I missing?
$ notmuch search --output=tags id:20130514090108.GC18123@x2.net.home 2013 2013-05
Cheers,
On Tue, May 14, 2013 at 11:01:08AM +0200, Karel Zak wrote:
Hi Vladimir,
On Mon, May 13, 2013 at 10:26:43AM +0200, Vladimir Marek wrote:
I'm playing with notumuch and mutt-kz trying to find out my optimal setup. For this I often want to see what tags have give message(s) assigned to them. I found some spare time on weekend I devoted to that,
I use '%g' in the index_format and pager_format to see the tags. Do you have so many tags per message that you need a special browser? :-) (It does not mean that I'll reject the patch, just curiosity.)
I'd like to see the browser because I have so many tags (and sometimes mistype them). It would be quite useful to see them all at once. I know I can do it using notmuch directly, but having easy access to it in mutt would be awesome.
Thanks,
mutt-kz@lists.fedoraproject.org