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:47:42 +0200 Message-ID: <87a8ytb7nl.fsf@gmail.com> References: <87619h8s5m.fsf@gmail.com> <87d23pb8ye.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427809705 4905 80.91.229.3 (31 Mar 2015 13:48:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 31 Mar 2015 13:48:25 +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:48:20 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 1YcwWZ-0000s0-RC for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 15:48:12 +0200 Original-Received: from localhost ([::1]:38773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcwWU-0007Br-3w for ged-emacs-devel@m.gmane.org; Tue, 31 Mar 2015 09:48:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcwWG-0007Be-6L for emacs-devel@gnu.org; Tue, 31 Mar 2015 09:47:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcwWC-0005th-Uy for emacs-devel@gnu.org; Tue, 31 Mar 2015 09:47:52 -0400 Original-Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:33791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcwWC-0005ta-Oe for emacs-devel@gnu.org; Tue, 31 Mar 2015 09:47:48 -0400 Original-Received: by wgoe14 with SMTP id e14so19641734wgo.0 for ; Tue, 31 Mar 2015 06:47:47 -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=xlalDBxTSKHpdBvXd26SZtJJetETLM1WXryJTWH4Dd8=; b=c5q+V8rg+VT01eUFsc6MycY+NbCiuiYZPzSK8zVgApLpoTXwR0Zbw+UfMtLX+HT17n 6PqDMFNtlKX++w1lph1RBl9ZrBueBUy7BTlsS6I1VDg/uUbIdbnW6LKcs78zZhEy15X2 Jh9ntsJEJfXfetNoXWI8Mu8VqNbKLgBavbLGGnoV+uabuaXs6W772W/RL+1R6CJwpyGK OScrPPu20KtNMRuDwvLCxGfdcpk6jsILDSYO1tQIfW3niT3KWrdGixfTeLwbGBubRCf0 LSelxlw+FEN2O/3zBE8+bufEu44NU+H67di2i/Iifiktdm4ofOF9s8cVm92vea3MoXi/ yrDQ== X-Received: by 10.181.25.225 with SMTP id it1mr5703488wid.8.1427809667906; Tue, 31 Mar 2015 06:47:47 -0700 (PDT) Original-Received: from dell-14z ([37.163.222.83]) by mx.google.com with ESMTPSA id i10sm20441689wja.40.2015.03.31.06.47.45 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 31 Mar 2015 06:47:47 -0700 (PDT) In-reply-to: <87d23pb8ye.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::229 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:184623 Archived-At: Thierry Volpiatto writes: > 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. Maybe `package-load-list' should have a nil default value instead of all and once package-initialize run, it could set it to 'all if it don't find a customized value. This with not help the real time setting of this var (no way to unload), but may solve the problem at startup. -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997