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

Adds better personal configurations to Prelude #1389

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jvillasante
Copy link

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):

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

Thanks!

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 :)
@bbatsov
Copy link
Owner

bbatsov commented Nov 26, 2022

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

@jvillasante
Copy link
Author

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!

@bbatsov
Copy link
Owner

bbatsov commented Nov 28, 2022

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

@jeffbowman
Copy link

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!

@bbatsov
Copy link
Owner

bbatsov commented Dec 14, 2022

@jvillasante Ping :-)

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

Successfully merging this pull request may close these issues.

3 participants