aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Cohen2010-12-08 14:41:37 +0000
committerKatsumi Yamaoka2010-12-08 14:41:37 +0000
commit71044abebeccebe885f3540e3fd4a27a1f7d6537 (patch)
treee1224cd3e549953c5fcb961bc3d4183582e95a05
parent47ac61706b71dcb0903e366a927c7d707d3f5eab (diff)
downloademacs-71044abebeccebe885f3540e3fd4a27a1f7d6537.tar.gz
emacs-71044abebeccebe885f3540e3fd4a27a1f7d6537.zip
nnir.el (nnir-request-expire-articles): New function.
-rw-r--r--lisp/gnus/ChangeLog1
-rw-r--r--lisp/gnus/nnir.el19
2 files changed, 20 insertions, 0 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 25dd77cdf77..9ce574f0cc9 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -3,6 +3,7 @@
3 * nnir.el (nnir-retrieve-headers): Use rassq when comparing article 3 * nnir.el (nnir-retrieve-headers): Use rassq when comparing article
4 ids. 4 ids.
5 (nnir-run-gmane): Simplify groupspec formatting. 5 (nnir-run-gmane): Simplify groupspec formatting.
6 (nnir-request-expire-articles): New function.
6 7
72010-12-07 Lars Magne Ingebrigtsen <larsi@gnus.org> 82010-12-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
8 9
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
index 0a67f88f238..726b01564e7 100644
--- a/lisp/gnus/nnir.el
+++ b/lisp/gnus/nnir.el
@@ -687,6 +687,25 @@ Add an entry here when adding a new search engine.")
687 to-newsgroup ; Not respooling 687 to-newsgroup ; Not respooling
688 (gnus-group-real-name to-newsgroup))))) 688 (gnus-group-real-name to-newsgroup)))))
689 689
690(deffoo nnir-request-expire-articles (articles group &optional server force)
691 (let ((articles-by-group (nnir-categorize
692 articles nnir-article-group nnir-article-ids))
693 not-deleted)
694 (while (not (null articles-by-group))
695 (let* ((group-articles (pop articles-by-group))
696 (artgroup (car group-articles))
697 (articleids (cadr group-articles))
698 (artlist (sort (mapcar 'cdr articleids) '<)))
699 (unless (gnus-check-backend-function 'request-expire-articles
700 artgroup)
701 (error "The group %s does not support article deletion" artgroup))
702 (unless (gnus-check-server (gnus-find-method-for-group artgroup))
703 (error "Couldn't open server for group %s" artgroup))
704 (push (gnus-request-expire-articles
705 artlist artgroup force)
706 not-deleted)))
707 (sort (delq nil not-deleted) '<)))
708
690(deffoo nnir-warp-to-article () 709(deffoo nnir-warp-to-article ()
691 (let* ((cur (if (> (gnus-summary-article-number) 0) 710 (let* ((cur (if (> (gnus-summary-article-number) 0)
692 (gnus-summary-article-number) 711 (gnus-summary-article-number)