EmacsW32 使用旧的 Windows 缩短文件名重命名缓冲区

发布于 2024-07-21 00:36:17 字数 436 浏览 9 评论 0原文

让我们看看是否可以联系到 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 技术交流群。

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

发布评论

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

评论(2

真心难拥有 2024-07-28 00:36:18

解决了。

问题不在于 emacs,而在于 Windows 在注册表中关联文件类型时运行程序的方式。

在我的注册表中,我将 txt 文件与 Emacs 相关联的键值如下:

C:\emacs-23.0.91.1\Emacs\bin\emacsclientw.exe -n "%1"

问题是 %1,它被短文件名替换。

根据此消息 http://lists. gnu.org/archive/html/help-emacs-windows/2009-05/msg00022.html

 %L is long file names.

 %1 is long file names IF
 * Explorer can find the exe file (it does not look very hard)
 AND
 * The file header says it is Win 95 aware Win16 exe, or
 * It is a 32 bit program

 Else %1 will be a short name.

解决方案是使用 %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:

C:\emacs-23.0.91.1\Emacs\bin\emacsclientw.exe -n "%1"

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:

 %L is long file names.

 %1 is long file names IF
 * Explorer can find the exe file (it does not look very hard)
 AND
 * The file header says it is Win 95 aware Win16 exe, or
 * It is a 32 bit program

 Else %1 will be a short name.

The solution is to use %L in place of %1 in the reg keys.

少女的英雄梦 2024-07-28 00:36:18

恶心,真糟糕。

为什么不直接使用标准 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. :-)

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