1

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?

  • When you say "link", what kind of link did you make? Can you post the output of ls -la ~ | grep emacs? – wvxvw Aug 21 '15 at 9:49
  • I have used ln -s /source /target to create link. – ChillarAnand Aug 21 '15 at 9:53
  • You have created symbolic link. Try hard link instead, that is, invoke ln without -s flag. – Mark Karpov Aug 21 '15 at 9:55
  • @Mark ln: ‘anand/dotfiles/emacs.d’: hard link not allowed for directory – ChillarAnand Aug 21 '15 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? – phils Aug 21 '15 at 9:59
4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.