unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: ola.x.nilsson@axis.com, 45857@debbugs.gnu.org, 30994@debbugs.gnu.org
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	[thread overview]
Message-ID: <jwv8s8trh23.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83k0se9hw2.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 15 Jan 2021 20:25:49 +0200")

>> >> > 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






  reply	other threads:[~2021-01-15 22:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 11:51 bug#45857: 28.0.50; Not possible to set package-user-dir in early-init.el Ola x Nilsson
2021-01-14 15:03 ` Stefan Monnier
2021-01-14 15:41   ` Stefan Monnier
2021-01-14 18:20     ` Stefan Monnier
2021-01-14 18:40       ` bug#30994: " Eli Zaretskii
2021-01-14 19:32         ` Stefan Monnier
2021-01-14 20:41           ` Eli Zaretskii
2021-01-14 21:02             ` Stefan Monnier
2021-01-15  7:52               ` Eli Zaretskii
2021-01-15 16:08                 ` Stefan Monnier
2021-01-15 18:25                   ` Eli Zaretskii
2021-01-15 22:19                     ` Stefan Monnier [this message]
2021-01-16  4:52                       ` Stefan Monnier
2021-01-19 17:11                         ` Stefan Monnier
2021-01-22 16:08                           ` bug#30994: " Phillip Lord
2021-01-22 16:44                             ` Stefan Monnier
2021-01-22 17:02                               ` Phillip Lord
2021-01-16  7:08                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8s8trh23.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=30994@debbugs.gnu.org \
    --cc=45857@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=ola.x.nilsson@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).