[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: package-autoremove ?
From: |
David Masterson |
Subject: |
Re: package-autoremove ? |
Date: |
Fri, 25 Aug 2023 18:50:43 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Philip Kaludercic <philipk@posteo.net> writes:
> The :ensure keyword for use-package should select the packages, since it
> invokes `package-install' without setting the optional DONT-SELECT
> argument (use-package-ensure.el):
>
> ...
> (if (assoc package package-archive-contents)
> (package-install package)
> (package-refresh-contents)
> (when (assoc package (bound-and-true-p
> package-pinned-packages))
> (package-read-all-archive-contents))
> (package-install package))
> ...
>
>
> What might be an issue, is that package-install tries to save the
> modification of `package-selected-packages' to disk (package.el):
Save it to "custom-file" which might be nil (.emacs). Didn't know about
custom-file...
> (if after-init-time
> (customize-save-variable 'package-selected-packages
> package-selected-packages)
> (add-hook 'after-init-hook #'package--save-selected-packages))
>
> Now if you have customised `custom-file' and/or don't load the contents
> of the file, then upon restarting Emacs the updated value would be lost
> and package-autoremove would suggest removing all the packages installed
> by use-package (but also package-install, for that matter).
What happens if custom-file (.emacs) is already loaded in a buffer? I
thought, if you customize something (via the GUI?), the custom-file
(.emacs) would be loaded into a buffer (unless it's already in a buffer)
and the custom-variables would be updated. When you exit Emacs, the
file would be saved.
--
David Masterson
- package-autoremove ?, David Masterson, 2023/08/22
- Re: package-autoremove ?, Rudolf Schlatte, 2023/08/22
- Re: package-autoremove ?, David Masterson, 2023/08/25
- Re: package-autoremove ?, Philip Kaludercic, 2023/08/25
- Re: package-autoremove ?, Tassilo Horn, 2023/08/25
- Re: package-autoremove ?, Philip Kaludercic, 2023/08/25
- Re: package-autoremove ?, Tassilo Horn, 2023/08/25
- Re: package-autoremove ?, Tassilo Horn, 2023/08/25
- Re: package-autoremove ?, David Masterson, 2023/08/25
- Re: package-autoremove ?,
David Masterson <=
- Re: package-autoremove ?, Philip Kaludercic, 2023/08/26