Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Changing signature depending on From: header
@ 2008-06-04 17:44 Hasse Hagen Johansen
  2008-06-04 22:22 ` Michal Nazarewicz
  2008-06-05 10:06 ` Adam Sjøgren
  0 siblings, 2 replies; 7+ messages in thread
From: Hasse Hagen Johansen @ 2008-06-04 17:44 UTC (permalink / raw)
  To: info-gnus-english

Hi

I would like to change signature depending on which From: I am
using. Gnus posting styles doesn't seem to solve that problem?

Is it somehow possible?

Regards
Hasse

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

* Re: Changing signature depending on From: header
  2008-06-04 17:44 Changing signature depending on From: header Hasse Hagen Johansen
@ 2008-06-04 22:22 ` Michal Nazarewicz
  2008-06-05  8:10   ` Hasse Hagen Johansen
  2008-06-05 10:06 ` Adam Sjøgren
  1 sibling, 1 reply; 7+ messages in thread
From: Michal Nazarewicz @ 2008-06-04 22:22 UTC (permalink / raw)
  To: info-gnus-english

Hasse Hagen Johansen <hhj@remove-musikcheck.dk> writes:

> I would like to change signature depending on which From: I am
> using. Gnus posting styles doesn't seem to solve that problem?

It does for me:

#v+
(setq
 gnus-posting-styles
 '((".*"
    (signature-file (concat sig-dir "/english"))
    (x-url "http://mina86.com/"))
   ("^pl\\.\\|^alt\\.pl\\.\\|pw\\."
    (signature-file (concat sig-dir "/polish")))))
#v-


-- 
Best regards,                                         _     _
 .o. | Liege of Serenly Enlightened Majesty of      o' \,=./ `o
 ..o | Computer Science,  Michal "mina86" Nazarewicz   (o o)
 ooo +--<mina86*tlen.pl>--<jid:mina86*jabber.org>--ooO--(_)--Ooo--

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

* Re: Changing signature depending on From: header
  2008-06-04 22:22 ` Michal Nazarewicz
@ 2008-06-05  8:10   ` Hasse Hagen Johansen
  2008-06-05  9:59     ` Richard G Riley
  0 siblings, 1 reply; 7+ messages in thread
From: Hasse Hagen Johansen @ 2008-06-05  8:10 UTC (permalink / raw)
  To: info-gnus-english

>>>>> "Michal" == Michal Nazarewicz <mina86@tlen.pl> writes:

    Michal> Hasse Hagen Johansen <hhj@remove-musikcheck.dk> writes:
    >> I would like to change signature depending on which From: I am
    >> using. Gnus posting styles doesn't seem to solve that problem?

    Michal> It does for me:

    Michal> #v+ (setq gnus-posting-styles '((".*" (signature-file
    Michal> (concat sig-dir "/english")) (x-url "http://mina86.com/"))
    Michal> ("^pl\\.\\|^alt\\.pl\\.\\|pw\\."  (signature-file (concat
    Michal> sig-dir "/polish"))))) #v-

Are you sure about that? because to me it looks like that it switches
signatures depending on which group you are in? or maybe I am wrong? 

Regards
Hasse

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

* Re: Changing signature depending on From: header
  2008-06-05  8:10   ` Hasse Hagen Johansen
@ 2008-06-05  9:59     ` Richard G Riley
  0 siblings, 0 replies; 7+ messages in thread
From: Richard G Riley @ 2008-06-05  9:59 UTC (permalink / raw)
  To: info-gnus-english

Hasse Hagen Johansen <hhj@musikcheck.dk> writes:

>>>>>> "Michal" == Michal Nazarewicz <mina86@tlen.pl> writes:
>
>     Michal> Hasse Hagen Johansen <hhj@remove-musikcheck.dk> writes:
>     >> I would like to change signature depending on which From: I am
>     >> using. Gnus posting styles doesn't seem to solve that problem?
>
>     Michal> It does for me:
>
>     Michal> #v+ (setq gnus-posting-styles '((".*" (signature-file
>     Michal> (concat sig-dir "/english")) (x-url "http://mina86.com/"))
>     Michal> ("^pl\\.\\|^alt\\.pl\\.\\|pw\\."  (signature-file (concat
>     Michal> sig-dir "/polish"))))) #v-
>
> Are you sure about that? because to me it looks like that it switches
> signatures depending on which group you are in? or maybe I am wrong? 
>
> Regards
> Hasse

In my settings I set the from and the signature based on what group  I
am in e.g

	  (
	   ,(rx(or "DevelopmentEmail" "emacs" "python" "ecb" "exim4" "gdb" "gnus" "hardware" "html" "muse" "mysql" "networking" "opengl" "pgp" "php" "plan" "readers" "security" "test"))
	   (name "Richard G Riley")
	   (address "rileyrgdev@googlemail.com")
	   (from "Richard G Riley <rileyrgdev@gmail.com>")
	   (eval(setq gnushush-user-agent-header (quote real)))
	   (eval (setq pgg-gpg-user-id "*"))
	   )

Would this not work for you?

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

* Re: Changing signature depending on From: header
  2008-06-04 17:44 Changing signature depending on From: header Hasse Hagen Johansen
  2008-06-04 22:22 ` Michal Nazarewicz
@ 2008-06-05 10:06 ` Adam Sjøgren
  2008-06-05 12:40   ` Hasse Hagen Johansen
  1 sibling, 1 reply; 7+ messages in thread
From: Adam Sjøgren @ 2008-06-05 10:06 UTC (permalink / raw)
  To: info-gnus-english

On Wed, 04 Jun 2008 19:44:29 +0200, Hasse wrote:

> I would like to change signature depending on which From: I am
> using. Gnus posting styles doesn't seem to solve that problem?

> Is it somehow possible?

I seem to recall that gnus-pers.el has been recommended for this
functionality.

I have never tried it through (changing "identity" based on group works
well for me).


  Best regards,

    Adam

-- 
 "You have to photosynthesize"                                Adam Sjøgren
                                                         asjo@koldfront.dk

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

* Re: Changing signature depending on From: header
  2008-06-05 10:06 ` Adam Sjøgren
@ 2008-06-05 12:40   ` Hasse Hagen Johansen
  2008-06-05 12:47     ` Adam Sjøgren
  0 siblings, 1 reply; 7+ messages in thread
From: Hasse Hagen Johansen @ 2008-06-05 12:40 UTC (permalink / raw)
  To: info-gnus-english

>>>>> "Adam" == Adam Sjøgren <asjo@koldfront.dk> writes:


    >> I would like to change signature depending on which From: I am
    >> using. Gnus posting styles doesn't seem to solve that problem?

    >> Is it somehow possible?

    Adam> I seem to recall that gnus-pers.el has been recommended for
    Adam> this functionality.

    Adam> I have never tried it through (changing "identity" based on
    Adam> group works well for me).


I think I will have a look gnus-pers. I have been looking at that before
for another reason.

How does posting actually work. Would it match the group where the
cursorbar is in the group buffer or would I have to enter the group
first(that is what I would like not having to do)

I would like to be able to just push the key m in group buffer, and then
I get the correct signature when sending the mail

Regards
Hasse

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

* Re: Changing signature depending on From: header
  2008-06-05 12:40   ` Hasse Hagen Johansen
@ 2008-06-05 12:47     ` Adam Sjøgren
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Sjøgren @ 2008-06-05 12:47 UTC (permalink / raw)
  To: info-gnus-english

On Thu, 05 Jun 2008 14:40:28 +0200, Hasse wrote:

> How does posting actually work. Would it match the group where the
> cursorbar is in the group buffer or would I have to enter the group
> first(that is what I would like not having to do)

> I would like to be able to just push the key m in group buffer, and then
> I get the correct signature when sending the mail

If you enter the group, you get the posting style related to it of
couse.

If you put point on the group in the *Group* buffer and go C-u m you get
the posting style related to the group - just m will give you the
default posting style.

m is bound to gnus-group-mail in the *Group* buffer:

,----[ C-h f gnus-group-mail RET ]
| `gnus-group-mail' is an interactive compiled Lisp function
|   -- loaded from "gnus-msg"
| (gnus-group-mail &optional ARG)
| 
| Documentation:
| Start composing a mail.
| If ARG, use the group under the point to find a posting style.
| If ARG is 1, prompt for a group name to find the posting style.
`----


  Best regards,

-- 
 "You have to photosynthesize"                                Adam Sjøgren
                                                         asjo@koldfront.dk

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

end of thread, other threads:[~2008-06-05 12:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-04 17:44 Changing signature depending on From: header Hasse Hagen Johansen
2008-06-04 22:22 ` Michal Nazarewicz
2008-06-05  8:10   ` Hasse Hagen Johansen
2008-06-05  9:59     ` Richard G Riley
2008-06-05 10:06 ` Adam Sjøgren
2008-06-05 12:40   ` Hasse Hagen Johansen
2008-06-05 12:47     ` Adam Sjøgren

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).