unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* rmail-summary-by-thread splits window in two
@ 2024-01-05 13:58 Andrea Monaco
  2024-01-06 11:08 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Monaco @ 2024-01-05 13:58 UTC (permalink / raw)
  To: emacs-devel


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.



Andrea Monaco



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rmail-summary-by-thread splits window in two
  2024-01-05 13:58 rmail-summary-by-thread splits window in two Andrea Monaco
@ 2024-01-06 11:08 ` Eli Zaretskii
  2024-01-06 17:08   ` Andrea Monaco
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-01-06 11:08 UTC (permalink / raw)
  To: Andrea Monaco; +Cc: emacs-devel

> 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)



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: rmail-summary-by-thread splits window in two
  2024-01-06 11:08 ` Eli Zaretskii
@ 2024-01-06 17:08   ` Andrea Monaco
  2024-01-06 17:31     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Monaco @ 2024-01-06 17:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


  > The patch below seems to fix that, does it look like the right fix?

Yes, it does.  Thanks.



Andrea Monaco



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rmail-summary-by-thread splits window in two
  2024-01-06 17:08   ` Andrea Monaco
@ 2024-01-06 17:31     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-01-06 17:31 UTC (permalink / raw)
  To: Andrea Monaco; +Cc: emacs-devel

> From: Andrea Monaco <andrea.monaco@autistici.org>
> Cc: emacs-devel@gnu.org
> Date: Sat, 06 Jan 2024 18:08:21 +0100
> 
> 
>   > The patch below seems to fix that, does it look like the right fix?
> 
> Yes, it does.  Thanks.

Thanks, installed on the emacs-29 branch.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-06 17:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 13:58 rmail-summary-by-thread splits window in two Andrea Monaco
2024-01-06 11:08 ` Eli Zaretskii
2024-01-06 17:08   ` Andrea Monaco
2024-01-06 17:31     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).