help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Default email address based on displayed newsgroup


From: Richard Riley
Subject: Re: Default email address based on displayed newsgroup
Date: Wed, 29 Jul 2009 14:12:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Olivier Sirven <the.slaa@gmail.com> 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 <rileyrgATgooglemailDOTcom>")
|                             (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 
<rileyrgdevATgmailDOTcom>")
|                                   (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.






reply via email to

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