gpt4 book ai didi

windows - Windows 10 上 Emacs 的 .emacs.d 文件夹在哪里?

转载 作者:行者123 更新时间:2023-12-03 11:06:02 25 4
gpt4 key购买 nike

.emacs.d在哪里文件夹位于 Windows 10机器?我正在使用 official GNU Emacs for Windows .

我试过 C-h v user-init-file并得到:

user-init-file is a variable defined in ‘C source code’. Its value is "~/.emacs"



但不存在这样的文件夹。

这与 this other question 不同因为这是为 Windows 编译的 Emacs,所以我认为它查找的文件夹与 *NIX 上的文件夹不同。

最佳答案

域名注册地址:
我通过创建一个名为 HOME 的环境变量来解决这个问题。指向我的主目录(对我来说是 C:\Users\kuwze ),其中包含我的 .emacs.d文件夹。

解决这个问题的步骤:
使用 C-h i g 并选择

  • Emacs W32 FAQ: (efaq-w32). FAQs about Emacs on MS Windows.


我能够找到这些有用的信息:

3.5 Where do I put my init file?

On Windows, the ‘.emacs’ file may be called ‘_emacs’ for backward compatibility with DOS and FAT filesystems where filenames could not start with a dot. Some users prefer to continue using such a name due to historical problems various Windows tools had in the past with file names that begin with a dot. In Emacs 22 and later, the init file may also be called ‘.emacs.d/init.el’. Many of the other files that are created by lisp packages are now stored in the ‘.emacs.d’ directory too, so this keeps all your Emacs related files in one place.

All the files mentioned above should go in your ‘HOME’ directory. The ‘HOME’ directory is determined by following the steps below:

  1. If the environment variable ‘HOME’ is set, use the directory it indicates.
  2. If the registry entry ‘HKCU\SOFTWARE\GNU\Emacs\HOME’ is set, use the directory it indicates.
  3. If the registry entry ‘HKLM\SOFTWARE\GNU\Emacs\HOME’ is set, use the directory it indicates. Not recommended, as it results in users sharing the same HOME directory.
  4. If ‘C:.emacs’ exists, then use ‘C:/’. This is for backward compatibility, as previous versions defaulted to ‘C:/’ if ‘HOME’ was not set.
  5. Use the user’s AppData directory, usually a directory called ‘AppData’ under the user’s profile directory, the location of which varies according to Windows version and whether the computer is part of a domain.

    Within Emacs, <~> at the beginning of a file name is expanded to your ‘HOME’ directory, so you can always find your ‘.emacs’ file by typing the command ‘C-x C-f ~/.emacs’.

关于windows - Windows 10 上 Emacs 的 .emacs.d 文件夹在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45888578/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com