prelude
prelude copied to clipboard
External configuration file
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?
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?
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!
@jvillasante Sorry about the slow response!
I like the idea and a PR would be welcome!
I created https://github.com/bbatsov/prelude/pull/1389
Let me know if I'm missing something.