Subject: Re: bug#2282: Bug#2282: rmail-summary splits frame into three parts

From: Stefan Monnier <[email-masked]>
Date: Thu, 12 Nov 2009 10:42:27 -0500

>> I'm tempted to just replace all pop-to-buffers in rmail*.el with
>> 
>> (defun rmail-pop-to-buffer (buffer-or-name &optional other-window norecord)
>> (let (split-width-threshold)
>> (pop-to-buffer buffer-or-name other-window norecord)))

> I suppose the following code in `rmail-new-summary' is responsible for
> the behavior described earlier.

>       (if (and (one-window-p)
> 	       pop-up-windows
> 	       (not pop-up-frames))
> 	  ;; If there is just one window, put the summary on the top.
> 	  (progn
> 	    (split-window (selected-window) rmail-summary-window-size)
> 	    (select-window (next-window (frame-first-window)))
> 	    (pop-to-buffer rmail-summary-buffer)
> 	    ;; If pop-to-buffer did not use that window, delete that
> 	    ;; window.  (This can happen if it uses another frame.)
> 	    (if (not (eq rmail-summary-buffer
> 			 (window-buffer (frame-first-window))))
> 		(delete-other-windows)))
> 	(pop-to-buffer rmail-summary-buffer))

> What is that code supposed to do what a simple `pop-to-buffer' cannot
> accomplish?  If it's to display the summary on top of the frame, then
> splitting horizontally obviously won't make sense here.

Hmm... maybe I misunderstood and the problem may indeed not be in
pop-to-buffer, in the end.

        Stefan