From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Option to not automatically customize-save-variable `package-selected-packages' Date: Fri, 19 Feb 2016 17:50:19 +0200 Message-ID: <83si0or96s.fsf@gnu.org> References: <56C43D17.7010009@alice.it> <831t8aufoe.fsf@gnu.org> <8737sp51vx.fsf@gmail.com> <83fuwpubpn.fsf@gnu.org> <87egc9ahav.fsf@fastmail.fm> <834md5u426.fsf@gnu.org> <87vb5l664f.fsf@fastmail.fm> <83mvqxrqql.fsf@gnu.org> <87y4ag3l7s.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455897082 32171 80.91.229.3 (19 Feb 2016 15:51:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Feb 2016 15:51:22 +0000 (UTC) Cc: joostkremers@fastmail.fm, johnw@gnu.org, emacs-devel@gnu.org To: Artur Malabarba Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 19 16:51:16 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aWnKq-0008Tx-QI for ged-emacs-devel@m.gmane.org; Fri, 19 Feb 2016 16:51:12 +0100 Original-Received: from localhost ([::1]:53302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWnKq-0003d1-46 for ged-emacs-devel@m.gmane.org; Fri, 19 Feb 2016 10:51:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWnKH-0003bg-7v for emacs-devel@gnu.org; Fri, 19 Feb 2016 10:50:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWnKG-0005Wu-8C for emacs-devel@gnu.org; Fri, 19 Feb 2016 10:50:37 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWnKC-0005UU-HU; Fri, 19 Feb 2016 10:50:32 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3928 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aWnKB-0001oK-5N; Fri, 19 Feb 2016 10:50:32 -0500 In-reply-to: <87y4ag3l7s.fsf@gmail.com> (message from Artur Malabarba on Fri, 19 Feb 2016 11:04:23 -0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200219 Archived-At: > From: Artur Malabarba > Cc: Joost Kremers , johnw@gnu.org, angelo.graziosi@alice.it, emacs-devel@gnu.org > Date: Fri, 19 Feb 2016 11:04:23 -0200 > > Eli Zaretskii writes: > > > 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? > > No. But it is called every time the list changes (either by installing > or deleting a package). > > > Otherwise, the user could install a package, edit their .emacs to > > convert the custom-set-variables forms into setq, [...] like > > they have to do with any other customization that is system-dependent. > > > > Will this solve the issue? > > No, because package.el will still call `package--save-selected-packages' > even though the variable has been set via `setq'. This will keep > modifying the custom file, and the behaviour will depend on whether when > the variable's value has been most recently set from the `setq' or from > Custom. Then I guess this is the problem we need to solve, right? Customizing the list of packages via Lisp that doesn't use custom-set-variables ought to prevent Emacs from modifying the custom file. > Meanwhile, with regular customizations, the user can just turn the > `custom-set-variables' call into a `setq' and trust that Emacs won't > reintroduce that variable there. Now I'm confused: above you said "No" to my suggestion to do exactly this, but now you seem to say that suggestion would solve the problem? What did I miss?