简体   繁体   English

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

[英]Emacs 23 on Ubuntu - menus between Tools and Help are broken

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. 我已经在Ubuntu 9.10上成功使用了GNU Emacs 23.1.50.1(x86_64-pc-linux-gnu,GTK +版本2.18.0)。 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. 现在,我安装了一个全新的Ubuntu 11.04,并使用apt-get安装了大多数emacs和相关的emacs插件。

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 现在我的版本是:2011年4月4日的GNU Emacs 23.2.1(x86_64-pc-linux-gnu,GTK +版本2.24.4),由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. 问题是,当我进入任何模式(css,sgml,org,sql,c,text等)时,在“工具”和“帮助”之间的任何菜单都不会显示。 So the main menu item shows (like SQL in sql mode), but when I mouseover it, it does not contain any items. 因此显示了主菜单项(如sql模式下的SQL),但是当我将鼠标悬停在其上时,它不包含任何项。

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. 首先,我认为这是我的.emacs.d中的* .el文件之一,或者是我将其归咎于pymacs绳索模式modemacmacs等。但是后来我从.emacs文件和.emacs.d文件夹中删除了所有文件,有同样的奇怪的事情。 What is extremely weird, is that sometimes, I don't know how, when I start emacs, the problem is gone. 极其奇怪的是,有时我不知道如何在启动emacs时解决问题。 This is like one in 50 tries. 这就像50次尝试中的1次。 I first thought I did something (like when I uninstalled magit), and blame it on that. 我最初以为我做了一些事情(例如卸载magit时),并将其归咎于此。 But then I closed and opened my emacs again, without modifying anything and the menus were broken again. 但是后来我关闭并再次打开我的emacs,没有进行任何修改,菜单又被破坏了。

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. 不,我没有安装回我的.emacs .emacs.d和插件,因为这不是他们的错,例如,我在暂存缓冲区上有一个以“ Complete Lisp symbol”开头的Lisp-Interaction菜单,然后是一个YASnippet空菜单。 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. 如果我切换到.py文件,则“工具”菜单之后的第一个菜单是IM-Python,实际上它具有Lisp-Interaction菜单具有的子菜单项。 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. 因此,当我将鼠标悬停在IM-Python上时,会显示“ Complete Lisp Symbol”,“ Indent-or-Pretty print”等,然后Python,Yashnippet和Rope的其余菜单为空。 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. PS:哦,是的,所以现在我发现了关于stackoverflow的类似问题的答案,因此当我按F10(菜单栏打开)菜单修复时,子菜单项会正确显示。 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. 但是,当我打开一个新文件并想再次使用菜单时,它坏了,必须再次按F10才能工作。 So it's not so bad after all :) but anyway, if you have a clue please let me know. 因此,毕竟还不算太糟:),但是无论如何,如果您有任何线索,请告诉我。

Thanks, Stefan 谢谢,Stefan

Try and duplicate the issue with a plain-vanilla emacs. 尝试使用纯香草emacs复制该问题。 To do that, startup emacs like this: 为此,请像这样启动emacs:

$ 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. 如果是这样,请复制您的.emacs文件,并在该副本中删除其中一半,然后正常重启emacs。 If the problem is there, then cut down your .emacs by half again; 如果问题仍然存在,则将.emacs再减少一半; if it's not there, startup with the other half of the original .emacs file. 如果不存在,请使用原始.emacs文件的另一半启动。 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. 如果当它工作emacs -q --no-site-init被调用,那么就您的Emacs二进制和窗口管理器,这将是一个很大强硬追查之间的相互作用会的东西靠不住的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM