[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rmail-summary-by-thread splits window in two
From: |
Eli Zaretskii |
Subject: |
Re: rmail-summary-by-thread splits window in two |
Date: |
Sat, 06 Jan 2024 13:08:15 +0200 |
> From: Andrea Monaco <andrea.monaco@autistici.org>
> Date: Fri, 05 Jan 2024 14:58:48 +0100
>
>
> When my emacs has a single window with RMAIL-summary, if I run
> rmail-summary-by-thread then the window gets split horizontally in two
> windows that show identically the result.
>
> Can someone replicate? This is harmless, but there's no reason for this
> split, so it seems a little bug.
It's because rmail-summary-by-thread calls rmail-new-summary with the
rmail-buffer the current buffer. The patch below seems to fix that,
does it look like the right fix?
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 30fe75f..cccd702 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -436,19 +436,19 @@ rmail-summary-by-thread
(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)