diff options
| author | Oleg Pykhalov | 2018-04-12 21:19:23 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2018-04-12 21:19:23 +0200 |
| commit | 2892b4b99ca31771b16676d1893456310ae2abc4 (patch) | |
| tree | 19470c9cd91bedc112d859aadc1807ee9c7da9a1 | |
| parent | 02f4d79222d9511e03c16540c93b5e26fc2d3ac6 (diff) | |
| download | emacs-2892b4b99ca31771b16676d1893456310ae2abc4.tar.gz emacs-2892b4b99ca31771b16676d1893456310ae2abc4.zip | |
From: Lars Ingebrigtseb <larsi@gnus.org>
* 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).
| -rw-r--r-- | doc/misc/gnus.texi | 3 | ||||
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | 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 1a2f6dd09f1..6c165424dd2 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi | |||
| @@ -6672,7 +6672,8 @@ Limit the summary buffer to the unseen articles | |||
| 6672 | @kindex / v @r{(Summary)} | 6672 | @kindex / v @r{(Summary)} |
| 6673 | @findex gnus-summary-limit-to-score | 6673 | @findex gnus-summary-limit-to-score |
| 6674 | Limit the summary buffer to articles that have a score at or above some | 6674 | Limit the summary buffer to articles that have a score at or above some |
| 6675 | score (@code{gnus-summary-limit-to-score}). | 6675 | score (@code{gnus-summary-limit-to-score}). If given a prefix, below |
| 6676 | some score. | ||
| 6676 | 6677 | ||
| 6677 | @item / p | 6678 | @item / p |
| 6678 | @kindex / p @r{(Summary)} | 6679 | @kindex / p @r{(Summary)} |
| @@ -175,6 +175,11 @@ you don't need to set them in your early init file. | |||
| 175 | 175 | ||
| 176 | *** New function 'package-activate-all'. | 176 | *** New function 'package-activate-all'. |
| 177 | 177 | ||
| 178 | ** Gnus | ||
| 179 | |||
| 180 | *** A prefix argument to 'gnus-summary-limit-to-score' will limit reverse | ||
| 181 | Limit to articles with score at below. | ||
| 182 | |||
| 178 | ** Ecomplete | 183 | ** Ecomplete |
| 179 | *** The ecomplete sorting has changed to a decay-based algorithm. | 184 | *** The ecomplete sorting has changed to a decay-based algorithm. |
| 180 | This can be controlled by the new `ecomplete-sort-predicate' variable. | 185 | 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 cb262406617..e1789cdd599 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -8563,14 +8563,22 @@ Returns how many articles were removed." | |||
| 8563 | (gnus-summary-limit articles)) | 8563 | (gnus-summary-limit articles)) |
| 8564 | (gnus-summary-position-point))) | 8564 | (gnus-summary-position-point))) |
| 8565 | 8565 | ||
| 8566 | (defun gnus-summary-limit-to-score (score) | 8566 | (defun gnus-summary-limit-to-score (score &optional below) |
| 8567 | "Limit to articles with score at or above SCORE." | 8567 | "Limit to articles with score at or above SCORE. |
| 8568 | (interactive "NLimit to articles with score of at least: ") | 8568 | |
| 8569 | With a prefix argument, limit to articles with score at or below | ||
| 8570 | SCORE." | ||
| 8571 | (interactive (list (string-to-number | ||
| 8572 | (read-string | ||
| 8573 | (format "Limit to articles with score of at %s: " | ||
| 8574 | (if current-prefix-arg "most" "least")))))) | ||
| 8569 | (let ((data gnus-newsgroup-data) | 8575 | (let ((data gnus-newsgroup-data) |
| 8570 | articles) | 8576 | (compare (if (or below current-prefix-arg) #'<= #'>=)) |
| 8577 | articles) | ||
| 8571 | (while data | 8578 | (while data |
| 8572 | (when (>= (gnus-summary-article-score (gnus-data-number (car data))) | 8579 | (when (funcall compare (gnus-summary-article-score |
| 8573 | score) | 8580 | (gnus-data-number (car data))) |
| 8581 | score) | ||
| 8574 | (push (gnus-data-number (car data)) articles)) | 8582 | (push (gnus-data-number (car data)) articles)) |
| 8575 | (setq data (cdr data))) | 8583 | (setq data (cdr data))) |
| 8576 | (prog1 | 8584 | (prog1 |