Emacs Python: Echoing, Hooks and Org-mode

為{幸葍}努か 提交于 2019-12-02 02:45:41

My brief investigation into this shows that python-mode (as found in my Emacs) has no py-shell-hook, so naturally it won't run anything you put in there.

When I looked at python-mode, there are no hooks that it runs, so you are a bit out of luck.

Your best bet it to just make your own command, for exmaple:

(defun alex-python-shell ()
  "Start a python shell my way."
  (interactive)
  (python-shell)
  (python-startup))

If you need to call python-shell interactively, use

(call-interactively 'python-shell)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!