Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-posting-styles vs compose-mail
@ 2014-07-29  8:58 Kevin Ryde
  2014-07-31  2:10 ` Eric Abrahamsen
  2014-09-12 23:55 ` jenia.ivlev
  0 siblings, 2 replies; 6+ messages in thread
From: Kevin Ryde @ 2014-07-29  8:58 UTC (permalink / raw)
  To: ding

Does gnus-posting-styles rules have anything to notice when a message
has been started by `compose-mail', and perhaps the parameters on that
compose-mail?

I see dynamic bindings of the compose-mail args are visible as variables
`to', `subject', etc, but I wonder if that should be relied on.

I thought to suppress Gcc on some semi-automated mails.  I got the
effect I wanted from code in gnus-message-archive-group like below, and
then wondered if it too already had anything to notice compose-mail or
match headers.  (At the gnus-message-archive-group stage the buffer has
headers ready to consult, I believe.)

(setq gnus-message-archive-group
      '((if (equal (message-fetch-field "To") "query@example.com")
            nil
          "sent")))



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

* Re: gnus-posting-styles vs compose-mail
  2014-07-29  8:58 gnus-posting-styles vs compose-mail Kevin Ryde
@ 2014-07-31  2:10 ` Eric Abrahamsen
  2014-08-02  3:44   ` Kevin Ryde
  2014-09-12 23:55 ` jenia.ivlev
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2014-07-31  2:10 UTC (permalink / raw)
  To: ding

Kevin Ryde <user42_kevin@yahoo.com.au> writes:

> Does gnus-posting-styles rules have anything to notice when a message
> has been started by `compose-mail', and perhaps the parameters on that
> compose-mail?
>
> I see dynamic bindings of the compose-mail args are visible as variables
> `to', `subject', etc, but I wonder if that should be relied on.
>
> I thought to suppress Gcc on some semi-automated mails.  I got the
> effect I wanted from code in gnus-message-archive-group like below, and
> then wondered if it too already had anything to notice compose-mail or
> match headers.  (At the gnus-message-archive-group stage the buffer has
> headers ready to consult, I believe.)
>
> (setq gnus-message-archive-group
>       '((if (equal (message-fetch-field "To") "query@example.com")
>             nil
>           "sent")))

I think no, posting styles won't look at the headers of messages you
compose. My understanding is the styles are only in effect for a) group
names, when you're composing a message to a specific group, and b)
messages you're replying to, in which case the styles match on the
headers of the original (received) message. I don't think you can do it
based on outgoing message headers. How would gnus know which of the
gnus-posting-style entries were meant to match on outgoing messages, and
which meant to match on replied messages?

I've thought off and on about a wrapper for mail composition, which
would first query you for a few headers, and then set up the message
accordingly. That would provide a place to run hooks like what you want,
but until someone writes that wrapper...

Yours,
Eric




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

* Re: gnus-posting-styles vs compose-mail
  2014-07-31  2:10 ` Eric Abrahamsen
@ 2014-08-02  3:44   ` Kevin Ryde
  2014-08-04  2:12     ` Eric Abrahamsen
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Ryde @ 2014-08-02  3:44 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
> I think no, posting styles won't look at the headers of messages you
> compose.

Hmm, yes, a bit early.

> How would gnus know which of the
> gnus-posting-style entries were meant to match on outgoing messages, and
> which meant to match on replied messages?

Oh, it would have to be some different pattern form or something.
I suppose there's only a few common compose-mail starts.
M-x report-emacs-bug or M-x debian-bug would be main ones.



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

* Re: gnus-posting-styles vs compose-mail
  2014-08-02  3:44   ` Kevin Ryde
@ 2014-08-04  2:12     ` Eric Abrahamsen
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Abrahamsen @ 2014-08-04  2:12 UTC (permalink / raw)
  To: ding

Kevin Ryde <user42_kevin@yahoo.com.au> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>> I think no, posting styles won't look at the headers of messages you
>> compose.
>
> Hmm, yes, a bit early.
>
>> How would gnus know which of the
>> gnus-posting-style entries were meant to match on outgoing messages, and
>> which meant to match on replied messages?
>
> Oh, it would have to be some different pattern form or something.
> I suppose there's only a few common compose-mail starts.
> M-x report-emacs-bug or M-x debian-bug would be main ones.

FWIW, Gnorb has something halfway similar to this with BBDB-based
posting styles. Basically you write a set of posting-style rules,
similar to gnus posting styles but matching on BBDB record fields. That
will set fields on the composed message.

That means it's contact-centric, which isn't what you're asking for. You
need to use `gnorb-bbdb-mail' rather than `bbdb-mail' to make it work.
But the end effect would be similar: eg "Any message composed to a
contact with a 'foo' field value of 'bar', set my outgoing Organization
header to 'baz." Or what have you.

See `gnorb-bbdb-posting-styles' for details.

https://github.com/girzel/gnorb




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

* Re: gnus-posting-styles vs compose-mail
  2014-07-29  8:58 gnus-posting-styles vs compose-mail Kevin Ryde
  2014-07-31  2:10 ` Eric Abrahamsen
@ 2014-09-12 23:55 ` jenia.ivlev
  2014-09-13  8:29   ` Andreas Schwab
  1 sibling, 1 reply; 6+ messages in thread
From: jenia.ivlev @ 2014-09-12 23:55 UTC (permalink / raw)
  To: ding

Hello.

Im having trouble with finding the parent article of a sent message in
"Summary-mode".

I press `^` in the sent folder, summary mode, which is bound to the
function "gnus-summary-refere-parent-article". It tells me "No reference
in article x".

Does anyone know how to fix this?

Thanks in advnace for your kind help and time.
jenia




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

* Re: gnus-posting-styles vs compose-mail
  2014-09-12 23:55 ` jenia.ivlev
@ 2014-09-13  8:29   ` Andreas Schwab
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2014-09-13  8:29 UTC (permalink / raw)
  To: jenia.ivlev; +Cc: ding

jenia.ivlev@gmail.com (jenia.ivlev) writes:

> I press `^` in the sent folder, summary mode, which is bound to the
> function "gnus-summary-refere-parent-article". It tells me "No reference
> in article x".
>
> Does anyone know how to fix this?

If there is no reference then that article has no parent.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

end of thread, other threads:[~2014-09-13  8:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-29  8:58 gnus-posting-styles vs compose-mail Kevin Ryde
2014-07-31  2:10 ` Eric Abrahamsen
2014-08-02  3:44   ` Kevin Ryde
2014-08-04  2:12     ` Eric Abrahamsen
2014-09-12 23:55 ` jenia.ivlev
2014-09-13  8:29   ` Andreas Schwab

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