info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lisp recipe to set From header


From: Matthew King
Subject: Lisp recipe to set From header
Date: Fri, 27 Jan 2006 21:34:53 +0000
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

I have the following:

;;; Set From header based on To header
(setq gnus-posting-styles
      '(("nn.+:"
         (From (save-excursion
                 (set-buffer gnus-article-buffer)
                 (message-fetch-field "to"))))))

Which, as the comment says, sets the From header to be that of the
previous mail's To header. I have problems with my address being in the
Cc header instead or with there being more than one address in To, but
this is not important.

What I really want to do is only set the From address to be one from a
pre-set list and to fall back on user-mail-address if there is no match.

I don't know anywhere near enough lisp to write this though, so how
would I go about doing this?

Matthew

-- 
I must take issue with the term "a mere child," for it has been my
invariable experience that the company of a mere child is infinitely
preferable to that of a mere adult.
                                           --  Fran Lebowitz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]