Reputation: 1256
In python-mode (for emacs), hitting Control-C\Control-C will execute the current buffer. However, when execution is finished, the output buffer springs up and splits my editing window in half. This is a complete pain, especially given that there's generally no output in the buffer anyway!
Is there a way to stop the buffer from appearing? Also, how can I send painful electric shocks to the programmer who thought unexpectedly interrupting my train of thought with an empty buffer was a good idea?
Edit: Apparently, there are uses for this behavior, most notably in seeing the output of a program. That's fine, but if there's no output (as in the program with which I'm tinkering), it is really dumb to cut my buffer in half with a blank window.
Upvotes: 6
Views: 2175
Reputation: 21
In recent python-mode.el
that behavior is controlled by a customizable variable:
py-shell-switch-buffers-on-execute
See these links:
Upvotes: 2
Reputation: 5717
What python-mode are you using? Unfortunately, there are several.
Type C-h k and then C-c C-c .. what does it say in the modeline? Does it say "py-execute-buffer" or does it say "python-send-buffer", the first kind indicates you're using Tim Peters' python-mode, while the second indicates you're using Dave Love's python-mode.
I myself prefer Dave Love's python mode, and it's the version that ships with Emacs 23 (and maybe earlier too?). Dave Love's does not pop up the buffer when you run C-c C-c, you have to explicitly switch to the *Python* buffer if you want to see it.
If you're really intent on sticking with Tim Peters' version, you could always put something like the following in your .emacs and you'll never see the output buffer again unless explicitly moved to.
(defadvice py-execute-buffer (after advice-delete-output-window activate)
(delete-windows-on "*Python Output*"))
Upvotes: 6
Reputation: 27936
Don't know how to stop it from popping up, but C-x, 1 will close the window.
Upvotes: 0
Reputation: 42674
You might want to customize the pop-up-windows
variable; that controls the splitting functionality.
Upvotes: 1
Reputation: 18431
Sorry that I can't help you with emacs, but as for your second question, a modified aluminum keyboard from Apple may be a solution:
http://www.apple.com/keyboard/
Upvotes: 2