From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: Calling (package-initialize) sooner during initialization Date: Tue, 31 Mar 2015 15:19:37 +0200 Message-ID: <87d23pb8ye.fsf@gmail.com> References: <87619h8s5m.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427808017 8008 80.91.229.3 (31 Mar 2015 13:20:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 31 Mar 2015 13:20:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 31 15:20:12 2015 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 1Ycw5L-0004t1-QV for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 15:20:03 +0200 Original-Received: from localhost ([::1]:38712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycw5K-00008T-W8 for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 09:20:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycw57-00008O-W1 for emacs-devel@gnu.org; Tue, 31 Mar 2015 09:19:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ycw53-0004Jj-0h for emacs-devel@gnu.org; Tue, 31 Mar 2015 09:19:49 -0400 Original-Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:35649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ycw52-0004JH-QD for emacs-devel@gnu.org; Tue, 31 Mar 2015 09:19:44 -0400 Original-Received: by widdi4 with SMTP id di4so8842977wid.0 for ; Tue, 31 Mar 2015 06:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; bh=rop1ztjif0APmA5WijbZ9DNEKIkLIP8IciJSKZliBiQ=; b=F0IAze7ldn8hr2NiwOmmEtd91CxkGkY8YFWIBa90e0TDAQsXhJOOLtPyS3+pDB2k1S mBLvTzvxYrur8U/N1raqQ0iiqT2jmOXgQ86mPYewRcWSnQsK5pUYzquXQ02ma/Oqfqpd 6UR741dS78+wcA74bQGvqOoxDNki/J8Y361QbpfdwIwRSIucSl1QXJ5DZMRb0UwArqOd gHqEP/5XUNKNs4dMOivOjygfWrmRArh9cM51ecr03PbnAPch1an8h2Fwi0SgaryjJw2P e9IqxZEerXcDLTVylzZ56iw1fRpxC0LyfF0DsMsmH0uqFuzZwS+vWCPG80b1EIrlMINw FI6Q== X-Received: by 10.194.87.65 with SMTP id v1mr73141791wjz.2.1427807983168; Tue, 31 Mar 2015 06:19:43 -0700 (PDT) Original-Received: from dell-14z ([37.163.222.83]) by mx.google.com with ESMTPSA id ub1sm20337383wjc.43.2015.03.31.06.19.41 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 31 Mar 2015 06:19:42 -0700 (PDT) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22b 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:184621 Archived-At: Stefan Monnier writes: >>> Stefan kindly explains why it can't just be done before loading the init file: >>>> [...] the user may need/want to run some Elisp >>>> code of his own choosing *before* package-initialize is called. >>>> E.g. [...] set package-load-list and package-directory-list > >> Why not adding a set function to these vars calling >> `package-initialize', so if one set these functions AFTER a >> `package-initialize' call `package-initialize' will be called again. >> Of course these vars have to be set with customize, not setq. > > The default of package-load-list is to enable everything, so the main > use for package-load-list is to *prevent* initialization of > some packages. > IOW, the "setter" would have to *undo* some initializations, which is > can't be done reliably. IIUC `package-load-list' once set with 'all (the default) can't be changed to something else (not all packages) after running `package-initialize' (i.e it can't unload the already loaded packages) unless restarting emacs. There is something wrong here IMHO. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997