EmacsW32重命名具有旧Windows缩短文件名的缓冲区 [英] EmacsW32 renames buffers with old Windows shortened file names

查看:162
本文介绍了EmacsW32重命名具有旧Windows缩短文件名的缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们来看看我是否可以在stackoverflow上访问EmacsW32用户。



我刚从 http://ourcomments.org/Emacs/EmacsW32.html



我发现非常好的.txt文件与Emacs相关联,所以当您点击一个时,emacsclient在Emacs的运行实例中打开它。



问题是,为有些原因,缓冲区被重命名为旧式缩短的文件名,所以例如,具有文件activities-2008.txt的缓冲区被重命名为ACTIV〜1.TXT,我不喜欢。



如何让EmacsW32不要重命名缓冲区,并使用整个文件名作为缓冲区名称?

解决方案

解决。



问题不在于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是长文件名。 

%1是长文件名称IF
*资源管理器可以找到exe文件(看起来不是非常困难)
AND
*文件头称它是Win 95知道Win16 exe,或
*它是一个32位程序

其他%1将是一个简短的名称。

解决方案是使用%L 代替% 1

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 ?

解决方案

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.

这篇关于EmacsW32重命名具有旧Windows缩短文件名的缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆