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

Should straight delete the /elpa folder? #663

Closed
countvajhula opened this issue Dec 29, 2020 · 3 comments
Closed

Should straight delete the /elpa folder? #663

countvajhula opened this issue Dec 29, 2020 · 3 comments
Labels

Comments

@countvajhula
Copy link

Hi there, this is a great package!

I migrated my config to straight and discovered that there were still packages found to be missing in a new environment. It turned out that this was because the /elpa directory still contained all of the locally installed packages in the original environment, some of which weren't indicated in the init config.

Should straight do one of the following:

  1. delete the /elpa folder, or, as this may be too invasive,
  2. unset the package-user-dir variable in some way, maybe by setting it to nil, since it looks like this path is used by Emacs to find packages (and is set to ~/.emacs.d/elpa by default)
  3. document some other appropriate manual way to handle this
@progfolio
Copy link
Contributor

Good question.
I agree that deleting the folder may be a bit much. Say someone just wants to try straight, but decides they like their previous set-up better. A combination of 2 & 3 sound reasonable to me.

@raxod502
Copy link
Member

Disabling package.el is already done automatically out of the box by straight.el. However, if you're using Emacs 27 or more recent, then package.el is initialized before loading the init-file, which bypasses this mechanism. In that case, you should put

(setq package-enable-at-startup nil)

into early-init.el. See https://www.gnu.org/software/emacs/manual/html_node/emacs/Early-Init-File.html for docs on the early init-file.

The informational content of this comment should be part of the official straight.el documentation; see #420.

progfolio added a commit to progfolio/straight.el that referenced this issue Dec 29, 2020
Recommend setting package-enable-at-startup to nil in early-init.
Closes: radian-software#420, radian-software#663
@countvajhula
Copy link
Author

I've confirmed that adding that line in early-init.el prevents the contents of /elpa from being used locally 👍

I also added this step to this blog post on the subject (please let me know if I missed anything 🧛 ).

progfolio added a commit that referenced this issue Dec 30, 2020
Recommend setting package-enable-at-startup to nil in early-init.
Closes: #420, #663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants