+2003-12-04 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam-report.el (spam-report-gmane): iterate over articles
+ instead of a single one; remove interactive usage
+
2003-12-03 Katsumi Yamaoka <yamaoka@jpl.org>
* dns.el: Fix misplaced eval-when-compile.
spam-report-url-ping-mm-url))
:group 'spam-report)
-(defun spam-report-gmane (article)
+(defun spam-report-gmane (&rest articles)
"Report an article as spam through Gmane"
- (interactive "nEnter the article number: ")
- (when (and gnus-newsgroup-name
- (or (null spam-report-gmane-regex)
- (string-match spam-report-gmane-regex gnus-newsgroup-name)))
- (gnus-message 6 "Reporting spam article %d to spam.gmane.org..." article)
+ (dolist (article articles)
+ (when (and gnus-newsgroup-name
+ (or (null spam-report-gmane-regex)
+ (string-match spam-report-gmane-regex gnus-newsgroup-name)))
+ (gnus-message 6 "Reporting spam article %d to spam.gmane.org..." article)
(if spam-report-gmane-use-article-number
(spam-report-url-ping "spam.gmane.org"
- (format "/%s:%d"
- (gnus-group-real-name gnus-newsgroup-name)
- article))
+ (format "/%s:%d"
+ (gnus-group-real-name gnus-newsgroup-name)
+ article))
(with-current-buffer nntp-server-buffer
(gnus-request-head article gnus-newsgroup-name)
(goto-char (point-min))
(gnus-message 10 "Reporting spam through URL %s..." url)
(spam-report-url-ping host report))
(gnus-message 10 "Could not find X-Report-Spam in article %d..."
- article))))))
+ article)))))))
(defun spam-report-url-ping (host report)
"Ping a host through HTTP, addressing a specific GET resource using
+2003-12-04 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus.texi (SpamAssassin, Fancy Mail Splitting): add
+ save-restriction before (widen) in the example. From Kevin Ryde
+ <user42@zip.com.au>.
+
2003-12-03 Simon Josefsson <jas@extundo.com>
* emacs-mime.texi (Flowed text): Fix.
@lisp
(defun split-on-body ()
(save-excursion
- (widen)
- (goto-char (point-min))
- (when (re-search-forward "Some.*string" nil t)
- "string.group")))
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (when (re-search-forward "Some.*string" nil t)
+ "string.group"))))
@end lisp
@var{function} \e$B$,Av$i$5$l$k$H$-!"%P%C%U%!$O%a%C%;!<%8$NItJ,$K69$a$i$l$^\e(B
-\e$B$9!#$=$l$,!">e5-$NNc$G\e(B @code{save-excursion} \e$B$N8e$G\e(B @code{(widen)} \e$B$,8F\e(B
-\e$B$P$l$kI,MW$,$"$kM}M3$G$9!#$5$i$K\e(B nnimap \e$B%P%C%/%(%s%I$N>l9g!"%G%#%U%)%k%H\e(B
-\e$B$G$O5-;v$N%\%G%#$,%@%&%s%m!<%I$5$l$J$$$3$H$KCm0U$7$F2<$5$$!#$=$l$r$9$k$?\e(B
-\e$B$a$K$O!"\e(B@code{nnimap-split-download-body} \e$B$r\e(B t \e$B$K@_Dj$9$kI,MW$,$"$j$^\e(B
-\e$B$9\e(B (@pxref{Splitting in IMAP})\e$B!#\e(B
+\e$B$9!#$=$l$,>e5-$NNc$G\e(B @code{save-excursion} \e$B$H\e(B @code{save-restriction} \e$B$N\e(B
+\e$B8e$G\e(B @code{(widen)} \e$B$,8F$P$l$kI,MW$,$"$kM}M3$G$9!#$5$i$K\e(B nnimap \e$B%P%C%/%(\e(B
+\e$B%s%I$N>l9g!"%G%#%U%)%k%H$G$O5-;v$N%\%G%#$,%@%&%s%m!<%I$5$l$J$$$3$H$KCm0U\e(B
+\e$B$7$F2<$5$$!#$=$l$r$9$k$?$a$K$O\e(B @code{nnimap-split-download-body} \e$B$r\e(B t \e$B$K\e(B
+\e$B@_Dj$9$kI,MW$,$"$j$^$9\e(B (@pxref{Splitting in IMAP})\e$B!#\e(B
@item (! @var{func} @var{split})
\e$BJ,3d$,%j%9%H$G!":G=i$NMWAG$,\e(B @code{!} \e$B$G$"$k$H\e(B @var{split} \e$B$,<B9T$5$l!"\e(B
@lisp
(defun split-on-body ()
(save-excursion
- (widen)
- (goto-char (point-min))
- (when (re-search-forward "Some.*string" nil t)
- "string.group")))
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (when (re-search-forward "Some.*string" nil t)
+ "string.group"))))
@end lisp
The buffer is narrowed to the message in question when @var{function}
is run. That's why @code{(widen)} needs to be called after
-@code{save-excursion} in the example above. Also note that with the
-nnimap backend, message bodies will not be downloaded by default. You
-need to set @code{nnimap-split-download-body} to t to do that
-(@pxref{Splitting in IMAP}).
+@code{save-excursion} and @code{save-restriction} in the example
+above. Also note that with the nnimap backend, message bodies will
+not be downloaded by default. You need to set
+@code{nnimap-split-download-body} to t to do that (@pxref{Splitting in
+IMAP}).
@item (! @var{func} @var{split})
If the split is a list, and the first element is @code{!}, then
...))
(defun kevin-spamassassin ()
(save-excursion
- (widen)
- (if (eq 1 (call-process-region (point-min) (point-max)
- "spamc" nil nil nil "-c"))
- "spam")))
+ (save-restriction
+ (widen)
+ (if (eq 1 (call-process-region (point-min) (point-max)
+ "spamc" nil nil nil "-c"))
+ "spam"))))
@end lisp
Note that with the nnimap backend, message bodies will not be