From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.bugs Subject: bug#22727: Managing packages writes the user init file Date: Thu, 18 Feb 2016 19:49:15 +0100 Message-ID: <56C6122B.4050903@alice.it> References: <56C51520.6020205@alice.it> <8337squfpy.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1455821429 6448 80.91.229.3 (18 Feb 2016 18:50:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Feb 2016 18:50:29 +0000 (UTC) Cc: 22727@debbugs.gnu.org, johnw@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 18 19:50:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1aWTeX-0006VL-8U for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Feb 2016 19:50:13 +0100 Original-Received: from localhost ([::1]:44429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTeW-0006a0-In for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Feb 2016 13:50:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTeQ-0006U5-1Q for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 13:50:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWTeM-000343-Ra for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 13:50:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTeM-00033z-Ne for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 13:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aWTeM-0002DO-Fo for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 13:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Angelo Graziosi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Feb 2016 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22727 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22727-submit@debbugs.gnu.org id=B22727.14558213738476 (code B ref 22727); Thu, 18 Feb 2016 18:50:02 +0000 Original-Received: (at 22727) by debbugs.gnu.org; 18 Feb 2016 18:49:33 +0000 Original-Received: from localhost ([127.0.0.1]:33194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWTdt-0002Ce-5b for submit@debbugs.gnu.org; Thu, 18 Feb 2016 13:49:33 -0500 Original-Received: from smtp201.alice.it ([82.57.200.97]:1981) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWTdr-0002CN-1u for 22727@debbugs.gnu.org; Thu, 18 Feb 2016 13:49:31 -0500 Original-Received: from [192.168.1.101] (79.19.230.242) by smtp201.alice.it (8.6.060.43) (authenticated as angelo.graziosi@alice.it) id 5697AF2907552191; Thu, 18 Feb 2016 19:49:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <8337squfpy.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113251 Archived-At: I opened this bug report because John asked me: http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00989.html The problem here is NOT that when one customizes something this is saved in the init file but that also when one does not customize anything, the init file is changed, more or less silently. For example clicking Options -Manage Emacs packages. Emacs did not exhibit this behavior some time ago (an year? two?) Maybe you have to reread the full thread starting here: http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg00958.html If you think is right that an application changes the user init file, more or less silently, you can close this bug. Angelo Il 18/02/2016 17:48, Eli Zaretskii ha scritto: >> From: Angelo Graziosi >> Date: Thu, 18 Feb 2016 01:49:36 +0100 >> >> I have noticed that just using >> >> Options - Manage Emacs Packages >> >> writes my init file. For example I find these additions in my case: >> >> (custom-set-variables >> ;; custom-set-variables was added by Custom. >> ;; If you edit it by hand, you could mess it up, so be careful. >> ;; Your init file should contain only one such instance. >> ;; If there is more than one, they won't work right. >> '(package-selected-packages (quote (tabbar-ruler sr-speedbar)))) >> (custom-set-faces >> ;; custom-set-faces was added by Custom. >> ;; If you edit it by hand, you could mess it up, so be careful. >> ;; Your init file should contain only one such instance. >> ;; If there is more than one, they won't work right. >> ) >> >> I discovered this only casually.. >> >> I think this is not the right thing to do. Why an application should write a file which belongs to the user? > > This is how Custom behaves since ages ago: when you save > customizations, it writes such forms into your ~/.emacs. The use case > with package managing is therefore not special in any way; rather, you > are proposing to divert the customizations made by Custom to a > separate file. We already have an option to do that, named > 'custom-file'; see the node "Saving Customizations" in the Emacs User > Manual. Is that option sufficient to solve your problem in this bug > report? If not, can you tell why not? > > It is possible that your objection is somehow limited to what > package.el does, but, as written, it describes a much more broad class > of functionalities, and is not specific to package.el. > > For the record, the reason why customizations are by default saved in > ~/.emacs is that originally the idea was to teach users how to use > Lisp for customizing Emacs, so that users could progressively migrate > from using Custom to writing their own Lisp, as they gain proficiency. > I don't think we've abandoned this idea, even though I'm not sure it > is working as planned. >