Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support XDG Base Directory Specification #1540

Open
abhigupta912 opened this issue Aug 29, 2019 · 9 comments
Open

Support XDG Base Directory Specification #1540

abhigupta912 opened this issue Aug 29, 2019 · 9 comments

Comments

@abhigupta912
Copy link

The XDG directory spec outlines a standard, user-configurable set of directories defined as environment variables (with defaults).

https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Please add support for configuration files to be placed in $XDG_CONFIG_HOME

@agraven
Copy link
Collaborator

agraven commented Aug 29, 2019

As we try to follow upstream Emacs' behavior as closely as possible, we read and write configuration and data files in the same places that it does. If you want XDG directories, you have to get upstream to go along with it first.

@abhigupta912
Copy link
Author

Thank you for the prompt reply.

Looks like there is some progress being made for supporting XDG base directories in emacs.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=583

@shaleh
Copy link
Collaborator

shaleh commented Aug 29, 2019

Personally, I want --use-this-config /path/to/config to work (fully no qualifiers). Once we get there, support XDG should be easy enough.

@lhanson
Copy link

lhanson commented Sep 5, 2019

Personally, I want --use-this-config /path/to/config to work (fully no qualifiers). Once we get there, support XDG should be easy enough.

Those seem like orthogonal concerns. Why would the ability to override a default make it easier to implement a default?

@shaleh
Copy link
Collaborator

shaleh commented Sep 5, 2019

because having that default would break other people. years of people. So adding an easy way to support both is needed.

@abhigupta912
Copy link
Author

The reasons behind asking for XDG base directory support is to:

  1. Move all the hidden directories in the user home directory to directories defined by a spec.
  2. Allow the user to version control only the config files while keeping all the packages separate.

Spacemacs attempted to support XDG directory spec as part of issue syl20bnr/spacemacs#3589.

Since remacs is a rewrite of emacs, perhaps remacs could adopt a cleaner approach from the start and avoid issues being faced by emacs

Thanks

@shaleh
Copy link
Collaborator

shaleh commented Sep 5, 2019

I support the idea of this. I simply do not want to force it.

@lhanson
Copy link

lhanson commented Sep 5, 2019

I'm not sure I understand why any force is required. If files aren't found in the specified locations, fall back to looking for them in their current locations. New users or users who want control over where their data is stored can specify a preference if they want to override defaults, and existing users never need to know that the specification even exists.

@mrwacky42
Copy link
Contributor

Support added in Emacs 27.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants