prelude icon indicating copy to clipboard operation
prelude copied to clipboard

External configuration file

Open jvillasante opened this issue 2 years ago • 4 comments

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 avatar Jun 11 '22 17:06 jvillasante

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 avatar Jun 13 '22 16:06 jvillasante

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 avatar Jun 15 '22 16:06 jvillasante

@jvillasante Sorry about the slow response!

I like the idea and a PR would be welcome!

bbatsov avatar Jul 24 '22 06:07 bbatsov

I created https://github.com/bbatsov/prelude/pull/1389

Let me know if I'm missing something.

jvillasante avatar Nov 26 '22 16:11 jvillasante