Re: Does mutt have any concept of "where I am now"?
On Sun, Aug 12, 2007 at 11:02:57PM +0200, Kai Grossjohann wrote:
> On Sun, Aug 12, 2007 at 08:00:14PM +0100, Chris G wrote:
>
> > Is there any way in mutt to know where one is in a hierarchy of mail?
>
> No, but you can use folder-hook to set the default save folder. Of
> course, this is really a bear because you have to repeat it for every
> folder...
>
> For example:
>
> folder-hook =foo/bar save-hook . =archive/foo/bar
>
> This means that in the folder =foo/bar, hitting s defaults to
> =archive/foo/bar as the save folder. (The "." in the middle means 'for
> all senders, if you wrote carl there then it'd apply only to messages
> from carl.)
>
OK, thanks, but as you say it's not terribly useful unless you can
automate the generation of the folder-hook commands as otherwise every
time you create a new folder you'd need to create a new folder-hook
command.
However, taking thought, it should be possible to auto-generate the
folder-hook commands without to much difficulty a simple shell script
using 'find' starting at /home/chris/Mail would do what I want and you
can then use `run the script` in muttrc.
> I think what's needed is a script that produces a list of folder names,
> then emits one folder-hook statement for each.
>
Ah, you're there already! :-)
Thanks for the help.
--
Chris Green