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

External configuration file #1371

Open
jvillasante opened this issue Jun 11, 2022 · 4 comments
Open

External configuration file #1371

jvillasante opened this issue Jun 11, 2022 · 4 comments

Comments

@jvillasante
Copy link

It would be super nice to be able to have personal configuration on external directories, for example:

    ~/.prelude/
    ~/.config/prelude/

Is that possible today or is it planned for the near future?

@jvillasante
Copy link
Author

So, taken from Rational Emacs this could probably be done by the following:

(defvar prelude-personal-dir
  (cond
   ((featurep 'chemacs)
    (if (getenv  "PRELUDE_PERSONAL_DIR")
        (expand-file-name (getenv "PRELUDE_PERSONAL_DIR"))
      (expand-file-name "personal" prelude-dir)))
   ((getenv "PRELUDE_PERSONAL_DIR") (expand-file-name (getenv "PRELUDE_PERSONAL_DIR")))
   ((or (getenv "XDG_CONFIG_HOME") (file-exists-p (expand-file-name ".config/prelude-personal" (getenv "HOME"))))
    (if (getenv "XDG_CONFIG_HOME")
        (expand-file-name "prelude-personal" (getenv "XDG_CONFIG_HOME"))
      (expand-file-name ".config/prelude-personal" (getenv "HOME"))))
   ((getenv "HOME") (expand-file-name ".prelude-personal" (getenv "HOME"))))
  "The user's prelude personal configuration path.")

That will simplify a lot prelude user personal config files for people that use Chemacs2 and want to keep personal configurations in they dotfiles repo. I know next to nothing about emacs lisp, is anybody else interested in this?

@jvillasante
Copy link
Author

So... I'm waiting for this to take prelude for a ride and hopefully make it my default.
Is anybody interested in something like this?
Should I go ahead and do a PR or something?

I would appreciate a lot a response!

@bbatsov
Copy link
Owner

bbatsov commented Jul 24, 2022

@jvillasante Sorry about the slow response!

I like the idea and a PR would be welcome!

@jvillasante
Copy link
Author

I created #1389

Let me know if I'm missing something.

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

No branches or pull requests

2 participants