Ubuntu 上的 Emacs 23 - 工具和帮助之间的菜单损坏

发布于 2024-11-08 22:47:26 字数 1828 浏览 5 评论 0原文

我已经使用成功了一段时间 GNU Emacs 23.1.50.1(x86_64-pc-linux-gnu,GTK+ 版本 2.18.0) 在 Ubuntu 9.10 上。具有各种插件和附加功能。

现在我已经安装了一个全新的Ubuntu,即11.04,并且我使用apt-get安装了大部分emacs和相关的emacs插件。

这是我安装的。

i A emacs23                                                                                    - The GNU Emacs editor (with GTK+ user interface)
i A emacs23-bin-common                                                                         - The GNU Emacs editor's shared, architecture dependent files
i A emacs23-common                                                                             - The GNU Emacs editor's shared, architecture independent infrastructure
v   emacs23-gtk                                                                                -
i A emacsen-common 

我现在的版本是: GNU Emacs 23.2.1(x86_64-pc-linux-gnu,GTK+ 版本 2.24.4) 2011-04-04 on crested,由 Debian 修改

问题是,当我进入任何模式(css、sgml、org、sql、c、text 等)时,工具和帮助之间的任何菜单都不会显示。所以主菜单项显示(如 sql 模式中的 SQL),但是当我将鼠标悬停在它上面时,它不包含任何项目。

首先,我认为这是我的 .emacs.d 中的 *.el 文件之一,或者我将其归咎于 pymacs rod rodmode Ropemacs 等。但后来我从我的 .emacs 文件和我的 .emacs.d 文件夹中删除了所有文件,然后我有同样奇怪的事情。 非常奇怪的是,有时,我不知道如何,当我启动 emacs 时,问题就消失了。这大约是 50 次尝试中的一次。我首先以为我做了什么(比如当我卸载 Magit 时),并将其归咎于此。但后来我关闭并再次打开我的 emacs,没有修改任何内容,菜单再次损坏。

不,我安装回了我的 .emacs .emacs.d 和我的插件,因为这不是他们的错,例如,我在暂存缓冲区上有一个以“完整 Lisp 符号”开头的 Lisp 交互菜单,然后是一个 YASnippet 空菜单。 如果我切换到 .py 文件,“工具”菜单之后的第一个菜单是 IM-Python,它实际上具有 Lisp-Interaction 菜单具有的子菜单项。因此,当我将鼠标悬停在 IM-Python 上时,我会看到“Complete Lisp Symbol”、“Indent-or-Pretty print”等,然后其余菜单 Python、Yasnippet、Rope 都是空的。最后一个菜单“帮助”又恢复正常了。

我真的不知道我应该尝试更多什么,或者如何进一步进行调试,我已经与它斗争了几个小时。

PS:哦,是的,所以现在我在 stackoverflow 上发现了类似问题的答案,所以当我按 F10(菜单栏打开)菜单修复时,子菜单项会正确显示。 但是,当我打开一个新文件并想再次使用该菜单时,它就损坏了,必须再次按 F10 才可以使用。所以这毕竟不是那么糟糕:)但无论如何,如果你有线索请告诉我。

谢谢, 斯特凡

I have used succesfully used for some time
GNU Emacs 23.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.18.0)
on Ubuntu 9.10. With all kinds of plugins and additions.

Now I have installed a completely new Ubuntu, that's 11.04, and I installed most of the emacs and related emacs plugins with apt-get.

This is what I have installed.

i A emacs23                                                                                    - The GNU Emacs editor (with GTK+ user interface)
i A emacs23-bin-common                                                                         - The GNU Emacs editor's shared, architecture dependent files
i A emacs23-common                                                                             - The GNU Emacs editor's shared, architecture independent infrastructure
v   emacs23-gtk                                                                                -
i A emacsen-common 

And my version now is:
GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.4)
of 2011-04-04 on crested, modified by Debian

The problem is, that on when I enter any mode (css, sgml, org, sql, c, text, etc), whatever menus I have between Tools and Help do not show. So the main menu item shows (like SQL in sql mode), but when I mouseover it, it does not contain any items.

First, I thought is one of the *.el files I have in my .emacs.d or I blame it on pymacs rope ropemode ropemacs etc. But then I deleted all from my .emacs file and my .emacs.d folder and I have the same strange thing.
What is extremely weird, is that sometimes, I don't know how, when I start emacs, the problem is gone. This is like one in 50 tries. I first thought I did something (like when I uninstalled magit), and blame it on that. But then I closed and opened my emacs again, without modifying anything and the menus were broken again.

No that I installed back my .emacs .emacs.d and my plugins, since it's not their fault, I have for example on scratch buffer a Lisp-Interaction menu beginning with "Complete Lisp symbol" and then a YASnippet empty menu.
If I switch to a .py file, the first menu after the Tools menu is IM-Python, which in fact has the sub-menu items that Lisp-Interaction menu has. So when I hover on IM-Python I get "Complete Lisp Symbol", "Indent-or-Pretty print", etc. and then the rest of menus Python, Yasnippet, Rope are empty. And the last menu, Help, is good again.

I really don't know what should I try more, or how to go further and debug, I've been fighting with it for hours.

PS: oh yeah, so now I discovered an answer on stackoverflow for a similar issue, so when I hit F10 (menu-bar-open) the menu fixes, the submenu items appear correctly.
But when I open a new file and want to use the menu again, it's broken and have to hit F10 again and it works. So it's not so bad after all :) but anyway, if you have a clue please let me know.

Thanks,
Stefan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蛮可爱 2024-11-15 22:47:26

尝试使用普通的 emacs 复制该问题。为此,请像这样启动 emacs:

$ emacs -q --no-site-init

它应该按预期工作。如果是这样,请复制 .emacs 文件,并在副本中删除一半,然后正常重新启动 emacs。如果问题仍然存在,那么将你的 .emacs 再次减少一半;如果不存在,则使用原始 .emacs 文件的另一半启动。起泡沫,冲洗,重复,直到找到使一切变得混乱的有问题的代码。

如果在调用 emacs -q --no-site-init 时它不起作用,那么您的 emacs 二进制文件和窗口管理器之间的交互中就会出现一些奇怪的情况,这将更加难以追踪。

Try and duplicate the issue with a plain-vanilla emacs. To do that, startup emacs like this:

$ emacs -q --no-site-init

It should work as expected. If it does, then make a copy of your .emacs file and in the copy, delete half of it, then restart emacs normally. If the problem is there, then cut down your .emacs by half again; if it's not there, startup with the other half of the original .emacs file. Lather, rinse, repeat until you find the offending code that mucks everything up.

If it does not work when emacs -q --no-site-init is called, then there's something wonky going on in the interaction between your emacs binary and the window manager, which will be a lot tougher to track down.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文