当我打开特定头文件时,Emacs 崩溃
当我尝试在 Emacs 中打开 SDL 库中名为“SDL_opengl.h”的文件时,我正在深入研究 Linux 中的 SDL 头文件。 由于某种原因,它总是导致它崩溃。 它在 Vim 和 gedit 中打开得很好。
还有其他人遇到过 Emacs 直接拒绝打开特定文件的问题吗? 我应该寻找哪些方面来找出导致问题的原因? 请注意,我能够打开该目录中的所有其他“SDL_*.h”文件; 只是这个给我带来了麻烦。
非常感谢提前!
I was digging through the header files for SDL in Linux when I tried to open the file from the SDL library called "SDL_opengl.h" in Emacs. For some reason, it always causes it to crash. It opens just fine in Vim and in gedit.
Has anyone else had an issue with Emacs just plain refusing to open a particular file? What sort of things should I look for to find what is causing the problem? Mind you, I was able to open every other "SDL_*.h" file in that directory; just that one gives me trouble.
Much appreciated in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
将我的评论转换为答案,因为评论被切断。
尝试加载文件
由于这(似乎)解决了 giogadi 的问题,我认为这可能指向缓冲区的着色。 cc-mode 有自己的着色...
Converting my comment into an answer b/c the comments get cut off.
Try loading the file with
Since this (appears to) resolve the issue for giogadi, I think that points to perhaps the colorization of the buffer. cc-mode does its own colorization...
我有兴趣查看确切的错误消息,以及堆栈跟踪(如果可能)。
我怀疑文件编码、特殊字符、文件大小、cc 模式解析或类似的东西是罪魁祸首。 (ubuntu 9 上的 emacs 22 和 libsdl1.2 与 utf-8 屏幕对我来说效果很好)
I would be interested to see the exact error message, and stack trace if possible.
I suspect file encoding, special characters, file size, cc-mode parsing, or something like that to be the culprit. (emacs 22 and libsdl1.2 on ubuntu 9 with utf-8 screen works fine for me)
天啊,我真是个笨蛋。
所以我显然低估了文件的大小和 Emacs 打开所述大文件的速度。
我决定坐下来等待,看看它是否完全自行消失(而不是我 xkill-ing 它),整整一分钟后,文件被加载。
这样就解决了一个问题——文件正在加载。 但是,为什么 Emacs 需要这么长时间才能完成呢? 我没有启用任何奇怪的设置,这会导致它比平时滞后更多。
Oh goodness, I'm a dunce.
So I apparently underestimated both the size of the file AND the speed of Emacs in opening said large files.
I decided to sit and wait to see if it dies completely on its own (as opposed to me xkill-ing it), and after a whole minute, the file is loaded.
So that solves one problem - the file is being loaded. However, why would Emacs take so long to do it? I have no strange settings enabled that should cause it to lag more than usual.
你开启了 hilit 模式吗?
具有 hilit-auto-highlight-maxout 和巨大的价值?
我在头文件方面也遇到了同样的问题,因此减少该值。
也许是 hs 模式(hideshow 模式)?
have you hilit-mode on?
with hilit-auto-highlight-maxout and a great value?
I have had the same problem with header-files, so reduce that value.
maybe it is hs-mode (hideshow-mode)?