Emacs中来自pylint的无法解析的输出

超电动

我刚刚从Ubuntu 12.04升级到14.04(全新升级,不是就地升级)。

我发现无法像以前一样从emacs(Mx pylint)中调用pylint,因此我安装了python-mode软件包。

现在,我可以从emacs调用pylint,但是即使我使它包含行号(pylint -f parseable foo.py),emacs也无法使用next-error跳转到下一个错误。当我尝试时,我在迷你缓冲区中收到以下错误:

“没有缓冲区包含错误消息位置。”

我将为解决此问题提供任何建议,将不胜感激。谷歌搜索仅显示有关如何使flymake运行pylint的提示,我对此不感兴趣。

作为参考,这是我在emacs的pylint输出窗口中看到的示例:

No config file found, using default configuration /usr/lib/python2.7/dist-packages/pylint/reporters/text.py:79: UserWarning: parseable output format is deprecated. This is equivalent to --msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} 'to --msg-template=%s' % (self.name, self.line_format)) ************* Module video_demo video_demo.py:21: [E0602(undefined-variable), MatplotlibDisplay.__init__] Undefined variable 'figure' video_demo.py:25: [E0602(undefined-variable), MatplotlibDisplay.update] Undefined variable 'axes' video_demo.py:28: [E0602(undefined-variable), MatplotlibDisplay.update] Undefined variable 'figure' video_demo.py:35: [E0213(no-self-argument), VideoDisplay.update] Method should have "self" as first argument video_demo.py:50: [E1103(maybe-no-member),
超电动

通过执行以下操作,我对其进行了修复:

第一步:卸载python-mode Ubuntu软件包。它弊大于利,特别是在制表行为方面。

第二步:将此行添加到我的.emacs文件中:

(require 'tramp)

这摆脱了错误,当调用M-x pylint的的tramp-tramp-p功能是缺失的。显然,这是Ubuntu 14.04的pylint.el副本中的一个错误,此错误已在上游进行了修补(请参见此pull request)。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章