【问题标题】:set init.el file to start-up the python interpreter设置 init.el 文件以启动 python 解释器
【发布时间】:2017-01-24 22:36:54
【问题描述】:

在 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 解释器运行正确的窗口。
请问我该怎么做?

【问题讨论】:

    标签: python-3.x elisp ubuntu-16.04 emacs24


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-23
      • 1970-01-01
      • 1970-01-01
      • 2017-03-16
      • 2022-01-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多