From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/3628 Path: news.gmane.org!not-for-mail From: Frank Schmitt Newsgroups: gmane.emacs.gnus.user Subject: Re: How to write function to operate on marked articles? Date: Mon, 15 Mar 2004 23:47:32 +0100 Organization: Hamme net, kren mer och nimmi Message-ID: References: Reply-To: replies@Frank-Schmitt.net NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669677 19638 80.91.229.2 (31 Jan 2006 01:07:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:07:57 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:32:30 2006 Original-Path: quimby.gnus.org!newsfeed.gazeta.pl!fu-berlin.de!uni-berlin.de!pd9ead6b2.dip0.t-ipconnect.DE!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: pd9ead6b2.dip0.t-ipconnect.de (217.234.214.178) Original-X-Trace: news.uni-berlin.de 1079392794 71209113 I 217.234.214.178 ([73763]) X-Orig-Path: mid.gehheimdienst.de!not-for-mail X-Face: :EL9TzGRN){7|oE2~xQ8Q(VjpjsXgX$~gi&rYD5J5p)$w\Thdl~v:7h`/n)J!8nXT%_+Wj6}@EHM8}QbA(9nX-wrQ:ch1%DauV[?kFasXUcnL#+"K8zOx&$@/M'/},q-eztaJra1|?C+p$h\2XnK-HB"8_U Svend Tollak Munkejord writes: > I have the following function to tell Spamassassin that a message is spam: > > (defun stm-spamassassin-spam () > (interactive) > (gnus-summary-show-raw-article) > (gnus-summary-save-in-pipe "sa-learn --spam"); > (gnus-summary-move-article 1 "nnmaildir:boss" nil nil)) > ; "boss" is Norwegian meaning "rubbish". > > It only works on the current article. Is there a way I can modify this > function to operate on all marked articles in the Summary buffer, one at a > time? Yes, you can use the function gnus-summary-work-articles to get a list of all process-marked articles. Have a look in gnus-summary-move-article for an example. Remember to wrap the code in (eval-after-load 'gnus-sum (...)) -- Did you ever realize how much text fits in eighty columns? If you now consider that a signature usually consists of up to four lines, this gives you enough space to spread a tremendous amount of information with your messages. So seize this opportunity and don't waste your signature with bullshit nobody will read.