From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#30994: bug#45857: 28.0.50; Not possible to set package-user-dir in early-init.el Date: Fri, 15 Jan 2021 17:19:33 -0500 Message-ID: References: <83o8hrbbv6.fsf@gnu.org> <83h7njb6a5.fsf@gnu.org> <835z3ybpsj.fsf@gnu.org> <83k0se9hw2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24614"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: ola.x.nilsson@axis.com, 45857@debbugs.gnu.org, 30994@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 15 23:20:28 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l0XSG-0006Gu-2P for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Jan 2021 23:20:28 +0100 Original-Received: from localhost ([::1]:51822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0XSF-00083d-2l for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Jan 2021 17:20:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0XRq-00083C-6f for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2021 17:20:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58607) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0XRp-0003z1-VT for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2021 17:20:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0XRp-0001yw-PJ for bug-gnu-emacs@gnu.org; Fri, 15 Jan 2021 17:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Jan 2021 22:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30994 X-GNU-PR-Package: emacs Original-Received: via spool by 30994-submit@debbugs.gnu.org id=B30994.16107491847581 (code B ref 30994); Fri, 15 Jan 2021 22:20:01 +0000 Original-Received: (at 30994) by debbugs.gnu.org; 15 Jan 2021 22:19:44 +0000 Original-Received: from localhost ([127.0.0.1]:41918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0XRY-0001yB-0W for submit@debbugs.gnu.org; Fri, 15 Jan 2021 17:19:44 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:62678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0XRV-0001xv-IB; Fri, 15 Jan 2021 17:19:42 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0588D102381; Fri, 15 Jan 2021 17:19:36 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 65204100250; Fri, 15 Jan 2021 17:19:34 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1610749174; bh=tq85eMmbiAZLcSCVvyh8k94T57wuH2nB6M7RJgm/Ivs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=LTPVSDlzK8jmQgGE6uTV+GL/q2RNl6SicVraGDBo33Wzy0t+uAEPRzuW0gdPHYXMH alMeIOgKbfnI7i6LIGHsCmtWO3bUkGLlZhR9s3bPyHvUTz/xzUVvg8ZfrUWoe2rumP UyfKDae/ySKNQkhBdBm7ds9H/S1cfNfK38iAYcLiHz6jDNYaRDlufE+WbVUp0zOqqf druGb5GyvC6C3D/rzgATOQHU5sY/uqrcQd91vojBAL/WS6dKbBcTAX8qValMr24nCX h8V0vpEp3IqIXT0eY78Xq9T3adhYflk8h3ihAf7Qnyb1ppFf5WSKRtIP8qBzOmeuLh FwU1kajbn/28g== Original-Received: from alfajor (unknown [45.72.224.181]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2711312046D; Fri, 15 Jan 2021 17:19:34 -0500 (EST) In-Reply-To: <83k0se9hw2.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 15 Jan 2021 20:25:49 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198004 Archived-At: >> >> > Basically, some variables can only be usefully initialized after some >> >> > part(s) of startup have happened already. One way of dealing with >> >> > this is to have the variables record this information (e.g., in a >> >> > plist of their symbol) that would allow us evaluate each variable only >> >> > once, at the earliest opportunity where the prerequisites are >> >> > fulfilled. >> [...] >> > I say we should get ready for the future now. Introducing the >> > infrastructure I mentioned is not a big deal. >> Hmm... maybe I misunderstood what you meant by that infrastructure, then. >> Could you outline more concretely what it would look like? > In a nutshell: record the startup phase for each variable in a plits > of its symbol. Ah, so instead of just :initialize #'custom-initialize-delay we'd have something like :initialize (custom-initialize-delay 'before-early-init) or :initialize (custom-initialize-delay 'after-early-init) Where `custom-initialize-delay` becomes something like (defun custom-initialize-delay (phase) (lambda (symbol) (push (cons symbol phase) custom-delayed-init-variables))) depending on when we want the initialization to take place? >> Also, would it currently result in a behavior that's different from: >> >> - initialize all delayed vars before early-init >> - re-initialize blink-cursor-mode after early-init >> >> ? > > With my proposal, blink-cursor-mode will not be mentioned by name in > any of these places. Yes, of course, but I'm asking whether the resulting *behavior* you're after is this one. Stefan