In python.el there is a command (python-shell-switch-to-shell) that opens an ipython shell.

Problem is, it first asks me where to start the REPL and then whether to make a dedicated process. I always answer <RET> and y. Is there a way to send these signals to emacs automatically?

(I know there are other workarounds, but modifying the python layer in spacemacs is probably too much of a bother.)


I don't get this behavior when I tried running this, but a simple thing to try is C-x ( or kmacro-start-macro. Then enter the three commands, (python-shell-switch-to-shell) <RET>, and y and finish up with C-x ) or kmacro-end-macro.

In the future you can run C-x e to redo that key sequence.

If all that works, then you may want ot go one step further and M-x name-last-kbd-macro will assign a name it, and write it out.

See http://www.gnu.org/software/emacs/manual/html_node/emacs/Basic-Keyboard-Macro.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.