Gnus development mailing list
 help / color / mirror / Atom feed
From: Jinhyok Heo <novembre@ournature.org>
Subject: header-action.el related.
Date: 22 Jun 2001 10:47:51 +0900	[thread overview]
Message-ID: <m3hex9l1yw.fsf@ournature.org> (raw)

Hi,

I want to use different signature depending on some header, e.g. To or
From. And I found header-action.el would satisfy me. But I got some
problem with regexp. Help me!

I wanted to use '.signature' with the addresses containing 'abc.com'
and 'def.com'. And I want to use '.signature_2' otherwise.

I cannot express that with lisp regexp. I thought it would be
'[^(abc.com)]|[^(def.com)]' with some back slashes. I tried many
possible combinations, but it failed.

My configuration is similar with the following:

;;; my header-action setting
(setq header-action-list
      '(
	("\\(From\\|To\\|Cc\\|Reply-to\\):"
	 ("\\(abc\\.com\\|def\\.com\\)"
	  (lambda ()
	    ;; change signature
	    (make-variable-buffer-local 'mail-signature-file)
	    (setq mail-signature-file "~/.signature-hihome")
	    (mail-signature)
	    ;; change user-mail-address
	    (make-variable-buffer-local 'user-mail-address)
	    (setq user-mail-address "novembre@biz.hihome.com")
	    (message "Sending hihome Mail!"))))
	("\\(From\\|To\\|Cc\\|Reply-to\\):"
	 ("\\[^\\(abc.com\\)\\]\\|\\[^\\(def\\.com\\)\\]"
	  (lambda ()
	    ;; change signature
	    (make-variable-buffer-local 'mail-signature-file)
	    (setq mail-signature-file "~/.signature")
	    (mail-signature)
	    (message "Sending Mail!"))))
	)
      )

-- 
|  Jinhyok Heo            mailto : novembre @ournature.org
|                         whoami : <http://ournature.org/~novembre/>
|  "We are still reaching for the sky. In the developed countries people
|  are coming back down, saying, `It's empty up there.'" --- a Ladakhi monk

-- 
|  Jinhyok Heo            mailto : novembre @ournature.org
|                         whoami : <http://ournature.org/~novembre/>
|  "We are still reaching for the sky. In the developed countries people
|  are coming back down, saying, `It's empty up there.'" --- a Ladakhi monk


             reply	other threads:[~2001-06-22  1:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-22  1:47 Jinhyok Heo [this message]
2001-06-22  3:07 ` William M. Perry
2001-06-23  6:54 ` Jinhyok Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3hex9l1yw.fsf@ournature.org \
    --to=novembre@ournature.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).