Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the correct flymake configuration for emacs? (using Python.el)

I am using emacs as python IDE. I am having flymake installed, however, it shows the following error whenever I work with a .py file

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

My .emacs configuration for flymake is as follows:

;; 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)

Any suggestions on how to resolve this

like image 541
Chirag Avatar asked Dec 15 '12 18:12

Chirag


1 Answers

Install flycheck. Should work out of the box.

like image 152
Y.H Wong Avatar answered Oct 02 '22 16:10

Y.H Wong