EmacsW32 使用旧的 Windows 缩短文件名重命名缓冲区
让我们看看是否可以联系到 stackoverflow 上的 EmacsW32 用户。
我刚刚从 http://ourcomments.org/Emacs/EmacsW32.html 安装了 EmacsW32 的修补版本
我发现 .txt 文件与 Emacs 关联非常好,这样当您单击一个文件时,emacsclient 就会在运行的 Emacs 实例中打开它。
问题是,由于某种原因,缓冲区被重命名为旧式的缩短文件名,因此,例如,文件“activities-2008.txt”的缓冲区被重命名为“ACTIV~1.TXT”,我不这样做不喜欢。
如何让 EmacsW32 不重命名缓冲区,而是使用整个文件名作为缓冲区名称?
Let's see if I can reach the EmacsW32 users on stackoverflow.
I've just installed the patched version of EmacsW32 from http://ourcomments.org/Emacs/EmacsW32.html
I find it very nice that .txt files are associated wth Emacs, so that when you click on one, emacsclient opens it in the running instance of Emacs.
Problem is, for some reason, the buffer is renamed with the old-style shortened file names, so, for example, the buffer with file "activities-2008.txt" is renamed to "ACTIV~1.TXT", which I don't like.
How do I get EmacsW32 not to rename the buffer, and use the whole file name as the buffer name instead ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
解决了。
问题不在于 emacs,而在于 Windows 在注册表中关联文件类型时运行程序的方式。
在我的注册表中,我将 txt 文件与 Emacs 相关联的键值如下:
问题是 %1,它被短文件名替换。
根据此消息 http://lists. gnu.org/archive/html/help-emacs-windows/2009-05/msg00022.html:
解决方案是使用 %L 代替 %1
Solved.
The problem is not with emacs, but with the way Windows runs a program when a file type is associated in the registry.
In my registry, I had this value for the keys that associate txt files with Emacs:
The problem is the %1, which is replaced by a short file name.
According to this message http://lists.gnu.org/archive/html/help-emacs-windows/2009-05/msg00022.html:
The solution is to use %L in place of %1 in the reg keys.
恶心,真糟糕。
为什么不直接使用标准 Windows emacs 发行版 附带的 emacsclientw 呢?
它确实有一个问题,如果 Emacs 尚未运行,您会收到一个烦人的“无错误”错误框,但任何真正的 emacs 用户在登录时都会首先启动 emacs。 :-)
Ick, that sucks.
Why not just use the emacsclientw that comes with the standard Windows emacs distribution?
It does have a bit of an issue in that you get an annoying "No error" error box if Emacs isn't already running, but any real emacs user starts emacs first thing when they log on anyway. :-)