From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Summary and next steps for (package-initialize) Date: Mon, 21 Aug 2017 19:35:37 +0300 Message-ID: <83h8x0c206.fsf@gnu.org> References: <83tw12cocz.fsf@gnu.org> <83d17qcfa1.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1503333415 7924 195.159.176.226 (21 Aug 2017 16:36:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 Aug 2017 16:36:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Radon Rosborough Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 21 18:36:52 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djph4-0001gs-E9 for ged-emacs-devel@m.gmane.org; Mon, 21 Aug 2017 18:36:50 +0200 Original-Received: from localhost ([::1]:60602 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djphA-00030x-Ri for ged-emacs-devel@m.gmane.org; Mon, 21 Aug 2017 12:36:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djpg5-0002HB-9w for emacs-devel@gnu.org; Mon, 21 Aug 2017 12:35:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djpg2-0004uZ-6m for emacs-devel@gnu.org; Mon, 21 Aug 2017 12:35:49 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djpg2-0004u3-3L; Mon, 21 Aug 2017 12:35:46 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1628 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1djpg0-0000Wv-Vw; Mon, 21 Aug 2017 12:35:45 -0400 In-reply-to: (message from Radon Rosborough on Sun, 20 Aug 2017 10:54:30 -0700) 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.21 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" Xref: news.gmane.org gmane.emacs.devel:217659 Archived-At: > From: Radon Rosborough > Date: Sun, 20 Aug 2017 10:54:30 -0700 > Cc: emacs-devel@gnu.org > > The current (package-initialize) loads the autoload files for all > installed packages (or just a subset, if `package-load-list' was > modified). It also adds those packages' directories to the load-path. > At least this is my understanding. > > You suggested continuing to do these operations after loading the > init-file, but also to > > > add another call at a proper place in startup.el to do whatever > > needs to be done before the user init file is processed. > > Please explain what exactly needs to be done before the user init-file > is processed, and how doing this would allow both package.el > configuration and package configuration in the init-file without the > prescence of an explicit (package-initialize) call. AFAIU, packages need to be loaded before we run this fragment: ;; Re-evaluate predefined variables whose initial value depends on ;; the runtime context. (mapc 'custom-reevaluate-setting ;; Initialize them in the same order they were loaded, in case there ;; are dependencies between them. (prog1 (nreverse custom-delayed-init-variables) (setq custom-delayed-init-variables nil))) This is so the defcustom's in the loaded packages are known to Emacs when the init file is loaded. So my proposal is to call some package.el function that would do that before that.