Flymake 抱怨即使配置为不使用 X,X 也不可用
在文本模式控制台 Emacs 会话中运行 Flymake 模式,我如何告诉 Flymake 在文本控制台中显示其消息而不是尝试与 X 通信?
Emacs 23 可以在各种环境上运行,包括 Debian 和 Ubuntu。
我将 flymake-gui-warnings-enabled
设置为 nil
,但是当我 flymake-display-err-menu-for-current-line
它抱怨道:
X windows are not in use or not initialized
是的,我知道; Emacs 在没有 X 的情况下通过 SSH 连接运行。这就是我禁用 Flymake GUI 使用的原因。我如何告诉 Flymake 不要尝试使用 GUI,而是在 Emacs 窗口中说出它必须说的内容?
Running the Flymake mode in a text-mode console Emacs session, how can I tell Flymake to display its messages in the text console instead of trying to communicate with X?
Emacs 23 running on various environments, including Debian and Ubuntu.
I have flymake-gui-warnings-enabled
set to nil
, but when I flymake-display-err-menu-for-current-line
it complains:
X windows are not in use or not initialized
Yes, I know that; Emacs is running across an SSH connection without X. That's why I disabled GUI use by Flymake. How can I tell Flymake not to try using the GUI, and instead to say what it has to say in the Emacs windows?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我发现“工具提示”错误消息无论如何都很烦人,所以我在
.emacs
中添加了它,它在迷你缓冲区中显示flymake
错误消息。这是我从某处网上得到的东西。它被称为flymake-cursor.el
。功劳属于第一个写它的人。您不需要特定于我用作 Flymake 助手的 Python 工具的 pyflake 位。主要功能是show-fly-err-at-point
,它允许您使用常规光标将鼠标悬停在消息的突出显示行上。I've found the "tooltip" error messages plain annoying anyway so I have this in my
.emacs
that displaysflymake
error messages in the minibuffer. This is something which I got off the net somewhere. It was calledflymake-cursor.el
. Credit belongs to the chap who wrote it first. You don't need the pyflake bits which are specific to the Python tool I use as a flymake helper. The main function isshow-fly-err-at-point
which allows you to use your regular cursor to hover on a highlighted line for the message.这基本上是 Noufal Ibrahim 的答案,但 pyflakes 部分已被删除。更具体地说,我直接使用 Flymake-ler-text 来提取错误的文本部分。我只尝试过 epylint。就像魅力一样。
Here's basically the answer of Noufal Ibrahim but the pyflakes part has been removed. More specifically I'm using flymake-ler-text directly to extract the text part of the error. I've only tried with epylint. Works like a charm.
对早期解决方案的改进。使错误消息的行为更像 eldoc 消息。消息不会最终出现在消息缓冲区中,消息不会闪烁,并且消息不会阻塞其他输出。使用词法作用域变量而不是全局变量。
需要 emacs 24。我相信词法绑定注释必须位于文件的顶部。
我没有独立的存储库,但可以从 我在 github 上的 emacs 配置。
A refinement of earlier solutions. Makes the error messages behave more like eldoc messages. Messages don't end up in the message buffer, messages don't flicker, and messages don't block other output. Uses lexically scoped variables rather than global variables.
Requires emacs 24. I believe the lexical binding comment must go at the top of your file.
I don't have an independent repository for this, but the most up to date version can be got from my emacs config on github.
您可以在以下位置下载更完整的
flymake-cursor.el
版本:http://www.emacswiki.org/emacs/flymake-cursor.el
它有一些优化,确保当您高速移动光标时它不会向您的迷你缓冲区发送垃圾邮件。
You can download a more complete version of
flymake-cursor.el
at:http://www.emacswiki.org/emacs/flymake-cursor.el
It has some optimizations that ensure it doesn't spam your mini-buffer while you cursor around at high speed.