Folder-hook on reply but not on new message.
Hello everyone.
I just subscribed to this mailing list, although I have been using Mutt
for the past several years.
I finally decided to do something about my mutt-configuration, which has
been annoying me a bit for quite some time.
I use procmail for sorting my mail into appropriate folders. With this
set up, I had originally used some folder-hooks to allow some different
settings based on the folder I was in. This was mainly my signature and
from-address, but also a reply-to address for one folder.
A couple of times i have by accident been in this folder and started
composing a new message, which would consequently have the settings of
the folder, although what I really wanted was when I was REPLYING to a
message in the folder, I would set the parameters, but when I compose a
NEW message, I don't.
I now discovered that much of what I want can actually be handled with
send-hooks in a more elegant (and intuitive) way, but I still have this
problem:
In a mailing-list folder, I want the signature etc. to be set when I
reply to a message (even if I do not reply to the list), but not when I
compose a new message.
send-hook . "my_hdr From: Mikkel Holm Olsen <sf@xxxxxxxxxx>"
send-hook "~C advancemame-users@lists\.sourceforge\.net" "my_hdr From: Mikkel
Holm Olsen <spam@xxxxxxxxxx>"
folder-hook . 'bind pager r reply'
folder-hook . 'bind index r reply'
folder-hook advmame 'macro pager r ":my_hdr From:
spam@xxxxxxxxxx<enter><reply>"'
folder-hook advmame 'macro index r ":my_hdr From:
spam@xxxxxxxxxx<enter><reply>"'
I have been experimenting with making a folder-hook for these folders,
that will rebind "r" to a macro, that first sets the headers, and then
invoke the <reply>. However, the first send-hook will kick in and
redefine the header, so this does not work correctly. I also tried to
remove the send-hook, but this results in the header being set from the
previous hooks. So if i first reply to a message, and then compose a new
mesage, both would have the from-header set to spam@xxxxxxxxxxx
Any suggestions are welcome ;-)
--
Mikkel Holm Olsen
AKA Spaceman Spiff
Denmark
A computer scientist is someone who, when told to 'Go to Hell', sees
the 'go to', rather than the destination, as harmful.