diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2017-01-27 00:03:41 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2017-01-27 00:30:54 +0100 |
commit | a3b6d8e2ebf06f8d9b95e7b47894c8287cdcb15f (patch) | |
tree | 3c97dbe59e3b4eaf6b3d5d4f7f97f9edea5ff449 /lisp | |
parent | f15bbbec0b11be7bbcde83cf905875b61f24e8bb (diff) | |
download | emacs-a3b6d8e2ebf06f8d9b95e7b47894c8287cdcb15f.tar.gz |
Add new command gnus-article-sort-by-marks
* doc/misc/gnus.texi (Summary Sorting): Mention
gnus-summary-sort-by-marks.
* lisp/gnus/gnus-sum.el (gnus-article-sort-by-marks): New
function (bug#23393).
(gnus-thread-sort-by-marks): Ditto.
(gnus-summary-sort-by-mark): New command suggested by Dan Jacobson.
(gnus-summary-mode-map): Add keystroke.
(gnus-summary-make-menu-bar): Add to menu.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/gnus/gnus-sum.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 4390a2c07d6..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" @@ -4946,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< @@ -11930,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." |