Re: folder hook problems

2000-03-23 Thread J McKitrick

On Thu, Mar 23, 2000 at 03:37:31AM -0600, Aaron Schrab wrote:
> At 05:19 + 23 Mar 2000, J McKitrick <[EMAIL PROTECTED]> wrote:
> > I'm trying to do two things here.  Change the sig and the From in my
> > headers when i am in the 'school' folder.  So far, only the sig come
> > up right.  I can't get the From field to change.
> 
> > send-hook . 'my_hdr From: J McKitrick <[EMAIL PROTECTED]>'
> 
> The above line is the problem.
> 
> > folder-hook school 'my_hdr From: J McKitrick <[EMAIL PROTECTED]>' 
> 
> Order in the .muttrc only matters for the same type of hook.  Your
> folder-hook is working and setting up the header as you want it, but
> when you send a message the above send-hook get's executed and overrides
> the effect of the folder-hook.

Actually, i found a way to do it.  Silly me.  Remove the 'send-hook'
fromt he first line, and just use my_hdr to create my return address.
Then use folder-hook to change it after that.  The only send-hooks i
have left change the sig, not the header.

jm
-- 

Jonathon McKitrick -- [EMAIL PROTECTED] 
Pure... unrefined... spice




Re: folder hook problems

2000-03-23 Thread Aaron Schrab

At 05:19 + 23 Mar 2000, J McKitrick <[EMAIL PROTECTED]> wrote:
> I'm trying to do two things here.  Change the sig and the From in my
> headers when i am in the 'school' folder.  So far, only the sig come
> up right.  I can't get the From field to change.

> send-hook . 'my_hdr From: J McKitrick <[EMAIL PROTECTED]>'

The above line is the problem.

> folder-hook school 'my_hdr From: J McKitrick <[EMAIL PROTECTED]>' 

Order in the .muttrc only matters for the same type of hook.  Your
folder-hook is working and setting up the header as you want it, but
when you send a message the above send-hook get's executed and overrides
the effect of the folder-hook.

Unfortunately, there isn't really a good way to do what you want.  I
guess this is another case where it would be nice to have a pattern
operator that matches against the current folder name.

-- 
Aaron Schrab [EMAIL PROTECTED]  http://www.execpc.com/~aarons/
 A Linux machine! because a 486 is a terrible thing to waste!
-- Joe Sloan <[EMAIL PROTECTED]>



folder hook problems

2000-03-22 Thread J McKitrick

I'm trying to do two things here.  Change the sig and the From in my
headers when i am in the 'school' folder.  So far, only the sig come
up right.  I can't get the From field to change.



jonathon
-- 


#set default_hook = "~f %s !~P | (~P ~C %s)"
set default_hook = "~t %s"
send-hook . 'my_hdr From: J McKitrick <[EMAIL PROTECTED]>'
folder-hook . 'my_hdr From: J McKitrick <[EMAIL PROTECTED]>'
send-hook mom 'set signature=~/.signice'
send-hook dad 'set signature=~/.signice'
folder-hook school 'my_hdr From: J McKitrick <[EMAIL PROTECTED]>' 
folder-hook school set signature=~/.signice
send-hook moe 'my_hdr From: J McKitrick <[EMAIL PROTECTED]>'
send-hook (@freebsd.org) my_hdr From: j mckitrick <[EMAIL PROTECTED]>
send-hook (@freebsd.org) set signature=~/.signature



Re: moving old mail -- folder-hook problems

1999-04-26 Thread Jan Peter Hecking

On Mon, Apr 26, 1999 at 03:43:09PM -0700, Robert Chien wrote:
> > folder-hook \! 'push "T~d>1m\ns=old\n"'
> > 
> > It does pretty much what I want it to do execpt for one problem. Whenever
> > there's no old mail in my incoming mailfolder when I open it, mutt saves
> > the last mail to the =old mailfolder. I realize that's because there are no
> > messages to tag and therefore s operates on the current message which
> > happens to be the last one.
> 
> I could be wrong, but I believe ";s" instead of just "s" will save the
> tagged messages. Try it and let me know! :)

Good idea but unfortunately it doesn´t solve my problem. :-(
If there are no messages tagged when you press ";" it complains "no
messages tagged". Then comes the "s" and saves the last message to the
=old mailbox.

The ";s" is still a good idea because using just "s" is assuming that
"$auto_tag" is set which might not always be the case.

Thanks anyway!
Jan

-- 
Jan Peter Hecking - University of Rostock - Department of Computer Science
E-Mail: [EMAIL PROTECTED]   ICQ-UID: 14643959  /\/\  
PGP Public Key: http://www.informatik.uni-rostock.de/~jhecking/pgp  \--/  
PGP Fingerprint: 18 91 55 54 62 67 CC 71   05 5F C7 AE E4 F3 B7 D9   \/   



Re: moving old mail -- folder-hook problems

1999-04-26 Thread Robert Chien

On Sat, Apr 24, 1999 at 07:00:51PM +0200, Jan Peter Hecking wrote:
> Hi,
> 
> I'm trying to get mutt to automatically save old mail (that is mail that's
> older than one month) to another folder. What I've come up with so far is
> the following folder-hook:
> 
> folder-hook \! 'push "T~d>1m\ns=old\n"'
> 
> It does pretty much what I want it to do execpt for one problem. Whenever
> there's no old mail in my incoming mailfolder when I open it, mutt saves
> the last mail to the =old mailfolder. I realize that's because there are no
> messages to tag and therefore s operates on the current message which
> happens to be the last one.
> 
> Is there a way to tell mutt to only do the save operation when there are
> messages tagged? Or is there maybe a completly different way to achieve
> what I want to do?

I could be wrong, but I believe ";s" instead of just "s" will save the
tagged messages. Try it and let me know! :)

Robert



moving old mail -- folder-hook problems

1999-04-24 Thread Jan Peter Hecking

Hi,

I'm trying to get mutt to automatically save old mail (that is mail that's
older than one month) to another folder. What I've come up with so far is
the following folder-hook:

folder-hook \! 'push "T~d>1m\ns=old\n"'

It does pretty much what I want it to do execpt for one problem. Whenever
there's no old mail in my incoming mailfolder when I open it, mutt saves
the last mail to the =old mailfolder. I realize that's because there are no
messages to tag and therefore s operates on the current message which
happens to be the last one.

Is there a way to tell mutt to only do the save operation when there are
messages tagged? Or is there maybe a completly different way to achieve
what I want to do?

Regards,
Jan

-- 
Jan Peter Hecking - University of Rostock - Department of Computer Science
E-Mail: [EMAIL PROTECTED]   ICQ-UID: 14643959  /\/\  
PGP Public Key: http://www.informatik.uni-rostock.de/~jhecking/pgp  \--/  
PGP Fingerprint: 18 91 55 54 62 67 CC 71   05 5F C7 AE E4 F3 B7 D9   \/