From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2985 Path: news.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.user Subject: Re: gnus-user-format-function extract from body Date: Fri, 12 Sep 2003 04:40:50 +0200 Organization: http://purl.org/harder/ Message-ID: References: <7er82ou5hf.fsf@rembrandt.fdm.uni-freiburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669227 17189 80.91.229.2 (31 Jan 2006 01:00:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:00:27 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:31:31 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.gnus X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; Thomas Gerds 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.