unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ola x Nilsson <ola.x.nilsson@axis.com>
Cc: 45857@debbugs.gnu.org, 30994@debbugs.gnu.org
Subject: bug#45857: 28.0.50; Not possible to set package-user-dir in early-init.el
Date: Thu, 14 Jan 2021 13:20:53 -0500	[thread overview]
Message-ID: <jwvim7zs7tn.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <jwvy2gvttn5.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 14 Jan 2021 10:41:07 -0500")

>> the package-user-dir defcustom gets the custom-initialize-delay
>> intializer.  At least for me, this overrides any setting of
>> package-user-dir that is done in early-init.el.
> Oh, I see you're right, and I think this issue is wider than
> `package-user-dir` since it affects all the other vars that use
> `custom-initialize-delay`.

Back in June 2018, Eli wrote:
> I can see several ways out of this:
> 
>   . Move the call to custom-reevaluate-setting back where it was, and
>     instead call custom-reevaluate-setting in that earlier place only
>     for Info-default-directory-list, which was the original reason why
>     the call was moved;
>   . Add a call to custom-reevaluate-setting for blink-cursor-mode
>     where the window-system is already set up;
>   . Call custom-reevaluate-setting for all the delayed-init variables
>     twice: once where we do that now, and again where we did that
>     before the above commit;
>   . Introduce yet another variable similar to
>     custom-delayed-init-variables, but separate from it, and put on
>     it all the delayed-init variables that need the window-system to
>     be set up, leaving all the rest in custom-delayed-init-variables.

We ended up going with the 3rd option, but this is the source of the
problem here.  I think we should change to option 2 for now and plan on
fixing it for good by removing this exception, i.e. by making
the default value of `blink-cursor-mode` be t.

More concretely, I suggest the patch below,


        Stefan


diff --git a/lisp/startup.el b/lisp/startup.el
index 57fd87f20f..8c9ac4e30f 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1311,12 +1312,13 @@ command-line
     (startup--setup-quote-display)
     (setq internal--text-quoting-flag t))
 
-  ;; Re-evaluate again the predefined variables whose initial value
-  ;; depends on the runtime context, in case some of them depend on
-  ;; the window-system features.  Example: blink-cursor-mode.
-  (let (current-load-list) ; c-r-s may call defvar, and hence LOADHIST_ATTACH
-    (mapc 'custom-reevaluate-setting custom-delayed-init-variables)
-    (setq custom-delayed-init-variables nil))
+  ;; Some vars's initialization need to be delayed yet further, until
+  ;; after we setup the real initial frame, because their initial
+  ;; value depends on the window-system features.
+  ;; Currently, the only such var is `blink-cursor-mode'.  See bug#30994.
+  ;; FIXME: We should arrange for `blink-cursor-mode's default to be
+  ;; unconditionally `t' so as to finally eliminate this problem.
+  (custom-reevaluate-setting 'blink-cursor-mode)
 
   (normal-erase-is-backspace-setup-frame)
 






  reply	other threads:[~2021-01-14 18:20 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 [this message]
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
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=jwvim7zs7tn.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=30994@debbugs.gnu.org \
    --cc=45857@debbugs.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).