From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: Default email address based on displayed newsgroup Date: Wed, 29 Jul 2009 14:12:24 +0200 Organization: aich tea tea pea dicky riley dot net Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248871403 19927 80.91.229.12 (29 Jul 2009 12:43:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jul 2009 12:43:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 29 14:43:16 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MW8Uw-0007QB-CS for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Jul 2009 14:43:10 +0200 Original-Received: from localhost ([127.0.0.1]:46810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MW8Uv-0007aj-Uc for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Jul 2009 08:43:09 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!feeder.eternal-september.org!eternal-september.org!news.eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 58 Original-X-Trace: news.eternal-september.org U2FsdGVkX19xzGFJH/zin/Krfxk9Ft1pAucddeq2EtlgsJ89TcvG/cRF0buiwh6e3GbdzSByqVrMPJNc5H+8d9Ax9RFIJ/yvLvYr0ED9QQI+B6v722E4eCBcyozLQ8AwiQLJ/BeiQOdL9LIGUCXqwoyGJfqU2bev Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Wed, 29 Jul 2009 12:19:38 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1/W33x1+aieQkdE22+OTNkm33f4fwpHd790QSug1UHGFg== Cancel-Lock: sha1:f0JUmUvqhMXPgJHh6KiFpTACo1Y= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:171299 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66485 Archived-At: Olivier Sirven writes: > Hello there, > > I would like to know if there is a way with gnus to configure the > default email address to use depending on the current displayed > newsgroup. > > Now, I use this declaration in my .gnus.el: > (setq user-mail-address "the.slaa@gmail.com") > > and I'm looking for some variable used to configure this email > address based on a given regexp to be able to use > the.slaa+spams@gmail.com for some specific groups. > > Do you know if this possible? > > Thanks gnus-posting-styles e.g ,---- | setq gnus-posting-styles `((".*" | (name "Richard Riley") | (from "Richard Riley ") | (eval(setq gnushush-user-agent-header (quote real))) | (signature-file "~/.emacs.d/.sigs/rgr.sig") | (eval (setq mml2015-signers '("xxxxxx"))) | (organization "aich tea tea pea dicky riley dot net")))) `---- And then in a custom el file I load I might do: ,---- | (add-to-list `gnus-posting-styles `((or (string-match ,(rx (or "DevelopmentEmail" "emacs" "python" "ecb" "exim4" "gdb" "gnus" "hardware" "html" "muse" "mysql" "networking" "opengl" "pgp" "php" "plan" "readers" "security")) gnus-newsgroup-name) (DE-bbdb-match-field-recipient 'email-type "dev")) | (name "Richard Riley") | (from "Richard Riley ") | (eval(setq gnushush-user-agent-header (quote real))) | (eval (setq mml2015-signers '("xxxxxx"))) | (signature-file "~/.emacs.d/.sigs/d.sig")) t) `---- You would probably take off the "or" clause there. Google for more help/look in gnus manual. regards r.