编程语言
首页 > 编程语言> > emacs的正确flymake配置是什么? (使用Python.el)

emacs的正确flymake配置是什么? (使用Python.el)

作者:互联网

我使用emacs作为python IDE.我安装了flymake,但是每当我使用.py文件时它都会显示以下错误

Error (flymake): Flymake: Failed to launch syntax check process ‘pycheckers’ with args (string-operations_flymake.py): Searching for program: no such file or directory, pycheckers. Flymake will be switched OFF

我对flymake的.emacs配置如下:

;; flymake
(add-to-list 'load-path "~/.emacs.d/vendor")
(add-hook 'find-file-hook 'flymake-find-file-hook)
(when (load "flymake" t)
  (defun flymake-pyflakes-init ()
    (let* ((temp-file (flymake-init-create-temp-buffer-copy
               'flymake-create-temp-inplace))
       (local-file (file-relative-name
            temp-file
            (file-name-directory buffer-file-name))))
      (list "pycheckers"  (list local-file))))
   (add-to-list 'flymake-allowed-file-name-masks
             '("\\.py\\'" flymake-pyflakes-init)))
(load "~/.emacs.d/vendor/flymake-cursor.el")
(global-set-key [f10] 'flymake-goto-prev-error)
(global-set-key [f11] 'flymake-goto-next-error)

有关如何解决此问题的任何建议

解决方法:

安装flycheck.应该开箱即用.

标签:python,emacs,elisp,flymake
来源: https://codeday.me/bug/20190520/1143876.html