开发者

Emacs and the server unsafe error [duplicate]

This question already has answers here: Emacs - Error when calling (server-start) (11 answers) Closed 8 years ago.

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:

  1. Close Emacs
  2. 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)
  3. If there is NO folder ".emacs.d", created one inside /Roaming/. (possily you need to activate the show-hidden-files mode here too.)
  4. Right-Click the folder -> Preferences;
  5. there navigate to the "Security" tab -> click the "Advanced" button
  6. in the new Window navigate to the "owner" tab and click the button "Edit" (or "Change")
  7. Click on your username and click on OK. A warning appears, click ok, you can close all those windows
  8. Go inside the ".emacs.d" folder and if there is NO folder "server" create one.
  9. When you created it, or if there is a folder "server" follow steps 4-7 for that one too.
  10. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜