Comment 27 for bug 1361535

Revision history for this message
deuscovrigus@gmail.com (deuscovrigus) wrote : Re: [Bug 1361535] Re: py-switch-buffers-on-execute-p is broken. It uses/kills other buffers.

Well anything would be better than manually bringing the python shell to
the buffer of my choice when (py-keep-windows-configuration t) or re-doing
my window setup when (py-split-window-on-execute 'just-two).
Personally, I'd suggest using the same window selection behavior and
splitting behavior of the compile command. Which afais, is split only if
there's one window present and re-use window if more than one window is
present.

Thanks for looking into this Andreas!

-Octi

On Thu, Jul 23, 2015 at 3:10 PM, Andreas Roehler <email address hidden>
wrote:

> ** Changed in: python-mode
> Status: Incomplete => New
>
> ** Changed in: python-mode
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1472620).
> https://bugs.launchpad.net/bugs/1361535
>
> Title:
> py-switch-buffers-on-execute-p is broken. It uses/kills other buffers.
>
> Status in python-mode.el:
> New
>
> Bug description:
> According to documentation, when non-nil py-switch-buffers-on-
> execute-p should switch to the Python output buffer.
>
> In practice the switching does *not* occur into the Python output
> buffer already open, but into any *other* buffer currently opened.
> This implies, that with several windows on the emacs pane opened each
> C-c | command issued will 'eat up' one more window and exchange its
> buffers content with the Python shell until emacs's pane is completely
> fill with many Python shells and a single Python code buffer.
>
> This behavior can be reproduced with the following simple init.el file
>
> ;; load path of most recent python-mode.el from bzr branch lp:python-mode
> (add-to-list 'load-path "~/temporary/py/python-mode/")
>
> (require 'python-mode)
> (add-to-list 'auto-mode-alist '("\\.py$" . python-mode))
>
> (setq py-split-windows-on-execute-p t)
> (setq py-switch-buffers-on-execute-p t)
>
> Once the situation has been reached that emacs's pane is filled with
> many Python shells and a single Python code buffer, issuing the
> command C-c | still leads to a permanent interchange of buffers with
> the Python code file 'wandering' around on emacs's pane.
>
> In the simplest case with only one Python shell and one code buffer
> displayed, there will be a permanent exchange of the buffers location
> on the screen will issuing the command C-c |
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/python-mode/+bug/1361535/+subscriptions
>