emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Option to not automatically customize-save-variable `package-selecte


From: Eli Zaretskii
Subject: Re: Option to not automatically customize-save-variable `package-selected-packages'
Date: Fri, 19 Feb 2016 11:31:14 +0200

> From: Joost Kremers <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden, address@hidden
> Date: Thu, 18 Feb 2016 22:49:52 +0100
> 
> >> I think the main difference is that as a user, I can decide *not* to use
> >> Customize to set a particular defcustom. I can use a setq in my init
> >> file instead.
> >
> > Can't you do the same with the list of installed packages?
> 
> Can I? It was my understanding that package.el will write the list of
> user-installed packages to custom-set-variables and there's no way for
> the user to prevent this from happening. A quick look at the code of
> package.el (on emacs-25 and on master) seems to suggest this is indeed
> the case: `package--save-selected-packages' is added to
> `after-init-hook' and the function itself appears to save the package
> list unconditionally.

Is package--save-selected-packages called every time package.el is
invoked, even if the user doesn't change the list of the selected
packages?  If so, this is the problem we must solve -- package.el
shouldn't write anything to user files if nothing's changed in the
selected packages.

Otherwise, the user could install a package, edit their .emacs to
convert the custom-set-variables forms into setq, and then write more
complex Lisp if the init file needs to be shared across different
systems with different collections of packages on each system, like
they have to do with any other customization that is system-dependent.

Will this solve the issue?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]