prosseek
prosseek

Reputation: 190659

PC Emacs error in startup

Following Installing Emacs, I set HOME environment variable to a directory (c:), and make a _emacs file in the directory. It has this one line of code (server-start).

When I execute emacs (GNU Emacs 23.3.1 (i386-mingw-nt6.1.7601)), I get this error message.

Warning (initialization): An error occurred while loading `c:/_emacs':

error: The directory `~/.emacs.d/server' is unsafe

What's wrong with this?

Upvotes: 1

Views: 347

Answers (3)

prosseek
prosseek

Reputation: 190659

Emacs - Error when calling (server-start) has the answer.

"The problem is the ownership of the directory ~/.emacs.d/server when you also have “Administrators” rights on your account. Create the directory ~/.emacs.d/server and set the owner of this directory to your login name and the problem is gone.

Upvotes: 4

Drew
Drew

Reputation: 30701

At the very least, the message is not clear enough. Probably, Emacs should not simply barf this way. In any case, my advice would be to use M-x report-emacs-bug to let the Emacs developers know about this. Hopefully they will address the problem one way or another -- at least provide a more helpful message to users.

Upvotes: 0

BillRobertson42
BillRobertson42

Reputation: 12883

Are you running on Windows 7 (or perhaps Vista)? At some point after XP, Windows decided that putting things in c:\ is a no-no. I guess for security reasons. If you don't set a home environment variable, then emacs will look for your .emacs in c:\users\yourname\appdata\roaming (or something like that - Win 7 machine w/emacs is at work, can't check exactly). You can also create your .emacs.d directory there too if you want.

Upvotes: 1

Related Questions