path - Emacs flymake on Mac Yosemite -
flymake in emacs working until update yosemite. it's complaining:
flymake: failed launch syntax check process 'pychecker' args (<filename>_flymake.py): searching program: no such file or directory, pychecker. flymake switched off.
where <filename>
name of file in opened buffer. here's flymake config:
(add-to-list 'load-path "~/.emacs.d/") ;; setup flymake code checking. (require 'flymake) (load-library "flymake-cursor") ;; script flymake uses check code. script must ;; nowadays in scheme path. (setq pycodechecker "pychecker") (when (load "flymake" t) (defun flymake-pycodecheck-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 pycodechecker (list local-file)))) (add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-pycodecheck-init))) (add-hook 'python-mode-hook 'flymake-mode)
here's /usr/local/bin/pychecker
:
#! /bin/sh pyflakes "$1" pep8 --repeat "$1" --max-line-length=80 --ignore=e123,e133,e226,e501 true
here's $path
:
/users/<user>/envs/<venv>/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/x11/bin:/usr/texbin
where <user>
user name , <venv>
active virtual-env.
pychecker
works if run shell.
i start emacs shell typing emacsgui
(alias emacsgui='open -a emacs'
), venv activated. tried opening emacs without venv activated problem still occur. problem?
i solved adding .emacs
file:
(defun set-exec-path-from-shell-path () (let ((path-from-shell (replace-regexp-in-string "[ \t\n]*$" "" (shell-command-to-string "$shell --login -i -c 'echo $path'")))) (setenv "path" path-from-shell) (setq exec-path (split-string path-from-shell path-separator)))) (when (and window-system (eq system-type 'darwin)) ;; when started emacs.app or similar, ensure $path ;; same user see in terminal.app (set-exec-path-from-shell-path))
path virtualenv emacs24 flymake osx-yosemite
No comments:
Post a Comment