[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9acfb7662c5 2/4: Use completion when mark limiting in gnus summar
From: |
Andrew G Cohen |
Subject: |
master 9acfb7662c5 2/4: Use completion when mark limiting in gnus summary buffers |
Date: |
Fri, 31 Mar 2023 21:58:34 -0400 (EDT) |
branch: master
commit 9acfb7662c5c25fe9bfa7156da9916f58dfde9a5
Author: Andrew G Cohen <cohen@andy.bu.edu>
Commit: Andrew G Cohen <cohen@andy.bu.edu>
Use completion when mark limiting in gnus summary buffers
* lisp/gnus/gnus-sum.el (gnus-summary-limit-to-marks)
(gnus-summary-limit-exclude-marks): Use completing-read to complete on
marks in the current summary buffer.
---
lisp/gnus/gnus-sum.el | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index f13db8d9167..9a632922deb 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -8501,7 +8501,15 @@ If UNREPLIED (the prefix), limit to unreplied articles."
If REVERSE, limit the summary buffer to articles that are marked
with MARKS. MARKS can either be a string of marks or a list of marks.
Returns how many articles were removed."
- (interactive "sMarks: " gnus-summary-mode)
+ (interactive
+ (list
+ (completing-read "Marks:"
+ (let ((mark-list '()))
+ (mapc (lambda (datum)
+ (cl-pushnew (gnus-data-mark datum) mark-list))
+ gnus-newsgroup-data)
+ (mapcar 'char-to-string mark-list)))
+ current-prefix-arg) gnus-summary-mode)
(gnus-summary-limit-to-marks marks t))
(defun gnus-summary-limit-to-marks (marks &optional reverse)
@@ -8510,7 +8518,15 @@ If REVERSE (the prefix), limit the summary buffer to
articles that are
not marked with MARKS. MARKS can either be a string of marks or a
list of marks.
Returns how many articles were removed."
- (interactive "sMarks: \nP" gnus-summary-mode)
+ (interactive
+ (list
+ (completing-read "Marks:"
+ (let ((mark-list '()))
+ (mapc (lambda (datum)
+ (cl-pushnew (gnus-data-mark datum) mark-list))
+ gnus-newsgroup-data)
+ (mapcar 'char-to-string mark-list)))
+ current-prefix-arg) gnus-summary-mode)
(prog1
(let ((data gnus-newsgroup-data)
(marks (if (listp marks) marks