Whenever I'm in Python mode and do C-c C-c
, I have to answer two questions - firstly, what command to run (which defaults to /usr/bin/python2 -i
for me) and secondly, whether I want a dedicated process. However, I want these things to be the same all the time (namely, use /usr/bin/python2 -i
and not create a dedicated process), and don't want to have to tell Emacs this explicitly every time. How do I set it up so that these are defaults for C-c C-c
, and won't require me to tell Emacs anything extra to just pressing C-c C-c
?
Also, I would like to have Python start in a pop-up frame after the first call to C-c C-c
. I tried code like this:
(setq display-buffer-alist
(quote (("\\*Python\\*" display-buffer-pop-up-frame
(nil)))))
However, this doesn't seem to affect the *Python*
I get from C-c C-c
. What am I missing?
advice-add
function definition is void. Should I call this after or before a particular thing? – Koz Ross Nov 18 '14 at 08:27defadvice
version of the code I just added to my answer. – itsjeyd Nov 18 '14 at 08:31
– Koz Ross Nov 18 '14 at 08:37python-shell-send-buffer: Wrong number of arguments: #[nil "ÆÇ!ÈÉ\"ÆÊ!ÈÉ \"Ë !Ë!Ì2
emacs -Q
(Emacs version 24.4), and it is working for me. – itsjeyd Nov 18 '14 at 08:40