On Fri, May 29, 2015 at 5:22 PM, Andrzej Popielewicz <apopi...@amu.edu.pl> wrote: > * Xu Wang <xuwang...@gmail.com> [2015-05-27 22:27:00]: > >> Dear all, >> >> I would like set a folder hook for postponed messages, which I hope is >> run when I do "R" to change to the postponed folder. >> >> Note that in my .muttrc I have: >> >> set postponed="+[Gmail].Drafts" >> >> but the hook does not seem to work. I tried many, including: >> >> folder-hook 'Drafts' 'set editor = "vim"' >> >> Is there a reason this is not matched by regex? >> >> Kind regards, >> >> Xu > > I have just tested . > The following works > > set editor="elvis" > folder-hook "imap.amu.edu.pl/Drafts" set editor="vim" > > If I use > mutt -f imaps://imap.amu.edu.pl/INBOX/ > and I use "e" command to edit the message then elvis is used > if I use > mutt -f imaps://imap.amu.edu.pl/Drafts/ > and I use "e" command to edit the message then vi is used > > Seems it is exactly what You wanted . Or ? > > Andrzej
Dear all, Thank you very much for such great responses. I understand the issue I had much better now. I thought I wanted folder-hook, but actually I think I want something like postpone-hook, which does not exist (probably for good reason). I now see two options, to use folder hook and 'c' to change directories, such as Andrzej is suggesting, or to use macros, such as Kevin is suggesting. I will test and figure out which is best for my set up. Thank you so much. Kind regards, Xu