send-hooks not reset

2000-10-24 Thread Adrian Chung

Hi!  I figured out how to set things up so that now I can properly reply to
different people based on the original inbound email address.

But I ran into a strange occurrence, which I'm not sure is my fault.

I've set up mutt so that:

set reverse_name
set from="Adrian Chung [EMAIL PROTECTED]"
alternates="(support|achung)@mycompany\.(com|net|org)"

send-hook '~f support@mycompany' 'my_hdr From: company support [EMAIL PROTECTED]'
send-hook '~f support@mycompany' 'set signature=~/.signature-support'

This works properly, so that if email comes in addressed to
[EMAIL PROTECTED], and I hit reply, or reply-all, I get the proper
outgoing From: header, and signature.

The problem is, when I finish composing that message, and then attempt to
compose a new message, by pressing 'c', and then typing in a random
address, I still get the From: header and signature from above.

Is this normal behaviour?  Do I have to set a default send-hook to reset
every parameter that I change?

--
Adrian Chung  Software Engineer e-smith, Inc.



Re: send-hooks not reset

2000-10-24 Thread Dan Boger

On Tue, Oct 24, 2000 at 04:53:25PM -0400, Adrian Chung wrote:
 set from="Adrian Chung [EMAIL PROTECTED]"
 alternates="(support|achung)@mycompany\.(com|net|org)"
 
 send-hook '~f support@mycompany' 'my_hdr From: company support 
[EMAIL PROTECTED]'
 send-hook '~f support@mycompany' 'set signature=~/.signature-support'
 
 Is this normal behaviour?  Do I have to set a default send-hook to reset
 every parameter that I change?

exactly.  when you set the sig, or a header, it's not only for that message.
so you need to do something like:

send-hook . 'unmy_hdr From:'
send-hook . 'unset signature'

-- 
Dan Boger
System Administrator
[EMAIL PROTECTED]

 PGP signature


Re: send-hooks not reset

2000-10-24 Thread Adrian Chung

On Tue, Oct 24, 2000 at 05:22:30PM -0400, Dan Boger [EMAIL PROTECTED] wrote:
 On Tue, Oct 24, 2000 at 04:53:25PM -0400, Adrian Chung wrote:
  set from="Adrian Chung [EMAIL PROTECTED]"
  alternates="(support|achung)@mycompany\.(com|net|org)"
  
  send-hook '~f support@mycompany' 'my_hdr From: company support 
[EMAIL PROTECTED]'
  send-hook '~f support@mycompany' 'set signature=~/.signature-support'
  
  Is this normal behaviour?  Do I have to set a default send-hook to reset
  every parameter that I change?
 
 exactly.  when you set the sig, or a header, it's not only for that message.
 so you need to do something like:
 
 send-hook . 'unmy_hdr From:'
 send-hook . 'unset signature'

   Cool, so it's not just me...

   Is this classified as a bug, or a feature? :)

--
Adrian Chung  Software Engineer e-smith, Inc.
[EMAIL PROTECTED]   +1 613 564 8000x4379  888 ESMITH 1
Suite 1500, 150 Metcalfe St, Ottawa, ON, K2P 1P1, Canada
www.e-smith.com (corporate) | www.e-smith.org (development)



Re: send-hooks not reset

2000-10-24 Thread Mikko Hänninen

Adrian Chung [EMAIL PROTECTED] wrote on Tue, 24 Oct 2000:
  send-hook . 'unmy_hdr From:'
 
Is this classified as a bug, or a feature? :)

It's a feature, a design desicision.  Since you can use any muttrc
command in send-hooks, it would be unworkably complex to try to limit
the scope to that message only.  It's something you just have to be
aware of when working send-hooks, that for every hook that you use, if
you want to have a default value, you must set it yourself with a
"send-hook . whatever".


Regards,
Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy  scifi, the Corrs /
Always remember you're unique - just like everyone else.