Re: is it possible to set pager search pattern based on message-hook?

2010-09-28 Thread Will Fiveash
On Tue, Sep 28, 2010 at 03:40:16PM -0500, David Champion wrote:
> * On 28 Sep 2010, Will Fiveash wrote: 
> > I'd like to set search to a particular pattern when I view a message
> > with a particular subject.  The reason I want this is that some messages
> > I receive have sections with section delimiters and I want search
> > initialized to that delimiter pattern.  Is this possible and if so can
> > someone give me a hint as to how?
> 
> message-hook '~s pattern' 'macro pager n "^==="; 
> macro pager / "bind pager n search-next; bind pager / search; push /"'
> message-hook . 'bind pager n search-next'
> 
> Untested (naturally) and probably doesn't work due to quoting, but maybe
> a start.

Thanks for the tip, I will check it out.

-- 
Will Fiveash


Re: is it possible to set pager search pattern based on message-hook?

2010-09-28 Thread Will Fiveash
On Wed, Sep 29, 2010 at 12:01:11AM +0200, Rado S wrote:
> =- Will Fiveash wrote on Tue 28.Sep'10 at 14:46:06 -0500 -=
> 
> > I'd like to set search to a particular pattern when I view a message
> > with a particular subject.  The reason I want this is that some messages
> > I receive have sections with section delimiters and I want search
> > initialized to that delimiter pattern.  Is this possible and if so can
> > someone give me a hint as to how?
> 
> message-hook

Thank


Re: is it possible to set pager search pattern based on message-hook?

2010-09-28 Thread Rado S
=- Will Fiveash wrote on Tue 28.Sep'10 at 14:46:06 -0500 -=

> I'd like to set search to a particular pattern when I view a message
> with a particular subject.  The reason I want this is that some messages
> I receive have sections with section delimiters and I want search
> initialized to that delimiter pattern.  Is this possible and if so can
> someone give me a hint as to how?

message-hook

-- 
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.


Re: is it possible to set pager search pattern based on message-hook?

2010-09-28 Thread David Champion
* On 28 Sep 2010, Will Fiveash wrote: 
> I'd like to set search to a particular pattern when I view a message
> with a particular subject.  The reason I want this is that some messages
> I receive have sections with section delimiters and I want search
> initialized to that delimiter pattern.  Is this possible and if so can
> someone give me a hint as to how?

message-hook '~s pattern' 'macro pager n "^==="; 
macro pager / "bind pager n search-next; bind pager / search; push /"'
message-hook . 'bind pager n search-next'

Untested (naturally) and probably doesn't work due to quoting, but maybe
a start.

-- 
David Champion  *  d...@uchicago.edu  *  IT Services  *  University of Chicago


is it possible to set pager search pattern based on message-hook?

2010-09-28 Thread Will Fiveash
I'd like to set search to a particular pattern when I view a message
with a particular subject.  The reason I want this is that some messages
I receive have sections with section delimiters and I want search
initialized to that delimiter pattern.  Is this possible and if so can
someone give me a hint as to how?

-- 
Will Fiveash


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 '~/bin/myscript'

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


me


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 
__


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

2010-09-28 Thread felix
I have a process for reviewing my spam maildir:

Move all spam maildir messages to a temporary maildir so I don't
get held up by new spam arriving while looking at it.

Run mutt on the temp spam maildir.

If I find ham in the temp spam maildir, manually move it elsewhere
in a separate term.

Move all temporary spmdir junque messages to the bit bucket.

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.

Or maybe it could tell qmail to leave the spam maildir alone -- qmail
will defer delivery temporarily if the home dir has the sticky bit
set, but that's a bit crude.  It will also defer delivery if the
.qmail control file is writeable, which is more acceptable.  I had
avoided this just because it seemed something I would likely forget to
restore afterwards.

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.

-- 
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
 Felix Finch: scarecrow repairman & rocket surgeon / fe...@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o