mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Add new Gnus summary commands and keystrokes for "unseen" navigation
* doc/misc/gnus.texi (Choosing Commands): Document them. * lisp/gnus/gnus-sum.el (gnus-summary-next-unseen-article) (gnus-summary-prev-unseen-article): New commands and keystrokes (bug#35213).
This commit is contained in:
parent
82c79220f5
commit
0695f5383f
3 changed files with 56 additions and 0 deletions
|
|
@ -5347,6 +5347,20 @@ Go to the next article (@code{gnus-summary-next-article}).
|
|||
@findex gnus-summary-prev-article
|
||||
Go to the previous article (@code{gnus-summary-prev-article}).
|
||||
|
||||
@item G u
|
||||
@itemx ]
|
||||
@kindex ] @r{(Summary)}
|
||||
@kindex G u @r{(Summary)}
|
||||
@findex gnus-summary-next-unseen-article
|
||||
Go to the next unseen article (@code{gnus-summary-next-unseen-article}).
|
||||
|
||||
@item G U
|
||||
@itemx [
|
||||
@kindex [ @r{(Summary)}
|
||||
@kindex G U @r{(Summary)}
|
||||
@findex gnus-summary-prev-unseen-article
|
||||
Go to the previous unseen article (@code{gnus-summary-prev-unseen-article}).
|
||||
|
||||
@item G C-n
|
||||
@kindex G C-n @r{(Summary)}
|
||||
@findex gnus-summary-next-same-subject
|
||||
|
|
|
|||
7
etc/NEWS
7
etc/NEWS
|
|
@ -1046,6 +1046,13 @@ Of course it will still find it if you have it in '~/.ecompleterc'.
|
|||
|
||||
** Gnus
|
||||
|
||||
+++
|
||||
*** Two new Gnus summary mode navigation commands have been added,
|
||||
bound to the '[' and ']' keys: `gnus-summary-prev-unseen-article' and
|
||||
`gnus-summary-next-unseen-article'. These take you (respectively) to
|
||||
the previous unseen or next unseen article. (These are the ones that
|
||||
are marked with "." in the summary mode lines.)
|
||||
|
||||
+++
|
||||
*** The Gnus user variable 'nnimap-expunge' supports three new values:
|
||||
'never' for never expunging messages, 'immediately' for immediately
|
||||
|
|
|
|||
|
|
@ -1911,6 +1911,8 @@ increase the score of each group you read."
|
|||
"\M-p" gnus-summary-prev-unread-subject
|
||||
"." gnus-summary-first-unread-article
|
||||
"," gnus-summary-best-unread-article
|
||||
"[" gnus-summary-prev-unseen-article
|
||||
"]" gnus-summary-next-unseen-article
|
||||
"\M-s" gnus-summary-search-article-forward
|
||||
"\M-r" gnus-summary-search-article-backward
|
||||
"\M-S" gnus-summary-repeat-search-article-forward
|
||||
|
|
@ -2088,6 +2090,8 @@ increase the score of each group you read."
|
|||
"\M-p" gnus-summary-prev-unread-subject
|
||||
"f" gnus-summary-first-unread-article
|
||||
"b" gnus-summary-best-unread-article
|
||||
"u" gnus-summary-next-unseen-article
|
||||
"U" gnus-summary-prev-unseen-article
|
||||
"j" gnus-summary-goto-article
|
||||
"g" gnus-summary-goto-subject
|
||||
"l" gnus-summary-goto-last-article
|
||||
|
|
@ -2796,6 +2800,8 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
|
|||
["Previous article same subject" gnus-summary-prev-same-subject t]
|
||||
["First unread article" gnus-summary-first-unread-article t]
|
||||
["Best unread article" gnus-summary-best-unread-article t]
|
||||
["Next unseen article" gnus-summary-next-unseen-article t]
|
||||
["Prev unseen article" gnus-summary-prev-unseen-article t]
|
||||
["Go to subject number..." gnus-summary-goto-subject t]
|
||||
["Go to article number..." gnus-summary-goto-article t]
|
||||
["Go to the last article" gnus-summary-goto-last-article t]
|
||||
|
|
@ -3175,6 +3181,9 @@ The following commands are available:
|
|||
(:type list))
|
||||
number mark pos header level)
|
||||
|
||||
(defun gnus-data-unseen-p (data)
|
||||
(memq (gnus-data-number data) gnus-newsgroup-unseen))
|
||||
|
||||
(define-inline gnus-data-unread-p (data)
|
||||
(inline-quote (= (gnus-data-mark ,data) gnus-unread-mark)))
|
||||
|
||||
|
|
@ -8119,6 +8128,32 @@ Return nil if there are no unread articles."
|
|||
(gnus-summary-first-subject t))
|
||||
(gnus-summary-position-point)))
|
||||
|
||||
(defun gnus-summary-next-unseen-article (&optional backward)
|
||||
"Select the next unseen article."
|
||||
(interactive)
|
||||
(let* ((article (gnus-summary-article-number))
|
||||
(articles (gnus-data-find-list article (gnus-data-list backward))))
|
||||
(when (or (not gnus-summary-check-current)
|
||||
(not (gnus-data-unseen-p (car articles)))
|
||||
(not (gnus-data-unread-p (car articles))))
|
||||
(setq articles (cdr articles)))
|
||||
(while (and articles
|
||||
(or (not (gnus-data-unseen-p (car articles)))
|
||||
(not (gnus-data-unread-p (car articles)))))
|
||||
(setq articles (cdr articles)))
|
||||
(if (not articles)
|
||||
(if backward
|
||||
(message "No previous unseen article")
|
||||
(message "No next unseen article"))
|
||||
(goto-char (gnus-data-pos (car articles)))
|
||||
(gnus-summary-select-article)
|
||||
(gnus-data-number (car articles)))))
|
||||
|
||||
(defun gnus-summary-prev-unseen-article ()
|
||||
"Select the previous unseen article."
|
||||
(interactive)
|
||||
(gnus-summary-next-unseen-article t))
|
||||
|
||||
(defun gnus-summary-first-unseen-subject ()
|
||||
"Place the point on the subject line of the first unseen article.
|
||||
Return nil if there are no unseen articles."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue