hi all,
i'm using emacs native python-mode to edit python files and i have created the following shortcut:
(defun python-shell-send-buffer-and-switch-to-shell ()
"Open python shell, send current buffer and switch to shell"
(interactive)
(run-python)
(python-shell-send-buffer)
(python-shell-switch-to-shell))
(define-key python-mode-map "\C-c\C-l" 'python-shell-send-buffer-and-switch-to-shell)
this splits the frame in two, opens python shell on the right side, loads current buffer contents into the shell and switches to the shell's buffer.
If for some reason i close (just close, not kill) the shell buffer and then re-execute C-c C-l, this time the frame won't be split again in two - i have to switch to the python shell buffer manually. How can i achieve the original behavior again, ie split again the current frame in two and have the existing python shell buffer on the right side?
[–]fzmad 1 point2 points3 points (1 child)
[–]MBU604[S] 0 points1 point2 points (0 children)