[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2892b4b: From: Lars Ingebrigtseb <address@hidden>
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 2892b4b: From: Lars Ingebrigtseb <address@hidden> |
Date: |
Thu, 12 Apr 2018 15:20:07 -0400 (EDT) |
branch: master
commit 2892b4b99ca31771b16676d1893456310ae2abc4
Author: Oleg Pykhalov <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
From: Lars Ingebrigtseb <address@hidden>
* lisp/gnus/gnus-sum.el (gnus-summary-limit-to-score): Allow limit
to articles that have a score below the stated number, too
(bug#30356).
---
doc/misc/gnus.texi | 3 ++-
etc/NEWS | 5 +++++
lisp/gnus/gnus-sum.el | 20 ++++++++++++++------
3 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 1a2f6dd..6c16542 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -6672,7 +6672,8 @@ Limit the summary buffer to the unseen articles
@kindex / v @r{(Summary)}
@findex gnus-summary-limit-to-score
Limit the summary buffer to articles that have a score at or above some
-score (@code{gnus-summary-limit-to-score}).
+score (@code{gnus-summary-limit-to-score}). If given a prefix, below
+some score.
@item / p
@kindex / p @r{(Summary)}
diff --git a/etc/NEWS b/etc/NEWS
index 47c77d1..2847384 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -175,6 +175,11 @@ you don't need to set them in your early init file.
*** New function 'package-activate-all'.
+** Gnus
+
+*** A prefix argument to 'gnus-summary-limit-to-score' will limit reverse
+Limit to articles with score at below.
+
** Ecomplete
*** The ecomplete sorting has changed to a decay-based algorithm.
This can be controlled by the new `ecomplete-sort-predicate' variable.
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index cb26240..e1789cd 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -8563,14 +8563,22 @@ Returns how many articles were removed."
(gnus-summary-limit articles))
(gnus-summary-position-point)))
-(defun gnus-summary-limit-to-score (score)
- "Limit to articles with score at or above SCORE."
- (interactive "NLimit to articles with score of at least: ")
+(defun gnus-summary-limit-to-score (score &optional below)
+ "Limit to articles with score at or above SCORE.
+
+With a prefix argument, limit to articles with score at or below
+SCORE."
+ (interactive (list (string-to-number
+ (read-string
+ (format "Limit to articles with score of at %s: "
+ (if current-prefix-arg "most" "least"))))))
(let ((data gnus-newsgroup-data)
- articles)
+ (compare (if (or below current-prefix-arg) #'<= #'>=))
+ articles)
(while data
- (when (>= (gnus-summary-article-score (gnus-data-number (car data)))
- score)
+ (when (funcall compare (gnus-summary-article-score
+ (gnus-data-number (car data)))
+ score)
(push (gnus-data-number (car data)) articles))
(setq data (cdr data)))
(prog1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 2892b4b: From: Lars Ingebrigtseb <address@hidden>,
Lars Ingebrigtsen <=