<<< Date Index >>>     <<< Thread Index >>>

Re: folder-hook in my .muttrc doesn't work



* Kyle Wheeler (kyle-mutt@xxxxxxxxxxxxxx) [080602 16:19]:

Hello Kyle,

> On Monday, June  2 at 12:29 PM, quoth Rudolf Bahr:
> >folder-hook     +fanciulla/lisa       'set use_from=no'
> >folder-hook     +fanciulla/lisa       'unmy_hdr *'
> >folder-hook     +fanciulla/lisa       'my_hdr     From: 
> >thats-me@xxxxxxxxxxxxx'
> 
> Those three should work fine.
> 

Sorry, they don't, in this case, at least. The From: address is still a 
combination 
of my username and PC's hostname. 


> >folder-hook     +fanciulla/lisa       'my_hdr       To: lisa@xxxxxxxxxxxxx'
> >folder-hook     +fanciulla/lisa       'my_hdr      Fcc: =fanciulla/lisa'

> Those two won't do anything (well... they will, but not what you 
> expect). First of all, every time you compose a message, mutt asks you 
> who the recipient is. Setting a To: header ahead of time doesn't 
> change that, so whatever To: header you had set before will get 
> overwritten. Secondly, the Fcc: setting isn't a *header*, it's a 
> *setting* (that mutt displays in the compose screen as if it was a 
> header). Here's how you'd do it the "right" way:
> 
>      folder-hook +fanciulla/lisa 'set record="=fanciulla/lisa"'


Ok, I removed the folder-hooks which can't be preset by me and are 
indeed unnecessary. Instead I added as you suggested:

folder-hook +fanciulla/lisa 'set record="=fanciulla/lisa"'

But Mutt gives me still back: '=lisa@xxxxxxxxxxxxx' instead of 
'=fanciulla/lisa'. 
 
> 
> *answer* email (r), as opposed to compose new email (m)? If you're 
> *replying* to email (r), then the recipient (To:) is set based on the 
> message you're replying to.
> 
> What exactly are you trying to achieve?

I'm entering the folder 'fanciulla/lisa' in order to answer a message
there by 'r' or ',a'.

> 
> Keep in mind, these hooks are only triggered when you enter the 
> folder. If you have other hooks that override them (such as send-hooks 
> or reply-hooks or message-hooks), they will not be re-triggered until 
> you re-enter the folder.
> 

Yes, therefore I commented all other lines which have something to do with 
'lisa'
or '=fanciulla/lisa'. It seems to help nothing.

Any additional ideas?

Kyle, many thanks for your answer with the explanations!

Rudolf