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

Re: send-hook auto cc not working,



On Wed, Apr 08, 2009 at 12:59:06AM -0500, Kyle Wheeler wrote:
> 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 
Thank you so much Kyle!
I just can not figure out why it does not work.
yes it does not show up in vim but after I quit vim it shows up before I
send the mail.
> 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,/' +/^$"
> 
Thanks Thanks Thanks!
Zhengquan

> ~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

-- 
Zhengquan