繁体   English   中英

设置init.el文件以启动python解释器

[英]set init.el file to start-up the python interpreter

在ubuntu 16.04 emacs24 python3.5上,我有一个简单的init.el文件,如下所示:

;; Set what python
(setq elpy-rpc-python-command "python3.5")
(setq python-shell-interpreter "python3.5")

;; Set org mode
(eval-after-load "org"
  '(org-babel-do-load-languages
    'org-babel-load-languages
    '((sh . t)
      (python . t)
      (emacs-lisp . t)
      (ditaa . t)
      ))
  )

;; split windows
;; layout definition
(defun my-startup-layout ()
 (interactive)
 (delete-other-windows)
 (split-window-horizontally) ;; -> |
 (next-multiframe-window)

 (dired "~")
)

;; execute the layout
(my-startup-layout )

但是,我希望能够默认使用python解释器运行正确的窗口。
我该怎么办?

您可以在钩子中调用run-python ,例如

(defun my-startup-layout ()
  (delete-other-windows)
  (split-window-horizontally)
  (dired "~")
  (run-python nil nil 'show))

(my-startup-layout)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM