prelude icon indicating copy to clipboard operation
prelude copied to clipboard

Adds better personal configurations to Prelude

Open jvillasante opened this issue 2 years ago • 5 comments

With this change prelude-personal-dir now is decoupled from prelude-dir which allows one to manage them independently.

One should be able to install Prelude with the following command setting different paths for prelude itself and for the user personal configuration.

if [ ! -d "/some/dir/.emacs.prelude" ]; then
	export PRELUDE_INSTALL_DIR="/my_home_dir/.emacs.prelude" &&
		export PRELUDE_PERSONAL_DIR="/my_personal_dotfiles/prelude" &&
		curl -L https://github.com/bbatsov/prelude/raw/master/utils/installer.sh | sh
fi

Alternatively, just git clone ... should also work for the installation step!

After that, Prelude will start loading the configuration from the new path, for example, with https://github.com/plexus/chemacs2

(
    ("prelude" . ((user-emacs-directory . "/my_home_dir/.emacs.prelude")
                     (custom-file . "/my_personal_dotfiles/prelude/custom.el")
                     (env . (("PRELUDE_PERSONAL_DIR" . "/my_personal_dotfiles/prelude"))))))

In this way prelude-personal-dir can live and be managed by the user own dotfiles without interfering with Prelude itself.

This was stolen from Crafted Emacs (https://github.com/SystemCrafters/crafted-emacs) which may or may not be legal :)


Before submitting the PR make sure the following things have been done (and denote this by checking the relevant checkboxes):

  • [X] The commits are consistent with our contribution guidelines
  • [X] You've updated the changelog (if adding/changing user-visible functionality)
  • [X] You've updated the user manual (if adding/changing user-visible functionality like modules, commands, configuration options, etc)

Thanks!

jvillasante avatar Nov 26 '22 16:11 jvillasante

I'm fine with the proposed changes, but this has to be documented - e.g. somewhere in the setup instructions.

bbatsov avatar Nov 26 '22 19:11 bbatsov

Agree but, can you point me in the right direction? I'm pretty new to Prelude, so far only read the Readme.md file and I can only find one mention as a note where this could be relevant as shown below:

**Important:** Don't forget to adjust your `prelude-modules.el` file in your personal directory
once the installation is done. By default most of the modules
that ship with Prelude are **not** loaded.

Please, if you can point me in the right direction on where to write some documentation for this it would be very helpful!

jvillasante avatar Nov 27 '22 14:11 jvillasante

I was thinking of adding something to https://github.com/bbatsov/prelude/blob/master/docs/installation.md

bbatsov avatar Nov 28 '22 06:11 bbatsov

This was stolen from Crafted Emacs (https://github.com/SystemCrafters/crafted-emacs) which may or may not be legal :)

From the Crafted Emacs readme:

This code is licensed under the MIT License. Why? So you can copy the code from this configuration!

jeffbowman avatar Nov 28 '22 20:11 jeffbowman

@jvillasante Ping :-)

bbatsov avatar Dec 14 '22 22:12 bbatsov