all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* gnus-posting-styles matching
@ 2010-04-22 12:28 Paulo J. Matos
  2010-04-24 16:47 ` Gary
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo J. Matos @ 2010-04-22 12:28 UTC (permalink / raw)
  To: help-gnu-emacs


I have a work account and a work account set up in gnus. Work account is
nnimap+csr:INBOX... etc
I want to set my address id to be my work email when I reply to an email
inside one of these groups or when I create a new email inside one of
these groups. I set the following style:
,----
| (setq gnus-posting-styles
|       '((".*"
|          (signature-file "~/local/gnus/signature")
|          (name "Paulo J. Matos")
|          (address "pxxxxxxs@gmail.com"))
|         ("nnimap\\+csr:.*"
|          (address "Pxxxxxxxxs@csr.com")
|          (organization "Cambridge Silicon Radio plc."))))
`----

However this doesn't actually work. I end up having always the address
id of the gmail.com account.

Any tips on how to setup this correctly and more generally what this
alist is matched against?

-- 
PMatos




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gnus-posting-styles matching
  2010-04-22 12:28 gnus-posting-styles matching Paulo J. Matos
@ 2010-04-24 16:47 ` Gary
  2010-04-24 17:52   ` Richard Riley
  0 siblings, 1 reply; 3+ messages in thread
From: Gary @ 2010-04-24 16:47 UTC (permalink / raw)
  To: Help-gnu-emacs

pocmatos@gmail.com (Paulo J. Matos) writes:

> I have a work account and a work account set up in gnus. Work account is
> nnimap+csr:INBOX... etc
> I want to set my address id to be my work email when I reply to an email
> inside one of these groups or when I create a new email inside one of
> these groups. I set the following style:
> ,----
> | (setq gnus-posting-styles
> |       '((".*"
[...]
> |         ("nnimap\\+csr:.*"
[...]
> However this doesn't actually work. I end up having always the address
> id of the gmail.com account.

Have you tried them the other way around? +csr first, then the one with
the *? My guess is that gnus looks at the first one, matches it, and so
just use that (doesn't ".*" mean some number of any character?), never
getting to your more precise pattern.

-- 
Gary




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gnus-posting-styles matching
  2010-04-24 16:47 ` Gary
@ 2010-04-24 17:52   ` Richard Riley
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Riley @ 2010-04-24 17:52 UTC (permalink / raw)
  To: help-gnu-emacs

Gary <help-gnu-emacs@garydjones.name> writes:

> pocmatos@gmail.com (Paulo J. Matos) writes:
>
>
> Have you tried them the other way around? +csr first, then the one with
> the *? My guess is that gnus looks at the first one, matches it, and so
> just use that (doesn't ".*" mean some number of any character?), never
> getting to your more precise pattern.

The gmail is being used because the other one does not match I
guess. The first "all match" is the fall back. The others are still
checked.

See (gnus) Posting Styles in the gnus info file.

I use rx to simplify the regexps e.g :-

,----
| (add-to-list `gnus-posting-styles  `( ,(rx(or "INBOX.mail.rgr" "root"))
| 				      (from "Richard Riley <rgr@richardriley.net>")
| 				      (name "Richard Riley"))t)
`----

I'm not sure of the address parts as I only set the from field in my
settings!






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-24 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 12:28 gnus-posting-styles matching Paulo J. Matos
2010-04-24 16:47 ` Gary
2010-04-24 17:52   ` Richard Riley

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.