]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'rmail-summary-by-thread'
authorEli Zaretskii <eliz@gnu.org>
Sat, 6 Jan 2024 17:30:16 +0000 (19:30 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 13 Jan 2024 18:21:22 +0000 (19:21 +0100)
* lisp/mail/rmailsum.el (rmail-summary-by-thread): Call
'rmail-new-summary' from the original buffer, not from
'rmail-buffer' to avoid failing the logic in 'rmail-new-summary'
that decides whether to pop up a new window.  Reported by Andrea
Monaco <andrea.monaco@autistici.org>.

(cherry picked from commit 8729a2a10d9b8d88f6ba33b5ce62f74d89e7788a)

lisp/mail/rmailsum.el

index 18a36e5f0e9780c0072be5cc905dba3bdc44f54d..48c5cb70b33bc3beac93f472375c2b80ef73edca 100644 (file)
@@ -436,19 +436,19 @@ headers of the messages."
     (unless (and rmail-summary-message-parents-vector
                 (= (length rmail-summary-message-parents-vector)
                    (1+ rmail-total-messages)))
-      (rmail-summary-fill-message-parents-and-descs-vectors))
-    (let ((enc-msgs (make-bool-vector (1+ rmail-total-messages) nil)))
-      (rmail-summary--walk-thread-message-recursively msgnum enc-msgs)
-      (rmail-new-summary (format "thread containing message %d" msgnum)
-                        (list 'rmail-summary-by-thread msgnum)
-                        (if (and rmail-summary-progressively-narrow
-                                 (rmail-summary--exists-1))
-                            (lambda (msg _msgnum)
-                              (and (aref rmail-summary-currently-displayed-msgs msg)
-                                   (aref enc-msgs msg)))
+      (rmail-summary-fill-message-parents-and-descs-vectors)))
+  (let ((enc-msgs (make-bool-vector (1+ rmail-total-messages) nil)))
+    (rmail-summary--walk-thread-message-recursively msgnum enc-msgs)
+    (rmail-new-summary (format "thread containing message %d" msgnum)
+                      (list 'rmail-summary-by-thread msgnum)
+                      (if (and rmail-summary-progressively-narrow
+                               (rmail-summary--exists-1))
                           (lambda (msg _msgnum)
-                             (aref enc-msgs msg)))
-                        msgnum))))
+                            (and (aref rmail-summary-currently-displayed-msgs msg)
+                                 (aref enc-msgs msg)))
+                        (lambda (msg _msgnum)
+                           (aref enc-msgs msg)))
+                      msgnum)))
 
 ;;;###autoload
 (defun rmail-summary-by-labels (labels)