我正在转向使用EMACS进行 windows 中的cpp开发。是的..
但我正在阅读有关设置的教程,并将路径变量中的HOME
设置为C:\ABC;
将;
放在PATH
的末尾。
所以现在emacs创建了这个ABC;
目录,一切正常。
但它对我来说不太好..所以我将HOME
环境变量重置为C:\ABC
并删除了ABC;
文件夹。
但是,而不是创建ABC
的emacs,它开始抱怨没有ABC;
这是坏事。
我查看了注册表,但未找到任何GNU
密钥。
我也调查了%appdata
但没有查看emacs文件夹。
如何重新设置emacs中的HOME
目录?
答案 0 :(得分:2)
我只引用信息文件节点(emacs)Top > Emacs Invocation > Environment > MS-Windows Registry
。我认为第三部分与你最相关。
你有定制吗?如果是这样,请尝试emacs -Q
尝试不使用自定义的emacs。
C.4.3 The MS-Windows System Registry
------------------------------------
On MS-Windows, the installation program `addpm.exe' adds values for
`emacs_dir', `EMACSLOADPATH', `EMACSDATA', `EMACSPATH', `EMACSDOC',
`SHELL' and `TERM' to the `HKEY_LOCAL_MACHINE' section of the system
registry, under `/Software/GNU/Emacs'. It does this because there is
no standard place to set environment variables across different
versions of Windows. Running `addpm.exe' is no longer strictly
necessary in recent versions of Emacs, but if you are upgrading from an
older version, running `addpm.exe' ensures that you do not have older
registry entries from a previous installation, which may not be
compatible with the latest version of Emacs.
When Emacs starts, as well as checking the environment, it also
checks the System Registry for those variables and for `HOME', `LANG'
and `PRELOAD_WINSOCK'.
To determine the value of those variables, Emacs goes through the
following procedure. First, the environment is checked. If the
variable is not found there, Emacs looks for registry keys by that name
under `/Software/GNU/Emacs'; first in the `HKEY_CURRENT_USER' section
of the registry, and if not found there, in the `HKEY_LOCAL_MACHINE'
section. Finally, if Emacs still cannot determine the values,
compiled-in defaults are used.
In addition to the environment variables above, you can also add many
of the settings which on X belong in the `.Xdefaults' file (*note X
Resources::) to the `/Software/GNU/Emacs' registry key.
注意,如果在环境中设置HOME
变量,它将不会出现在注册表中。您必须在环境中重置它。
有关该信息文件的相关部分:
You can override this default value of `HOME' by explicitly setting
the environment variable `HOME' to point to any directory on your
system. `HOME' can be set either from the command shell prompt or from
`Properties' dialog of `My Computer'.