summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-sum.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus/gnus-sum.el')
-rw-r--r--lisp/gnus/gnus-sum.el28
1 files changed, 27 insertions, 1 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 72e902a11f8..2631514e425 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1895,6 +1895,7 @@ increase the score of each group you read."
"\C-c\C-s\C-m\C-n" gnus-summary-sort-by-most-recent-number
"\C-c\C-s\C-l" gnus-summary-sort-by-lines
"\C-c\C-s\C-c" gnus-summary-sort-by-chars
+ "\C-c\C-s\C-m\C-m" gnus-summary-sort-by-marks
"\C-c\C-s\C-a" gnus-summary-sort-by-author
"\C-c\C-s\C-t" gnus-summary-sort-by-recipient
"\C-c\C-s\C-s" gnus-summary-sort-by-subject
@@ -2748,6 +2749,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
["Sort by score" gnus-summary-sort-by-score t]
["Sort by lines" gnus-summary-sort-by-lines t]
["Sort by characters" gnus-summary-sort-by-chars t]
+ ["Sort by marks" gnus-summary-sort-by-marks t]
["Randomize" gnus-summary-sort-by-random t]
["Original sort" gnus-summary-sort-by-original t])
("Help"
@@ -3976,6 +3978,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
;; The group was successfully selected.
(t
(gnus-set-global-variables)
+ (when (boundp 'gnus-pick-line-number)
+ (setq gnus-pick-line-number 0))
(when (boundp 'spam-install-hooks)
(spam-initialize))
;; Save the active value in effect when the group was entered.
@@ -4037,6 +4041,9 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(when kill-buffer
(gnus-kill-or-deaden-summary kill-buffer))
(gnus-summary-auto-select-subject)
+ ;; Don't mark any articles as selected if we haven't done that.
+ (when no-article
+ (setq overlay-arrow-position nil))
;; Show first unread article if requested.
(if (and (not no-article)
(not no-display)
@@ -4941,6 +4948,16 @@ using some other form will lead to serious barfage."
(gnus-article-sort-by-chars
(gnus-thread-header h1) (gnus-thread-header h2)))
+(defsubst gnus-article-sort-by-marks (h1 h2)
+ "Sort articles by octet length."
+ (< (gnus-article-mark (mail-header-number h1))
+ (gnus-article-mark (mail-header-number h2))))
+
+(defun gnus-thread-sort-by-marks (h1 h2)
+ "Sort threads by root article octet length."
+ (gnus-article-sort-by-marks
+ (gnus-thread-header h1) (gnus-thread-header h2)))
+
(defsubst gnus-article-sort-by-author (h1 h2)
"Sort articles by root author."
(gnus-string<
@@ -11925,6 +11942,12 @@ Argument REVERSE means reverse order."
(interactive "P")
(gnus-summary-sort 'chars reverse))
+(defun gnus-summary-sort-by-mark (&optional reverse)
+ "Sort the summary buffer by article marks.
+Argument REVERSE means reverse order."
+ (interactive "P")
+ (gnus-summary-sort 'marks reverse))
+
(defun gnus-summary-sort-by-original (&optional reverse)
"Sort the summary buffer using the default sorting method.
Argument REVERSE means reverse order."
@@ -11970,7 +11993,10 @@ save those articles instead.
The variable `gnus-default-article-saver' specifies the saver function.
If the optional second argument NOT-SAVED is non-nil, articles saved
-will not be marked as saved."
+will not be marked as saved.
+
+The `gnus-prompt-before-saving' variable says how prompting is
+performed."
(interactive "P")
(require 'gnus-art)
(let* ((articles (gnus-summary-work-articles n))