1

Maybe I'm being irrational but I really really hate it when a command opens a new window in emacs. I'm using emacs on Ubuntu which came with python-mode and when I start an interpreter with C-c ! it pops up in a new window.

What I want is for emacs to switch to a new buffer in the same window. So far I've tried adding Jython(I set the interpreter to jython) to same-window-buffer-names and even going into python-mode.el and changing switch-to-buffer-other-window calls to switch-to-buffer(which I since changed back). So far I've gotten no change.

I have emacs 23.1.1 and python-mode 5.1.0

Edit: The actual name of the jython buffer is bracketed by asterisks and I don't know how to let stackoverflow know that they aren't styling information.

2
  • Can you be specific about which Emacs version (and maybe with python-mode version) you are using? I don't even have C-c ! in my 22.3.1 GNU version. Commented May 17, 2011 at 1:48
  • Sorry to be gone so long. I have 23.1.1 and python-mode is 5.1.0 Commented May 19, 2011 at 3:33

2 Answers 2

1

current python-mode.el from

http://launchpad.net/python-mode

comes with a customizable variable

py-shell-switch-buffers-on-execute-p

"When non-nil switch to the new Python shell. "

related: py-split-windows-on-execute-p "When non-nil split windows."

Beside commands ending with switch/noswitch allow to ignore the customized or default setting

See menu PyExec

Sign up to request clarification or add additional context in comments.

Comments

0

I use python-mode 5.2.0.

I went into python-mode.el and changed the switch-to-buffer-other-window to switch-to-buffer. I evaluated it and now the interpreter opens up in the same window (regardless of the number of other windows I have).

Did you evaluate the function when you changed the above line?

Btw, opening the interpreter in another window is a feature, not a bug, IMHO. We want to be able to see the interpreter when we evaluate a region of code using C-c | or the buffer using C-c C-c.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.