4

I am using Windows 10. I have cloned spacemacs repository inside my %APPDATA% folder. When I launch Emacs for the first time, it asks me usual question about preferring Evil and Helm mode. Then it creates a .spacemacs files in %APPDATA% folder. So far, so good.

Now, I want to use .spacemacs file that I have in my dotfiles repository. To do so, I open up cmd with administrative privileges, and use following command

$ mklink %APPDATA%\.spacemacs %HOMEPATH%\Repos\dotfiles\spacemacs\spacemacs 

It successfully creates a soft linked .spacemacs file. But when I launch Emacs, it asks me again about Evil and Helm mode and overwrites original file, %HOMEPATH%\Repos\dotfiles\spacemacs\spacemacs.

If I instead of creating a soft link, copy spacemacs file from repository to the folder, then Emacs respects the settings in it.

How do I make Emacs to treat this soft linked .spacemacs as a normal configuration?

I have similar setup on macOS where soft link poses no issues.

1 Answer 1

1

Try moving .spacemacs file to .spacemacs.d/init.el and version control that folder directly. Of course this is Unixy so check the docs to see the equivalent Windows names.

https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org

A dotdirectory ~/.spacemacs.d/ can be used instead of a dotfile. If you want to use this option, move ~/.spacemacs to ~/.spacemacs.d/init.el.

It is also possible to override the location of ~/.spacemacs.d/ using the environment variable SPACEMACSDIR. Of course you can also use symlinks to change the location of this directory.

Note: ~/.spacemacs will always take priority over ~/.spacemacs.d/init.el, so ~/.spacemacs must not exist for ~/.spacemacs.d/init.el to be used by Spacemacs.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.