Comment 13 for bug 1478122

Revision history for this message
deuscovrigus@gmail.com (deuscovrigus) wrote :

so far my temporary solution that has the correct window-selection behavior is by keeping py-keep-windows-configuration t and running this function:

(defun run-ipython ()
  "Use compile to run python programs"
  (interactive)
  (py-execute-buffer)
  (display-buffer "*IPython*" t)
)

essentially, display buffer will re-use a window if Ipython shell is present in it, OR bring it forward into one of the windows if Ipython is not visible, without chaning the focus of the buffer where run-ipython is run.

I think this should be the desireable behavior of py-execute-buffer. Obviously this is a hack since here display-buffer looks for the IPython buffer but so far it's good as a temporary kludge.