[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6499285: Restore point in summary buffer after sort
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 6499285: Restore point in summary buffer after sorting |
Date: |
Thu, 12 Apr 2018 13:37:54 -0400 (EDT) |
branch: master
commit 6499285898c7e1665fa8ef147002daff04a04b93
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Restore point in summary buffer after sorting
* lisp/gnus/gnus-sum.el (gnus-summary-sort): Keep point on the
current article when sorting (bug#30615).
---
lisp/gnus/gnus-sum.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index e3cc192..cb26240 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -11989,7 +11989,8 @@ Argument REVERSE means reverse order."
(defun gnus-summary-sort (predicate reverse)
"Sort summary buffer by PREDICATE. REVERSE means reverse order."
- (let* ((thread (intern (format "gnus-thread-sort-by-%s" predicate)))
+ (let* ((current (gnus-summary-article-number))
+ (thread (intern (format "gnus-thread-sort-by-%s" predicate)))
(article (intern (format "gnus-article-sort-by-%s" predicate)))
(gnus-thread-sort-functions
(if (not reverse)
@@ -12008,7 +12009,9 @@ Argument REVERSE means reverse order."
;; We do the sorting by regenerating the threads.
(gnus-summary-prepare)
;; Hide subthreads if needed.
- (gnus-summary-maybe-hide-threads)))
+ (gnus-summary-maybe-hide-threads)
+ ;; Restore point.
+ (gnus-summary-goto-subject current)))
;; Summary saving commands.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6499285: Restore point in summary buffer after sorting,
Lars Ingebrigtsen <=