Hi,
I would like to write a few macros for easy access to virtual folders. Of course I can always create a query and put it in a macro, but then I do not have the nice relevant names. To give you an example:
virtual-mailboxes "Topic" "<complicated query>"
When visiting the above folder, I have the easy to read name "Topic" in the status line. But for the following macro:
macro index,pager gT "<vfolder-from-query><complicated query><enter>" \ "Topic description for help screen"
I have "$nm_default_uri?query=<<complicated query>" as the folder name. This can be a bit confusing; I have to look at the query carefully to find out what I'm looking at.
I also never figured out how to enter a text string to <change-vfolder>. If that is possible, it would solve the above issue too.
Thanks for any ideas,
Hi,
I'm not saying I can do anything about it, I just want to clear up your question.
I would like to write a few macros for easy access to virtual folders.
First question, why? I guess the standard way is to create virtual-mailboxes and select the 'folder' I want to see. What advantage has macro for you?
Of course I can always create a query and put it in a macro, but then I do not have the nice relevant names. To give you an example:
virtual-mailboxes "Topic" "<complicated query>"
When visiting the above folder, I have the easy to read name "Topic" in the status line. But for the following macro:
macro index,pager gT "<vfolder-from-query><complicated query><enter>" \ "Topic description for help screen"
I have "$nm_default_uri?query=<<complicated query>" as the folder name. This can be a bit confusing; I have to look at the query carefully to find out what I'm looking at.
Understood, the query string could have another parameter 'name' similarly to 'limit' and 'type'. Is it worth? Karel Zak or anyone creating a patch would know :)
I also never figured out how to enter a text string to <change-vfolder>. If that is possible, it would solve the above issue too.
Yes, that didn't work for me also, but it's quite some time I tried that.
The problem I have with virtual-mailboxes is, that I can't search them by their name. If I want to go to folder 'notmuch' for example, I would like to - press X - press CR (that should not be necessary, I guess. But it is at the moment) - / ( for searching a name) - type 'notmuch' and <CR>
Unfortunately the searching looks into the mailbox specification, and since the mailbox specification always starts with 'notmuch://?query...' just jumps to next line.
Cheers
Hi Vlad,
On Tue, Dec 03, 2013 at 10:02:50AM +0100, Vladimir Marek wrote:
Hi,
I'm not saying I can do anything about it, I just want to clear up your question.
Actually, I have been meaning to get into the mutt source for a while. If you can point me to the relevant functions, I could try it myself.
I would like to write a few macros for easy access to virtual folders.
First question, why? I guess the standard way is to create virtual-mailboxes and select the 'folder' I want to see. What advantage has macro for you?
Well, macros are faster! Without a macro, I usually use the sidebar-next/prev functions followed by sidebar-open. Compared to that, using a macro is just two keystrokes. I use them for (virtual) folders I visit very often.
Of course I can always create a query and put it in a macro, but then I do not have the nice relevant names. To give you an example:
virtual-mailboxes "Topic" "<complicated query>"
When visiting the above folder, I have the easy to read name "Topic" in the status line. But for the following macro:
macro index,pager gT "<vfolder-from-query><complicated query><enter>" \ "Topic description for help screen"
I have "$nm_default_uri?query=<<complicated query>" as the folder name. This can be a bit confusing; I have to look at the query carefully to find out what I'm looking at.
Understood, the query string could have another parameter 'name' similarly to 'limit' and 'type'. Is it worth? Karel Zak or anyone creating a patch would know :)
I'm not sure; I thought the query string is supposed to be the Xapian query passed on to libnotmuch. This is more a UI enhancement, I would think it is better to keep the two separate.
I also never figured out how to enter a text string to <change-vfolder>. If that is possible, it would solve the above issue too.
Yes, that didn't work for me also, but it's quite some time I tried that.
The problem I have with virtual-mailboxes is, that I can't search them by their name. If I want to go to folder 'notmuch' for example, I would like to
- press X
- press CR (that should not be necessary, I guess. But it is at the moment)
- / ( for searching a name)
- type 'notmuch' and <CR>
Unfortunately the searching looks into the mailbox specification, and since the mailbox specification always starts with 'notmuch://?query...' just jumps to next line.
This I do not follow. This is what I see after 'X <any character>':
186( 137) Today 236( 178) Yest 3233( 0) Inboxes 447( 447) virtual folder 1 1330( 747) virtual folder 2
Now I can search with '/Today<enter>' and I'm in today. How do you define the virtual folders? This is what I do:
virtual-mailboxes \ "Inboxes" "$my_nmuri is:inbox" \ "Today" "$my_nmuri date:today..today &limit=500" \ "Yest" "$my_nmuri date:yesterday..yesterday &limit=500"
The first quoted string serves as the folder name shown above.
Cheers,
[ Rest was IMO answered by Karel already ]
The problem I have with virtual-mailboxes is, that I can't search them by their name. If I want to go to folder 'notmuch' for example, I would like to
- press X
- press CR (that should not be necessary, I guess. But it is at the moment)
- / ( for searching a name)
- type 'notmuch' and <CR>
Unfortunately the searching looks into the mailbox specification, and since the mailbox specification always starts with 'notmuch://?query...' just jumps to next line.
This I do not follow. This is what I see after 'X <any character>':
186( 137) Today 236( 178) Yest3233( 0) Inboxes 447( 447) virtual folder 1 1330( 747) virtual folder 2
Now I can search with '/Today<enter>' and I'm in today. How do you define the virtual folders? This is what I do:
virtual-mailboxes \ "Inboxes" "$my_nmuri is:inbox" \ "Today" "$my_nmuri date:today..today &limit=500" \ "Yest" "$my_nmuri date:yesterday..yesterday &limit=500"
The first quoted string serves as the folder name shown above.
It will work if you search for 'Today', but try searching for 'notmuch' (I guess your $my_nmuri is something like 'notmuch://'). It does not search the virtual mailbox name, but rather it's definition.
Tis is part of my mailbox definitions:
virtual-mailboxes \ INBOX "notmuch://?query=(tag:inbox and (tag:unread or tag:flagged) and not tag:unsorted)&type=threads" \ vm-interest "notmuch://?query=tag:vm-interest and NOT tag:archive" \ vm-admin "notmuch://?query=tag:vm-admin and NOT tag:archive" \
On Wed, Dec 04, 2013 at 04:12:59PM +0100, Vladimir Marek wrote:
[ Rest was IMO answered by Karel already ]
The problem I have with virtual-mailboxes is, that I can't search them by their name. If I want to go to folder 'notmuch' for example, I would like to
- press X
- press CR (that should not be necessary, I guess. But it is at the moment)
- / ( for searching a name)
- type 'notmuch' and <CR>
Unfortunately the searching looks into the mailbox specification, and since the mailbox specification always starts with 'notmuch://?query...' just jumps to next line.
This I do not follow. This is what I see after 'X <any character>':
186( 137) Today 236( 178) Yest3233( 0) Inboxes 447( 447) virtual folder 1 1330( 747) virtual folder 2
Now I can search with '/Today<enter>' and I'm in today. How do you define the virtual folders? This is what I do:
virtual-mailboxes \ "Inboxes" "$my_nmuri is:inbox" \ "Today" "$my_nmuri date:today..today &limit=500" \ "Yest" "$my_nmuri date:yesterday..yesterday &limit=500"
The first quoted string serves as the folder name shown above.
It will work if you search for 'Today', but try searching for 'notmuch' (I guess your $my_nmuri is something like 'notmuch://'). It does not
Indeed, I use my_* variables to make my config more readable.
search the virtual mailbox name, but rather it's definition.
Tis is part of my mailbox definitions:
virtual-mailboxes \ INBOX "notmuch://?query=(tag:inbox and (tag:unread or tag:flagged) and not tag:unsorted)&type=threads" \ vm-interest "notmuch://?query=tag:vm-interest and NOT tag:archive" \ vm-admin "notmuch://?query=tag:vm-admin and NOT tag:archive" \
Indeed, you are right! My inbox example worked because the notmuch URI also had inbox in it. I tried a few others with no commonality between the URI and the vfolder description, the searches failed. One example:
"me @ Analysis" "$my_nmuri from:suvayu and folder:gwt"
Searching for ana fails to find the above.
Cheers,
On Tue, Dec 03, 2013 at 10:02:50AM +0100, Vladimir Marek wrote:
The problem I have with virtual-mailboxes is, that I can't search them by their name. If I want to go to folder 'notmuch' for example, I would like to
- press X
- press CR (that should not be necessary, I guess. But it is at the moment)
- / ( for searching a name)
- type 'notmuch' and <CR>
Unfortunately the searching looks into the mailbox specification, and since the mailbox specification always starts with 'notmuch://?query...' just jumps to next line.
Fixed, not it uses folder name rather than the path.
Karel
The problem I have with virtual-mailboxes is, that I can't search them by their name. If I want to go to folder 'notmuch' for example, I would like to
- press X
- press CR (that should not be necessary, I guess. But it is at the moment)
- / ( for searching a name)
- type 'notmuch' and <CR>
Unfortunately the searching looks into the mailbox specification, and since the mailbox specification always starts with 'notmuch://?query...' just jumps to next line.
Fixed, not it uses folder name rather than the path.
Nice! Thank you. Also now I can do
macro index X "<change-vfolder>?"
And pressing X always just presents list of vfolders.
Thank you second time.
Unfortunately the searching looks into the mailbox specification, and since the mailbox specification always starts with 'notmuch://?query...' just jumps to next line.
Fixed, not it uses folder name rather than the path.
Actually I remembered that there is another issue with vfolders - folder-hook. Folder hook operates on 'path' of a folder, not on it's description. That does not matter too much for other types of mailboxes as they are based on real path somewhere. But notmuch's 'path' can be very different. It would be great to have that changed too.
Looking at the sources, it won't be so easy. There are several ways of entering a (v)folder.
- main.c:1022 mutt_select_file (folder, sizeof (folder), M_SEL_FOLDER | M_SEL_BUFFY); ( that's <change-vfolder>? I believe )
- main.c:647 case 'f': strfcpy (folder, optarg, sizeof (folder)); ( that's $ mutt -f notmuch://... - I have never tried that!)
- calling <change-vfolder> directly ( somewhere in curs_main.c ? )
If we somehow cover all those entry points, setting not only 'folder' variable but also new 'description' variable, we the could modify the
main.c:1051 mutt_folder_hook (folder);
to something like
if (we are dealing with vfolder) { mutt_folder_hook (description); } else { mutt_folder_hook (folder); }
How does that sound?
Cheers
On Thu, Dec 05, 2013 at 11:30:36PM +0100, Vladimir Marek wrote:
Actually I remembered that there is another issue with vfolders - folder-hook. Folder hook operates on 'path' of a folder, not on it's description. That does not matter too much for other types of mailboxes as they are based on real path somewhere. But notmuch's 'path' can be very different. It would be great to have that changed too.
mutt uses the $folder also for imap and pop where the path is very tricky (e.g. imap[s]:[user[:pw]@]imapserver.example.com[:port]/path).
IMHO it would be better to keep it the same for notmuch. The vfolder description is just UI stuff to make things more user-friendly.
BTW, keep folder-hooks based on paths means that you can use hooks also for on the fly generated vfolders (<vfolder-from-query>).
Looking at the sources, it won't be so easy. There are several ways of entering a (v)folder.
- main.c:1022 mutt_select_file (folder, sizeof (folder), M_SEL_FOLDER | M_SEL_BUFFY);
( that's <change-vfolder>? I believe )
Yep
- main.c:647 case 'f': strfcpy (folder, optarg, sizeof (folder));
( that's $ mutt -f notmuch://... - I have never tried that!)
it works, try:
mutt -f "notmuch://?query=from:@oracle.com"
the nice thing is that mutt has functions to detect folder (context) type from path string, so add notmuch was relatively simple as it is extension to the existing code only. Nowhere in this code we use the description field.
- calling <change-vfolder> directly
( somewhere in curs_main.c ? )
If we somehow cover all those entry points, setting not only 'folder' variable but also new 'description' variable, we the could modify the
Yes, it would be probably better to introduce a new variable than play nasty games with $folder, then we can support things like
folder-hook notmuch:.*tag=FOO.* 'set folder_description="Something about FOO"'
Frankly, now the description is only stored in VirtIncoming (which is parsed "virtual-mailboxes"). The description is not regular part of the mutt Context (struct with the current folder). Maybe it would be better to add the description to the Context and make it usable for arbitrary folders (maildirs, mbox, ..) by "set folder_description".
if (we are dealing with vfolder) { mutt_folder_hook (description); } else { mutt_folder_hook (folder);
I'd like to avoid this.
Karel
Actually I remembered that there is another issue with vfolders - folder-hook. Folder hook operates on 'path' of a folder, not on it's description. That does not matter too much for other types of mailboxes as they are based on real path somewhere. But notmuch's 'path' can be very different. It would be great to have that changed too.
mutt uses the $folder also for imap and pop where the path is very tricky (e.g. imap[s]:[user[:pw]@]imapserver.example.com[:port]/path).
That is ture, but there's at least clear '/path' component which we don't have.
IMHO it would be better to keep it the same for notmuch. The vfolder description is just UI stuff to make things more user-friendly.
I don't have strong feelings about this, it was just something that was slightly bothering me in the past, but nothing horrible.
BTW, keep folder-hooks based on paths means that you can use hooks also for on the fly generated vfolders (<vfolder-from-query>).
Good point.
- calling <change-vfolder> directly
( somewhere in curs_main.c ? )
If we somehow cover all those entry points, setting not only 'folder' variable but also new 'description' variable, we the could modify the
Yes, it would be probably better to introduce a new variable than play nasty games with $folder, then we can support things like
folder-hook notmuch:.*tag=FOO.* 'set folder_description="Something about FOO"'
Frankly, now the description is only stored in VirtIncoming (which is parsed "virtual-mailboxes"). The description is not regular part of the mutt Context (struct with the current folder). Maybe it would be better to add the description to the Context and make it usable for arbitrary folders (maildirs, mbox, ..) by "set folder_description".
Maybe. On the other hand it would make potential merging back to mutt sources harder.
if (we are dealing with vfolder) { mutt_folder_hook (description); } else { mutt_folder_hook (folder);
I'd like to avoid this.
Fair enough.
For example I would like to jump automatically to last-entry when entering my INBOX. At the moment I have
virtual-mailboxes \ INBOX "notmuch://?query=(tag:inbox and (tag:unread or tag:flagged) and not tag:unsorted)&type=threads" \
folder-hook 'tag:inbox( | |$)' 'exec last-entry'
The one of the spaces is really a tabulator. (That could be replaced by \y, now that I look to mutt documentation.)
Also, as a workaround, I could change the inbox specification to include
... and not tag:this_is_my_inbox
and match the 'this_is_my_inbox' in folder hook. It is very unlikely that I would really use such tag. That's very simple workaround. So don't worry about it :)
Cheers
On Thu, Dec 05, 2013 at 11:06:53AM +0100, Karel Zak wrote:
On Tue, Dec 03, 2013 at 10:02:50AM +0100, Vladimir Marek wrote:
The problem I have with virtual-mailboxes is, that I can't search them by their name. If I want to go to folder 'notmuch' for example, I would like to
- press X
- press CR (that should not be necessary, I guess. But it is at the moment)
- / ( for searching a name)
- type 'notmuch' and <CR>
Unfortunately the searching looks into the mailbox specification, and since the mailbox specification always starts with 'notmuch://?query...' just jumps to next line.
Fixed, not it uses folder name rather than the path.
Updated packages with both these changes available on copr now:
http://copr-fe.cloud.fedoraproject.org/coprs/fatka/mutt-kz/
:)
On Fri, Dec 06, 2013 at 01:02:37AM +0100, Suvayu Ali wrote:
Updated packages with both these changes available on copr now:
Cool, it would be nice to update the packages to v1.5.22.1-rc1 and maybe also add "Conflicts: mutt" to avoid collisions.
Karel
On Fri, Dec 06, 2013 at 03:57:37PM +0100, Karel Zak wrote:
On Fri, Dec 06, 2013 at 01:02:37AM +0100, Suvayu Ali wrote:
Updated packages with both these changes available on copr now:
Cool, it would be nice to update the packages to v1.5.22.1-rc1 and maybe also add "Conflicts: mutt" to avoid collisions.
Done, but 2 things:
1. Copr is behaving weirdly, it intermittently finishes the build but fails to create the repo (that is what happened for this build). So yum install will get you the older rpm. To get the latest, do:
# yum install http://copr-be.cloud.fedoraproject.org/results/fatka/mutt-kz/fedora-19-x86_6...
2. Do you think using Obsoletes instead of Conflicts would be better? With Obsoletes, if someone installs mutt-kz on a system with mutt installed, it should smoothly remove mutt and install mutt-kz instead of giving an error and failing (as it does now).
Cheers,
On Fri, Dec 06, 2013 at 09:02:08PM +0100, Suvayu Ali wrote:
- Do you think using Obsoletes instead of Conflicts would be better? With Obsoletes, if someone installs mutt-kz on a system with mutt installed, it should smoothly remove mutt and install mutt-kz instead of giving an error and failing (as it does now).
Hmm... OK, good point, let's use Obsoletes :-)
Karel
On Tue, Dec 10, 2013 at 10:40:46AM +0100, Karel Zak wrote:
On Fri, Dec 06, 2013 at 09:02:08PM +0100, Suvayu Ali wrote:
- Do you think using Obsoletes instead of Conflicts would be better? With Obsoletes, if someone installs mutt-kz on a system with mutt installed, it should smoothly remove mutt and install mutt-kz instead of giving an error and failing (as it does now).
Hmm... OK, good point, let's use Obsoletes :-)
Done! Repo creation failed again though. People can find the rpm here:
http://copr-be.cloud.fedoraproject.org/results/fatka/mutt-kz/fedora-19-x86_6...
Cheers,
On Tue, Dec 10, 2013 at 01:06:26PM +0100, Suvayu Ali wrote:
Done! Repo creation failed again though. People can find the rpm here:
[...] mutt-kz-1.5.22-1.20131210.git.d9309dab
Please, be more careful with versioing https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Package_Versioning
<name>-<version>-<release>
* <version> should be based on upstream version, the current version is "1.5.22.1"
* <release> is .spec file specific, if you create rpms for pre-release (beta, -rc, ..) packages then use ".0" prefix in the <release>
For example:
mutt-kz-1.5.22.1-0.20131210gitd9309dab
(and maybe the hash "d9309dab" is unnecessary as you probably don't create more than one snapshot per day:-)
in .spec file:
Version: 1.5.22.1 Release: 0.20131210gitd9309dab
Anyway, we have tarballs at ftp://redcrew.org/pub/mutt-kz/v1.5.22.1/ so you don't have to use snapshots from git.
All you need is:
Version: 1.5.22.1 Release: 0.1
%define upstream_version %{version}-rc1
Source: ftp://redcrew.org/pub/mutt-kz/v%{version}/mutt-kz-%{upstream_version}.tar.gz
%prep %setup -q -n %{name}-%{upstream_version}
to make it easy.
Thanks!
Karel
Hi Karel,
Firstly, apologies for the delay; I got really busy with other things, and then the holidays.
On Mon, Dec 16, 2013 at 11:03:22AM +0100, Karel Zak wrote:
On Tue, Dec 10, 2013 at 01:06:26PM +0100, Suvayu Ali wrote:
Done! Repo creation failed again though. People can find the rpm here:
[...] mutt-kz-1.5.22-1.20131210.git.d9309dab
Please, be more careful with versioing https://fedoraproject.org/wiki/Packaging:NamingGuidelines#Package_Versioning
<name>-<version>-<release>
I think I have fixed all the issues. This is the package version number after the changes: 5:1.5.22.1-0.1.rc1.20131222.git.2f3e0f76. You can find the latest package on copr. If you had installed the previous package (with faulty release tag) by hand, please uninstall it before using yum update; things should work now nicely.
mutt-kz-1.5.22.1-0.20131210gitd9309dab
(and maybe the hash "d9309dab" is unnecessary as you probably don't create more than one snapshot per day:-)
Using release tarballs is very convenient for packaging, but I would prefer to keep using git snapshots. I want the packages to include the latest fixes you and others put in, they get more testing this way :).
I hope that is okay.
Cheers,
On Mon, Dec 02, 2013 at 06:03:36PM +0100, Suvayu Ali wrote:
I would like to write a few macros for easy access to virtual folders. Of course I can always create a query and put it in a macro, but then I do not have the nice relevant names. To give you an example:
virtual-mailboxes "Topic" "<complicated query>"
When visiting the above folder, I have the easy to read name "Topic" in the status line. But for the following macro:
macro index,pager gT "<vfolder-from-query><complicated query><enter>" \ "Topic description for help screen"
I have "$nm_default_uri?query=<<complicated query>" as the folder name.
The mutt searches for the description text (e.g. "Topic") by the query URI, so if the folder URI is the same as URI used in the macro then you will see the description text in the status line.
Anyway, I don't think that define a new vfolder by macro is the right way. It would be better to keep the definitions in "virtual-mailboxes" and have a way how to address the definitions.
I'll try to play with that, it seems that the current <change-vfolder> is limited (compare to regular change-folder).
I also never figured out how to enter a text string to <change-vfolder>. If that is possible, it would solve the above issue too.
Yep.
Karel
On Mon, Dec 02, 2013 at 06:03:36PM +0100, Suvayu Ali wrote:
I also never figured out how to enter a text string to <change-vfolder>. If that is possible, it would solve the above issue too.
Fixed, git pull. Now you can specify the folder by name or URI.
Karel
From: glphvgacs drw@gmail.com To: mutt-kz@lists.fedoraproject.org Cc: Bcc: Subject: vsubfolders [was: Virtual folders in macros] Reply-To: In-Reply-To: 20131204120200.GN5572@x2.net.home
On Wed, Dec 04, 2013 at 01:02:00PM +0100, Karel Zak wrote:
On Mon, Dec 02, 2013 at 06:03:36PM +0100, Suvayu Ali wrote:
I also never figured out how to enter a text string to <change-vfolder>. If that is possible, it would solve the above issue too.
Fixed, git pull. Now you can specify the folder by name or URI.
Karel
just built it and noticed something.
btw: this might already be possible to do, i mind you, but i just don't know how. so pointers in that regard are welcome.
so i have these vfolders defined:
"5665 [ --> ]" "notmuch://?query=folder:5665 AND tag:unread NOT from:5665@gmail.com" \ " [ <-- ]" "notmuch://?query=from:5665@gmail.com" \ " [ <--> ]" "notmuch://?query=folder:5665 AND from:5665@gmail.com AND to:5665@gmail.com" \ " [ .. ]" "notmuch://?query=folder:5665" \ "drw [ --> ]" "notmuch://?query=folder:drw AND tag:unread NOT from:drw@gmail.com&limit=32" \ " [ <-- ]" "notmuch://?query=from:drw@gmail.com" \ " [ <--> ]" "notmuch://?query=folder:drw AND from:drw@gmail.com AND to:drw@gmail.com" \ " [ .. ]" "notmuch://?query=folder:drw" \ and a macro to emulate gmail's key binding: macro index gs "<change-vfolder> [ <-- ]<enter>" "Go to Sent"
now if i'm at "drw [ --> ]" and hit 'gs' this will take me to: " [ <-- ]" "notmuch://?query=from:5665@gmail.com" \ whereas one would expect to be landed at: " [ <-- ]" "notmuch://?query=from:drw@gmail.com" \
i suppose the way it does it now is "query from the top" as opposed to "change your frame of reference with respect to where you are then govern yourself respectively". btw, even if you change to query-from-here-on i don't think it would completely solve the problem since i, and i'm sure there users out there doing it, have another macro to land me in *INBOX*: macro index gi "<change-vfolder>drw [ --> ]<enter>" "Go to INBOX"
right now it's not even possible to change-vfolder *dynamically* since 'drw' is hard-coded. and if it does query-from-here-on there are case where it would get it wrong. say user does a 'gi' at: " [ <-- ]" "notmuch://?query=from:5665@gmail.com" \
that will change to drw's INBOX and not 5665's.
so a suggestion would be to add the notion of vsubfolders that are somehow associated to a master vfolder. i can elaborate if that interests you.
On Wed, Dec 04, 2013 at 11:23:25AM -0500, glphvgacs wrote:
so i have these vfolders defined:
"5665 [ --> ]" "notmuch://?query=folder:5665 AND tag:unread NOT from:5665@gmail.com" \ " [ <-- ]" "notmuch://?query=from:5665@gmail.com" \ " [ <--> ]" "notmuch://?query=folder:5665 AND from:5665@gmail.com AND to:5665@gmail.com" \ " [ .. ]" "notmuch://?query=folder:5665" \ "drw [ --> ]" "notmuch://?query=folder:drw AND tag:unread NOT from:drw@gmail.com&limit=32" \ " [ <-- ]" "notmuch://?query=from:drw@gmail.com" \ " [ <--> ]" "notmuch://?query=folder:drw AND from:drw@gmail.com AND to:drw@gmail.com" \ " [ .. ]" "notmuch://?query=folder:drw" \ and a macro to emulate gmail's key binding: macro index gs "<change-vfolder> [ <-- ]<enter>" "Go to Sent"
now if i'm at "drw [ --> ]" and hit 'gs' this will take me to: " [ <-- ]" "notmuch://?query=from:5665@gmail.com" \ whereas one would expect to be landed at: " [ <-- ]" "notmuch://?query=from:drw@gmail.com" \
i suppose the way it does it now is "query from the top" as opposed to "change your frame of reference with respect to where you are then govern yourself respectively". btw, even if you change to query-from-here-on i don't think it would
It should not be so big problem to implement query-from-here-on, but I'm not sure it's really so important as people almost always use unique names for the folders. Frankly, your setup is very unusual :-)
completely solve the problem since i, and i'm sure there users out there doing it, have another macro to land me in *INBOX*: macro index gi "<change-vfolder>drw [ --> ]<enter>" "Go to INBOX"
right now it's not even possible to change-vfolder *dynamically* since 'drw' is hard-coded. and if it does query-from-here-on there are case where it would get it wrong. say user does a 'gi' at: " [ <-- ]" "notmuch://?query=from:5665@gmail.com" \
that will change to drw's INBOX and not 5665's.
so a suggestion would be to add the notion of vsubfolders that are somehow associated to a master vfolder. i can elaborate if that interests you.
so <change-vfolder> will go to the next master folder and <change-vfolder-sub> will go to the next sub-vfolder within the current master, right?
The idea of sub-vfolder is not so crazy (for example I already use "RH" and "RH-<something>" to make it more obvious in sidebar).
Karel
On Thu, Dec 05, 2013 at 11:27:49AM +0100, Karel Zak wrote:
It should not be so big problem to implement query-from-here-on, but I'm not sure it's really so important as people almost always use unique names for the folders. Frankly, your setup is very unusual :-)
maybe because i'm using mutt for multiple accounts (gmail, .edu and so on). it would be interesting to know if people in the community use it that way.
so <change-vfolder> will go to the next master folder and <change-vfolder-sub> will go to the next sub-vfolder within the current master, right?
exact, plus...
The idea of sub-vfolder is not so crazy (for example I already use "RH" and "RH-<something>" to make it more obvious in sidebar).
Karel
plus ^that. that is, also having sub-vfolders under their master vfolders in the sidebar would be great too. in fact, IMHO, this should tolerate recursion so one can even have accounts from same server bundled together.
say i have 3 accounts. 2 from gmail and one from my university. sidebar would show something like:
edu INBOX sent recent all ... gmail drw INBOX sent recent all ... 5665 INBOX sent recent all ...
and of course calls to notmuch would preferably be aware of those associations,
On Wed, Dec 04, 2013 at 01:02:00PM +0100, Karel Zak wrote:
On Mon, Dec 02, 2013 at 06:03:36PM +0100, Suvayu Ali wrote:
I also never figured out how to enter a text string to <change-vfolder>. If that is possible, it would solve the above issue too.
Fixed, git pull. Now you can specify the folder by name or URI.
I just built it, works wonderfully.
PS: Copr is acting weird, build succeeded but failed to create a repo. I also had login problems for an hour or so.
mutt-kz@lists.fedoraproject.org