info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Treat article body iff header matches predicate?


From: Damien Collard
Subject: Treat article body iff header matches predicate?
Date: Wed, 20 Mar 2019 11:30:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]