【发布时间】:2012-02-21 16:57:44
【问题描述】:
所以我使用 emacs python wiki(找到 here)上建议的这个包装器,它围绕 pep8、pyflakes 和 pylint 在命令行上工作(在根据“Running python scripts with subprocess in windows. Python code checker wrappers from the emacswiki yield the same error”在 Windows 上设置它的麻烦之后”。
但是,在 emacs 中,flymake 会在有错误的行下划线,但是当我将鼠标悬停时,应该包含错误消息的框是空的。我的初始化文件包含:
(setq pycodechecker "etcwrapper.bat")
(when (load "flymake" t)
(load-library "flymake-cursor")
(defun dss/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\\'" dss/flymake-pycodecheck-init)))
etcwraper.bat 是一个简单的批处理脚本,它在 python 包装脚本上运行 python。为方便起见,我将其放在系统路径中的目录中。 我也可以让flymake只下划一个字符而不是整行吗? 有什么建议吗?
【问题讨论】:
标签: python emacs flymake python-mode