Emacs and the server unsafe error [duplicate]
I have the GNU Emacs version 23.2.1, installed on Windows Server 2003
When I run Emacs I have this message: Warning (initialization): An error occurred while loading `c:/.emacs':
error: The directory `c:/.emacs.d/server' is unsafe
As suggested in a thread, I added this line in my .emacs
:
(and (= emacs-major-version 23) (de开发者_JAVA技巧fun server-ensure-safe-dir (dir) "Noop" t))
I thought that this problem was solved in the 23.2 version ?
Ok, I am running Emacs24 (Emacs 24.0. ...) on Windows 7 x64. I had the same problem until I found this post on the Email list.
walkthrough:
- Close Emacs
- Navigate in Windows Explorer to USERNAME/AppData/Roaming/ (if you can't find the folder you have to activate "show hidden files", you do that clicking in the menu on "Organise" -> "Folder and File Options" -> "View" (or similar) -> here uncheck the box that says not to show hidden files)
- If there is NO folder ".emacs.d", created one inside /Roaming/. (possily you need to activate the show-hidden-files mode here too.)
- Right-Click the folder -> Preferences;
- there navigate to the "Security" tab -> click the "Advanced" button
- in the new Window navigate to the "owner" tab and click the button "Edit" (or "Change")
- Click on your username and click on OK. A warning appears, click ok, you can close all those windows
- Go inside the ".emacs.d" folder and if there is NO folder "server" create one.
- When you created it, or if there is a folder "server" follow steps 4-7 for that one too.
- Run Emacs happily ever after.
For me that fixed all problems. This fix was written a few times around the web but no one seemed to have mentioned to apply this to both folders. Hope it helps!
Check if you are the owner of "C:/.emacs.d/server" and see if running emacs as the owner of "c:/.emacs.d/server/" solves it.
Read here, and from emacswiki, not sure about which version has the issue fixed.
精彩评论