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 20:40:48 +0300 Message-ID: <83efs4byzj.fsf@gnu.org> References: <83tw12cocz.fsf@gnu.org> <83d17qcfa1.fsf@gnu.org> <83h8x0c206.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1503337321 20281 195.159.176.226 (21 Aug 2017 17:42:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 21 Aug 2017 17:42:01 +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 19:41:55 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 1djqhy-0004hD-76 for ged-emacs-devel@m.gmane.org; Mon, 21 Aug 2017 19:41:50 +0200 Original-Received: from localhost ([::1]:37906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djqi4-0006C5-Ls for ged-emacs-devel@m.gmane.org; Mon, 21 Aug 2017 13:41:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djqhA-0006BI-1K for emacs-devel@gnu.org; Mon, 21 Aug 2017 13:41:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1djqh5-0008NF-4d for emacs-devel@gnu.org; Mon, 21 Aug 2017 13:41:00 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1djqh5-0008NA-0I; Mon, 21 Aug 2017 13:40:55 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1685 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1djqh4-0003nw-AJ; Mon, 21 Aug 2017 13:40:54 -0400 In-reply-to: (message from Radon Rosborough on Mon, 21 Aug 2017 09:43:31 -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:217662 Archived-At: > From: Radon Rosborough > Date: Mon, 21 Aug 2017 09:43:31 -0700 > Cc: emacs-devel@gnu.org > > > 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. > > AFAICT, customizing `package-load-list' and `package-user-dir' is no > longer possible with that approach. If such customization is put in > the init-file, it's too late; packages have already been loaded at the > point in startup.el that you mentioned. > > How are you proposing to deal with that problem? You are unfairly challenging me with stuff I know very little about, and therefore might make suggestions that are laughable. I asked people who are familiar with package.el and its various use cases to try looking for a solution along these lines; if I myself had such a solution handy, I'd describe it, or maybe even implement it. That being said, one possibility is to have a function in package.el scan the user init file for the definition of package-load-list, and process that line before loading the packages. Or something similar.