2

I moved .emacs.d folder from home directory to a folder called dot_files so that it will be easy to sync various dot files. From there I have linked it to home so that emacs can load that configuration files. But when I start emacs, it is throwing this warning and not loading it.

Warning (initialization): Unable to create user-emacs-directory' (~/.emacs.d/).

Any data that would normally be written there may be lost!

If you never want to see this message again, customize the variable `user-emacs-directory-warning'.

How can I link emacs config so that it works normally?

7
  • When you say "link", what kind of link did you make? Can you post the output of ls -la ~ | grep emacs? Commented Aug 21, 2015 at 9:49
  • I have used ln -s /source /target to create link. Commented Aug 21, 2015 at 9:53
  • You have created symbolic link. Try hard link instead, that is, invoke ln without -s flag. Commented Aug 21, 2015 at 9:55
  • @Mark ln: ‘anand/dotfiles/emacs.d’: hard link not allowed for directory Commented Aug 21, 2015 at 9:56
  • There should be no need for a hard link. Symlinks usually work fine in this scenario. Perhaps there's a permissions issue? Commented Aug 21, 2015 at 9:59

2 Answers 2

5

Symlinks usually work fine in this scenario, so that's unlikely to be a problem.

You should check the file and directory permissions.

0

A patch which allows you to specify .emacs.d location via `EMACS_USER_DIRECTORY' environment variable is available in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=15539 but it's not yet merged. This should eliminate the need for you to use symlinks.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.