Fix 'rmail-summary-by-thread'

* 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>.
This commit is contained in:
Eli Zaretskii 2024-01-06 19:30:16 +02:00
parent 2a8c00bfc0
commit 8729a2a10d

View file

@ -436,7 +436,7 @@ 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))
(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)
@ -448,7 +448,7 @@ headers of the messages."
(aref enc-msgs msg)))
(lambda (msg _msgnum)
(aref enc-msgs msg)))
msgnum))))
msgnum)))
;;;###autoload
(defun rmail-summary-by-labels (labels)