Skip to content

support XDG Base Directory Specification #3589

@thkoch2001

Description

@thkoch2001

The XDG Base Directory Specification proposes where to store configuration, data and cache files. Basically spacemacs config should go to $HOME/.config/spacemacs, cache files to $HOME/.cache/spacemacs and data (like backup files) into $HOME/.local/share/spacemacs.

This scheme has a few advantages:

  • It avoids pollution of $HOME with dotdirs
  • It makes it simpler to thread different kinds of files different: don't backup cache files, make sure all config files are version controlled and auto-committed on change, keep cache files in a ramdisk, ...
  • A user knows immediately which files are configuration files and which ones shouldn't be touched.

It would be nice of course, if spacemacs could add $HOME/.config/spacemacs as a fallback place to look for its configuration.

Maybe you don't want to do this. In this case please make it possible at least to configure spacemacs in the way described above. It would be enough, if I could provide environment variables to override the default directories defined in core-load-paths.el:

spacemacs constant current value why make it configurable
spacemacs-info-directory spacemacs-core-directory "info/" Hopefully there will be distribution packages of spacemacs soon. Then the docs will not be in the users homedir anymore.
spacemacs-release-notes-directory spacemacs-info-directory "release-notes/" see info-directory, also docs, banners?
spacemacs-cache-directory user-emacs-directory ".cache/" for xdg compliance, see above
spacemacs-auto-save-directory spacemacs-cache-directory "auto-save/" that's not cache data but important data to backup and my not reside on a ramdisk

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions