Comment 27 for bug 1018996

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 1018996] Re: inconvenient window splitting behavior

Am 02.01.2013 22:39, schrieb Yaroslav Halchenko:
> On Wed, 02 Jan 2013, Andreas Roehler wrote:
>>> not sure if I should whine here or initiate a new report ;)
>> Hi, thanks for the reports. Providing separate reports might help.
>
> ok -- will do next time
>
>>> so, with 1165 rev, if I open a single buffer with .py file, set
>>> splitting to on (via toggle in the menu), press C-c ! -- I will get then
>>> 3 buffers: code buffer split into two, and then lower one with code
>>> split again to get also *IPython* one. Expected: 2 buffers (original
>>> code buffer + *IPython*).
>> can't get it for the moment, see png.
>> ** Attachment added: "ipython.png"
>> https://bugs.launchpad.net/bugs/1018996/+attachment/3472854/+files/ipython.png
>
> hm... it is even the same emacs version I have ;-)
>
> so -- tried with a clean .emacs -- indeed not reproducible

which indicates some mistake not in pyton-mode.el

>
> trying with my nasty one
> http://git.onerussian.com/?p=etc/emacs.git;a=blob;hb=HEAD;f=.emacs
> it is there
>
> first time it splits (code into two) upon:
>
> Debugger entered--returning value: #<window 3 on 1.py>
> selected-window()
> * split-window-vertically()
> * funcall(split-window-vertically)
> * (progn (funcall py-split-windows-on-execute-function) (display-buffer py-buffer-name (quote display-buffer-reuse-window)))
> * (if (< (count-windows) py-max-split-windows) (progn (funcall py-split-windows-on-execute-function) (display-buffer py-buffer-name ...)) (display-buffer py-buffer-name (quote display-buffer-reuse-window)))
> * (cond ((and ... py-split-windows-on-execute-p ... ...) (when ... ...) (pop-to-buffer py-buffer-name) (display-buffer oldbuf)) ((and ... py-split-windows-on-execute-p ...) (if ... ... ...) (pop-to-buffer oldbuf)) ((or ... ...) (let ... ...)) ((or ... ...) (let ... ... ...)))
> * py-shell-manage-windows(nil t #<buffer 1.py> "*ubp Python*")
> (if done nil (py-shell-manage-windows switch split oldbuf py-buffer-name))
> (unless done (py-shell-manage-windows switch split oldbuf py-buffer-name))
>
>
> and then seems to be within (I pressed c too many times to point exactly I guess ):
>
> Debugger entered--returning value: #<window 165 on *ubp Python*>
> display-buffer("*ubp Python*" display-buffer-reuse-window)
> * (progn (funcall py-split-windows-on-execute-function) (display-buffer py-buffer-name (quote display-buffer-reuse-window)))
> * (if (< (count-windows) py-max-split-windows) (progn (funcall py-split-windows-on-execute-function) (display-buffer py-buffer-name ...)) (display-buffer py-buffer-name (quote display-buffer-reuse-window)))
> * (cond ((and ... py-split-windows-on-execute-p ... ...) (when ... ...) (pop-to-buffer py-buffer-name) (display-buffer oldbuf)) ((and ... py-split-windows-on-execute-p ...) (if ... ... ...) (pop-to-buffer oldbuf)) ((or ... ...) (let ... ...)) ((or ... ...) (let ... ... ...)))
>
> yeap -- that is where 1 more split happens:
>
> Debugger entered--returning value: #<window 91 on 1.py>
> funcall(split-window-sensibly #<window 8 on 1.py>)
> * window--try-to-split-window(#<window 8 on 1.py>)
> * byte-code(\206....
> * display-buffer("*ubp Python*" display-buffer-reuse-window)
>
>
> is it of any help? ;)
>
>

No idea so far. However detected a bug in code.
Recent commit should cure the worst.

Cheers