From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22727: Managing packages writes the user init file Date: Thu, 18 Feb 2016 18:48:41 +0200 Message-ID: <8337squfpy.fsf@gnu.org> References: <56C51520.6020205@alice.it> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1455814176 7110 80.91.229.3 (18 Feb 2016 16:49:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Feb 2016 16:49:36 +0000 (UTC) Cc: 22727@debbugs.gnu.org To: Angelo Graziosi Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 18 17:49:25 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 1aWRlX-0006Xz-GE for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Feb 2016 17:49:19 +0100 Original-Received: from localhost ([::1]:43018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWRlT-00005x-I3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Feb 2016 11:49:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWRlK-0008NZ-My for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 11:49:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWRlG-0005Z0-Li for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 11:49:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWRlG-0005YS-Ib for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 11:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aWRlG-00067z-05 for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 11:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Feb 2016 16:49:01 +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.145581411923520 (code B ref 22727); Thu, 18 Feb 2016 16:49:01 +0000 Original-Received: (at 22727) by debbugs.gnu.org; 18 Feb 2016 16:48:39 +0000 Original-Received: from localhost ([127.0.0.1]:33133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWRks-00067I-TR for submit@debbugs.gnu.org; Thu, 18 Feb 2016 11:48:39 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38988) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWRkq-000674-RR for 22727@debbugs.gnu.org; Thu, 18 Feb 2016 11:48:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWRkh-0005Jt-Sz for 22727@debbugs.gnu.org; Thu, 18 Feb 2016 11:48:31 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWRkh-0005Jp-Pz; Thu, 18 Feb 2016 11:48:27 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1842 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aWRkf-00007m-0g; Thu, 18 Feb 2016 11:48:25 -0500 In-reply-to: <56C51520.6020205@alice.it> (message from Angelo Graziosi on Thu, 18 Feb 2016 01:49:36 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:113245 Archived-At: > 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.