Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Replying with a specified posting style
@ 2022-01-25 17:28 Alberto Luaces
  2022-01-25 21:13 ` Eric Abrahamsen
  0 siblings, 1 reply; 4+ messages in thread
From: Alberto Luaces @ 2022-01-25 17:28 UTC (permalink / raw)
  To: info-gnus-english

Hi, this smells like a FAQ, but I couldn't find anything about it:

Sometimes I receive messages to my account A, while I want to reply to
them from my account in server B.

As far as I know, posting styles are only selected when composing new
messages.

As a low-tech solution, I just move the message from A to B's INBOX and
reply from there.

Is there a more elegant solution?

-- 
Alberto



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

* Re: Replying with a specified posting style
  2022-01-25 17:28 Replying with a specified posting style Alberto Luaces
@ 2022-01-25 21:13 ` Eric Abrahamsen
  2022-01-26  8:27   ` Alberto Luaces
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Abrahamsen @ 2022-01-25 21:13 UTC (permalink / raw)
  To: info-gnus-english

Alberto Luaces <aluaces@udc.es> writes:

> Hi, this smells like a FAQ, but I couldn't find anything about it:
>
> Sometimes I receive messages to my account A, while I want to reply to
> them from my account in server B.
>
> As far as I know, posting styles are only selected when composing new
> messages.

No, posting styles are in effect based on replies/followups as well. In
fact, I think the only time they *aren't* in effect is when composing
new messages, unless you call a message composition command with a
prefix arg, in which case the group under point is used.

> As a low-tech solution, I just move the message from A to B's INBOX and
> reply from there.
>
> Is there a more elegant solution?

The "match" part of the posting style can be more complicated than a
simple string match on group name. If you need to match on both "From"
header and group name, I think the simplest thing might be to use your
own function that checks those two things (the function is called with
point in the message that you're replying to), and then sets the From
and GCC and maybe SMTP server appropriately.

Does that make sense?

Eric



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

* Re: Replying with a specified posting style
  2022-01-25 21:13 ` Eric Abrahamsen
@ 2022-01-26  8:27   ` Alberto Luaces
  2022-01-26 18:46     ` Eric Abrahamsen
  0 siblings, 1 reply; 4+ messages in thread
From: Alberto Luaces @ 2022-01-26  8:27 UTC (permalink / raw)
  To: info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Alberto Luaces <aluaces@udc.es> writes:
>
>> Hi, this smells like a FAQ, but I couldn't find anything about it:
>>
>> Sometimes I receive messages to my account A, while I want to reply to
>> them from my account in server B.
>>
>> As far as I know, posting styles are only selected when composing new
>> messages.
>
> No, posting styles are in effect based on replies/followups as well. In
> fact, I think the only time they *aren't* in effect is when composing
> new messages, unless you call a message composition command with a
> prefix arg, in which case the group under point is used.
>

You are right, otherwise my solution would not work.

>
>> As a low-tech solution, I just move the message from A to B's INBOX and
>> reply from there.
>>
>> Is there a more elegant solution?
>
> The "match" part of the posting style can be more complicated than a
> simple string match on group name. If you need to match on both "From"
> header and group name, I think the simplest thing might be to use your
> own function that checks those two things (the function is called with
> point in the message that you're replying to), and then sets the From
> and GCC and maybe SMTP server appropriately.
>
> Does that make sense?

Yes, it does.  My use case is not generalist, since I do not have any
rules that I can write beforehand, but from time to time someone
addresses me at the wrong email identity.

I was somehow looking for a function that could set up those fields you
mentioned in the reply process, but if it is not straightforward, I am
sticking with my procedure: move the message to the group it should
belong, and then benefit from its posting style when replying.

Thank you very much for the heads-up.

-- 
Alberto



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

* Re: Replying with a specified posting style
  2022-01-26  8:27   ` Alberto Luaces
@ 2022-01-26 18:46     ` Eric Abrahamsen
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Abrahamsen @ 2022-01-26 18:46 UTC (permalink / raw)
  To: info-gnus-english

Alberto Luaces <aluaces@udc.es> writes:


[...]

>> The "match" part of the posting style can be more complicated than a
>> simple string match on group name. If you need to match on both "From"
>> header and group name, I think the simplest thing might be to use your
>> own function that checks those two things (the function is called with
>> point in the message that you're replying to), and then sets the From
>> and GCC and maybe SMTP server appropriately.
>>
>> Does that make sense?
>
> Yes, it does.  My use case is not generalist, since I do not have any
> rules that I can write beforehand, but from time to time someone
> addresses me at the wrong email identity.

Ah, well posting styles are by definition automatic rules, so that's
probably not the right solution here.

> I was somehow looking for a function that could set up those fields you
> mentioned in the reply process, but if it is not straightforward, I am
> sticking with my procedure: move the message to the group it should
> belong, and then benefit from its posting style when replying.

I think you might look into one of the packages that do "identity" in
Gnus -- see https://www.emacswiki.org/emacs/CategoryGnus#h5o-5



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

end of thread, other threads:[~2022-01-26 18:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 17:28 Replying with a specified posting style Alberto Luaces
2022-01-25 21:13 ` Eric Abrahamsen
2022-01-26  8:27   ` Alberto Luaces
2022-01-26 18:46     ` Eric Abrahamsen

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