【问题标题】:EmacsW32 renames buffers with old Windows shortened file namesEmacsW32 使用旧的 Windows 缩短文件名重命名缓冲区
【发布时间】:2009-05-21 13:28:46
【问题描述】:

让我们看看我是否可以在 stackoverflow 上联系到 EmacsW32 用户。

我刚刚从 http://ourcomments.org/Emacs/EmacsW32.html 安装了 EmacsW32 的补丁版本

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

问题是,由于某种原因,缓冲区被重命名为旧式缩短文件名,因此,例如,文件“activities-2008.txt”的缓冲区被重命名为“ACTIV~1.TXT”,我不喜欢。

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

【问题讨论】:

  • 我是 EmacsW32 用户,我无法重现这一点,我得到了缓冲区的完整文件名。我的版本是 LENNART-69DE564(已修补)上 2007-05-23 的 GNU Emacs 22.0.990.1 (i386-mingw-nt5.1.2600),EmacsW32 版本是 1.54。也许你的 .emacs 中的某些东西导致了这种情况?

标签: emacs emacsw32


【解决方案1】:

哎呀,太糟糕了。

为什么不直接使用标准Windows emacs distribution自带的emacsclientw?

它确实有一点问题,如果 Emacs 尚未运行,您会收到一个烦人的“无错误”错误框,但任何真正的 emacs 用户在他们登录时都会首先启动 emacs。 :-)

【讨论】:

    【解决方案2】:

    解决了。

    问题不在于 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 代替 reg 键中的 %1

    【讨论】:

      猜你喜欢
      • 2023-03-14
      • 1970-01-01
      • 1970-01-01
      • 2023-03-11
      • 2018-01-13
      • 1970-01-01
      • 1970-01-01
      • 2023-01-24
      • 2016-04-11
      相关资源
      最近更新 更多