reply-hooks overrun by folder-hooks

reply-hooks overrun by folder-hooks

Post by Justin Gom » Thu, 29 Jan 2004 14:26:40


I have folder hooks as well as reply-hooks, as follows:

folder-hook +in/(class*|school) "source ~/.mutt/school.hooks"

school.hooks:

set from= XXXX@XXXXX.COM
set sort=date-sent

my_hdr Organization: myschool
my_hdr X-Operating-System: `uname -sr`
my_hdr X-PGP-KeyID: 3E3C8999

folder-hook +in/class_999 my_hdr To: my999prof
folder-hook +in/class_999 my_hdr X-Class: ns999

folder-hook +in/class_888 my_hdr To: my888prof
folder-hook +in/class_888 my_hdr X-Class: ns888

reply-hook . 'unmy_hdr To'

The objective here is to ensure that new compositions go to the
professor associated with that mailbox, and that part works. However,
when I reply to another student whose message is in the same folder, I
want my reply to go to that student only. The reply-hook should undo
the my_hdr command, but it fails. Instead, my replies are addressed
to both the original sender, and the professor.
 
 
 

reply-hooks overrun by folder-hooks

Post by Sven Gucke » Fri, 30 Jan 2004 00:40:18

* Justin Gombos < XXXX@XXXXX.COM > [2004-01-28]:

to remove a "my_hdr foo" command you must use *full* command,
that is "unmy_hdr foo". and if you had used many such
my_hdr commands then you have to know each one of these
to remove/undo all of them. yes, this sucks.

Sven

 
 
 

reply-hooks overrun by folder-hooks

Post by Justin Gom » Fri, 30 Jan 2004 14:00:37


That's what I did. I tried all the following combinations, one at a
time, exiting and re-entering mutt each time, and nothing works:

reply-hook . unmy_hdr
reply-hook . 'unmy_hdr To'
reply-hook . "unmy_hdr To"
reply-hook . 'unmy_hdr To:'
reply-hook . "unmy_hdr To:"

I even tried all of them at once. BTW- if the first usage here is
invalid, why does mutt accept it when it reads the config file?
 
 
 

reply-hooks overrun by folder-hooks

Post by Peter H. C » Sat, 31 Jan 2004 03:37:47


The 1.5.4 manual talks of "unmy_hdr *" for undoing all of them. Do you
know if this doesn't work?

--
Or the "If you have the right to say whatever you want, then I have that
equal right to say that you're a worthless goat- *** er who should do the
world a favor by committing suicide with an electric wool shearer."
-- Charles the Gruamach, in a.g
 
 
 

reply-hooks overrun by folder-hooks

Post by Sven Gucke » Sat, 31 Jan 2004 03:51:33

* Peter H. Coffin < XXXX@XXXXX.COM > [2004-01-29]:


er. i can't say that i know that this doesn't work.
but i can say that i don't know if this works. %-}

but manual for mutt 1.5.5.1 says:

To remove user defined header fields, use the ``unmy_hdr'' command.
You may specify an asterisk (``*'') to remove all header fields, or
the fields to remove. For example, to remove all ``To'' and ``Cc''
header fields, you could use: unmy_hdr to cc

so - try it!

Sven