2014-09-25 30 views
1

我正在轉移到EMACS的cpp開發windows。是的..如何重置emacs主目錄

但我閱讀從把一個;PATH末在路徑變量設置它,並設置HOMEC:\ABC;

老習慣的教程。

所以現在emacs創建了這個ABC;目錄,一切正常。

但它看起來並不好,我..所以我HOME環境變量重置爲C:\ABC並刪除了ABC;文件夾。

但是,而不是emacs創建ABC它開始抱怨沒有ABC;這是不好的。

我查看了註冊表,但沒有發現任何GNU密鑰。 我也看過%appdata但沒有emacs文件夾那裏。

如何重新設置emacs中的HOME目錄?

回答

2

我只是引用了Info文件節點(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'. 
+0

我也很喜歡問問題之前改變了HOME環境變量,但沒有奏效。我應該重新啓動一次。 – 2014-09-25 06:40:34

+1

@AshishNegi如果你想檢查'HOME'是否是你可以從'cmd.exe'嘗試的問題。例如:第一個輸入:'set HOME = c:\ ABC'第二個輸入:'「c:\ Program Files(x86)\ emacs-24.3 \ bin \ runemacs.exe」-Q'在emacs中,您可以鍵入'Mx getenv 主頁' – Tobias 2014-09-25 06:48:55

+0

謝謝我做了壞事..從舊命令提示符啓動runemacs。其中有舊的設置..窗戶... – 2014-09-25 07:04:36