* Re: gnus-user-format-function extract from body
[not found] <7er82ou5hf.fsf@rembrandt.fdm.uni-freiburg.de>
@ 2003-09-12 2:40 ` Jesper Harder
[not found] ` <7epti64gvd.fsf@rembrandt.fdm.uni-freiburg.de>
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Harder @ 2003-09-12 2:40 UTC (permalink / raw)
Thomas Gerds <gerds@fdm.uni-freiburg.de> writes:
> i am reading a mailing list where the 'From' header always refers to the
> person who rules the list. the informative 'From' is always the second
> line of the body. can anyone give me an example of an
> gnus-user-format-function that extracts strings from the body?
Something like this:
(defun gnus-user-format-function-y (ignore)
(if gnus-newsgroup-name
(with-temp-buffer
(gnus-request-article-this-buffer number gnus-newsgroup-name)
(gnus-narrow-to-body)
(if (re-search-forward "From \\(.*\\)$" nil t)
(match-string 1)
""))
""))
It'll slow down summary buffer generation a lot, of course.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gnus-user-format-function extract from body
[not found] ` <7epti64gvd.fsf@rembrandt.fdm.uni-freiburg.de>
@ 2003-09-12 14:44 ` Jesper Harder
0 siblings, 0 replies; 2+ messages in thread
From: Jesper Harder @ 2003-09-12 14:44 UTC (permalink / raw)
Thomas Gerds <gerds@fdm.uni-freiburg.de> writes:
> it could also be useful for spam/misc groups where it is interesting
> to know if the first 3 lines contain something such as hi-hello-dear
> my-name before opening -- which can be really slow for some
> html-mails.
It's probably easier to use scoring (where you can score on the body)
for something like this.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-12 14:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <7er82ou5hf.fsf@rembrandt.fdm.uni-freiburg.de>
2003-09-12 2:40 ` gnus-user-format-function extract from body Jesper Harder
[not found] ` <7epti64gvd.fsf@rembrandt.fdm.uni-freiburg.de>
2003-09-12 14:44 ` Jesper Harder
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).