Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Treat article body iff header matches predicate?
@ 2019-03-20 10:30 Damien Collard
  2019-03-20 11:31 ` Fraga, Eric
  0 siblings, 1 reply; 9+ messages in thread
From: Damien Collard @ 2019-03-20 10:30 UTC (permalink / raw)
  To: info-gnus-english

Hello,

I receive posts from a Discourse forum as e-mails, but their quote
(citation) format has poor readability, so I have written a treatment
function that converts such quotes into the usual e-mail citation
format.

I added this function to `gnus-treatment-function-alist', it is applied
to all parts (associated treatment variable set to t) and it works fine.

Now, currently this treatment is performed regardless of the provenance
of an e-mail, while I'd like it to be performed /iff/ the e-mail is
actually from Discourse.

From "Customizing articles" in Gnus' manual, there is no way to set a
treatment variable so the treatment applies to /both/ header and body.

However, a treatment variable can also be set to a "list where the first
element is not a string", and in that case it is interpreted as a
predicate. I tried using the `from` predicate as available in
`nnmail-split-fancy`, but it isn't recognized.

Is there a way to access the headers from a treatment function?

--
Damien Collard


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

end of thread, other threads:[~2019-03-22 18:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20 10:30 Treat article body iff header matches predicate? Damien Collard
2019-03-20 11:31 ` Fraga, Eric
2019-03-20 12:25   ` Damien Collard
2019-03-20 14:04     ` Fraga, Eric
2019-03-22  7:49   ` Damien Collard
2019-03-22  8:15     ` Adam Sjøgren
2019-03-22  8:51       ` Damien Collard
2019-03-22 12:46       ` Damien Collard
2019-03-22 18:05         ` 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).