GNU bug report logs -
#583
Use XDG basedir spec for configuration files?
Previous Next
Full log
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
The XDG Base Directory
Specification<http://standards.freedesktop.org/basedir-spec/>provides
some common paths in user's home to store personal application
configurations, or, using their own words "*defines where these files should
be looked for by defining one or more base directories relative to which
files should be located*".
XDG Base Directory Specification allows efficient backup, in which you can
easily choose to backup your data and/or your configuration files for
instance. An application could easily propose such backup for the whole
system if all applications were matching these specification.
Therefore, although I think that this bug/enhancement is not vital, it would
be great for Emacs to be "FreeDesktop XDG Base Directory Specification"
compliant.
Currently Emacs is using "$HOME/.emacs.d/". This is what XDG basedir spec
defines:
- $XDG_DATA_HOME (usually $HOME/.local/share/) as "*the base directory
relative to which user specific data files should be stored*"
- $XDG_CONFIG_HOME (usually $HOME/.config/) as "*the base directory
relative to which user specific configuration files should be stored*"
- $XDG_CACHE_HOME (usually $HOME/.cache/) as "*the base directory
relative to which user specific non-essential data files should be stored
*"
(http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html)
In order to make Emacs XDG basedir compliant, I think that it would be nice
to use:
- $XDG_CONFIG_HOME/emacs ;;for "init.el" and storing customize
configuration
- $XDG_DATA_HOME/emacs ;;for sessions and backups
- $XDG_CACHE_HOME/emacs ;;for cache files
Or maybe some other distribution. What do you think about it?
There's a small C library that may be useful check it out, written for the
sole purpose of xdg basedir spec compliance:
https://n.ethz.ch/student/nevillm/download/libxdg-basedir/
[Message part 2 (text/html, inline)]
This bug report was last modified 5 years and 314 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.