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

Re: send hook issues



I found this thread. Thought people may find it handy.

http://groups.google.com/group/mailing.unix.mutt-users/browse_thread/thread/5523bef660eaf558/de40956db03c57b8?q=%3Ag%2F.%5C%2B--+%24%2Fnormal+d%7D&rnum=3#de40956db03c57b8

On Sun, Feb 05, 2006 at 07:52:47AM -0500, Asif Iqbal thus spake:
On Thu, Oct 27, 2005 at 02:50:40PM, Will Maier wrote:
On Thu, Oct 27, 2005 at 12:04:01PM -0700, jhelfman@xxxxxxxxxxxxxx
wrote:
> Is there a send hook of some sort to automatically take out the
> signatures in replies??

This is probably more appropriate for your editor to handle. I use
vim to compose my messages; here's one way to get rid of all but the
last signature (which is presumably your own).

In vim, type the following:
:g/.\+-- $/normal d}

But it won't work if it is my first signature. Is there a way to add
the check?

Thanks


This will search your mail for lines beginning with at least one
character (.\+) and ending with '-- ', which is the standard marker
for signatures in email. On each of those lines, it will delete from
that line to the end of the paragraph, which is defined as vim as a
block of text beginning and ending with an empty line.

You may need to tweak the command depending on your signature;
it's also not overly intelligent. Still, if it works for you, you
could add it to your .vimrc and run it when buffers with ft=mail are
opened.

HTH.


--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"..there are two kinds of people: those who work and those who take the 
credit...try
to be in the first group;...less competition there."  - Indira Gandhi


--
148D 5CC5 2A04 852D 53DC  727F 386F 9068 B3A2 9D47