From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/36683 Path: main.gmane.org!not-for-mail From: Jinhyok Heo Newsgroups: gmane.emacs.gnus.general Subject: header-action.el related. Date: 22 Jun 2001 10:47:51 +0900 Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035172230 9912 80.91.224.250 (21 Oct 2002 03:50:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:50:30 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 26759 invoked from network); 22 Jun 2001 01:47:58 -0000 Original-Received: from unknown (HELO ournature.org) (root@211.238.47.26) by gnus.org with SMTP; 22 Jun 2001 01:47:58 -0000 Original-Received: (from novembre@localhost) by ournature.org (8.11.2/8.11.2) id f5M1lpX10999; Fri, 22 Jun 2001 10:47:51 +0900 Original-To: ding@gnus.org User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Developer-Friendly Unix APIs) Original-Lines: 51 Xref: main.gmane.org gmane.emacs.gnus.general:36683 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:36683 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 : | "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 : | "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