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

Re: send-hook auto cc not working,



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday, April  8 at 12:26 AM, quoth Zhengquan Zhang:
>I tried this minimal muttrc
>
>set edit_headers=yes
>
>set folder="~/.muttmail"
>set spoolfile=+inbox #+is the shortcut of $FOLDER
>set postponed=+postponed
>set record=+sent
>
>set mbox_type=Maildir
>
>send-hook ccl '~t ccl-tech@xxxxxxxxxxxxxxxxxxxx'"push 
>'<edit-cc>,oas@xxxxxxxxxxxxxxxxxxxx<enter>'"

Umm... just to make sure, that's a horrible typo, right? Your 
send-hook here has two major things wrong with it: first, you have an 
extraneous "ccl" at the beginning, and second, you need a space 
between the "~t addr" part and the "push 'stuff'" part.

Otherwise, I tried that minimal muttrc and it worked fine for me.

BUT...I will say this: the CC addition did NOT make it into the 
headers in my editor. That makes sense, of course: by using "push", 
that command only gets executed after I finish editing the message. So 
oas@xxxxxxxxxxxxxxxxxxxx only gets added to the CC header after I've 
finished editing the message and am ready to send it. I never noticed 
the difference before, because I don't use the $edit_headers setting, 
but... I can see that being confusing.

I don't know of a way to modify the CC header BEFORE the editor gets 
it. The only thing I can think of to change this behavior would be to 
use the value of $editor to send the editor commands that would modify 
your CC header, such as this:

     send-hook '~t ccl-tech@xxxxxxxxxxxxxxxxxxxx' \
         set\ editor="vim +/cc: '+silent! s/cc:/Cc: oas@xxxxxxxxxxxxxxxxxxxx,/' 
+/^$"

~Kyle
- -- 
I'm sick of following my dreams. I'm just going to ask them where 
they're going and hook up with them later.
                                                       -- Mitch Hedberg
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkncPSoACgkQBkIOoMqOI170YwCeMC+CgjrhAc1ElZ/pkCWzC4qI
4goAn0568dFYgyw5QB0iaGngDdAxb4ZY
=uGMr
-----END PGP SIGNATURE-----