对此进行跟进 question - 如果我有两个在 emacs 中运行的 python shell,我如何指定将每个 python 脚本缓冲区中的哪些 shell 命令发送到?我怀疑它与 python-buffer
和 python-set-proc
有关,但将这些变量设置为 shell 的名称显然不是解决方案。
编辑:实际上因为我使用的是 python-mode
而不是 loveshack python,它可能与 python-buffer
无关和 python-set-proc
。
最佳答案
您可以将新值设置为 python-buffer
.
(defun my-python-set-proc (buffer-name)
(interactive "B")
(setf python-buffer (get-buffer buffer-name))
(python-set-proc))
然后M-x my-python-set-proc
RET *Python*
返回,
或 M-x my-python-set-proc
RET *Python*<2>
RET.
关于emacs python 模式 : designate which python shell to send commands to,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8282459/