Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 设置init.el文件以启动python解释器_Python 3.x_Elisp_Ubuntu 16.04_Emacs24 - Fatal编程技术网

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

Python 3.x 设置init.el文件以启动python解释器,python-3.x,elisp,ubuntu-16.04,emacs24,Python 3.x,Elisp,Ubuntu 16.04,Emacs24,在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-l

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

您可以在钩子中调用runpython,例如

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

(my-startup-layout)