Re: How to redirect a maildir open, and/or how to execute external commands

2010-09-28 Thread Michael Williams
On 28 Sep 2010, at 17:02, fe...@crowfix.com wrote:
 The only real drawback to this is that now that I have discovered
 sidebar and the amazing things which mutt's commands can do, I think
 there must be something better than running this special mutt wrapper
 script to do these steps.  I'd like to have mutt recognize that I am
 visiting the spam dir and do these steps for me.  If it could run pre-
 and post-read commands, that would be most of the trick, but it would
 also have to change the name of the maildir to the temp spam mail and
 leave the real spam maildir alone.

If I've understood you, I think mbox-hook (and possibly folder hooks and set 
move) will do what you want, without running external commands.

-- Mike

__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


Re: How to redirect a maildir open, and/or how to execute external commands

2010-09-28 Thread Michael Elkins

On Tue, Sep 28, 2010 at 08:02:36AM -0700, fe...@crowfix.com wrote:

So is it possible to execute external commands before and after
reading a specific maildir?  folder-hook looks to be pre-read only.
I'm not sure if using '.' for the folder-hook maildir would execute
the post-read command if mutt were quit before reading another maildir.


The folder-hooks are primarily for setting Mutt configuration options.  You 
can fake a post-read command by pushing a shell command that will be executed 
once the mailbox is loaded with something like this:


folder-hook +foo 'shell-command~/bin/myscriptenter'

However, there no way to make Mutt open a *different* mailbox like you 
described in your message.


me