GNU bug report logs - #30994
27.0.50; Cursor doesn't blink (X window system)

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Fri, 30 Mar 2018 03:32:01 UTC

Severity: normal

Merged with 45857

Found in versions 27.0.50, 28.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #46 received at 30994 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: ola.x.nilsson <at> axis.com, 45857 <at> debbugs.gnu.org, 30994 <at> debbugs.gnu.org
Subject: Re: bug#45857: 28.0.50; Not possible to set package-user-dir in
 early-init.el
Date: Thu, 14 Jan 2021 14:32:13 -0500
> Is there any place where all these complications are described, so
> that people (and we ourselves) could have a complete, comprehensive
> overview of this stuff and the various problems it needs to solve?  If
> not, how about taking this opportunity to describe that?  Because
> otherwise these incidents will keep happening.

Here's the story:

We have a few variables which are predefined in the dumped Emacs but
whose default value depends on information only available when Emacs is
executed, such as the user's $HOME.

We handle those using `custom-initialize-delayed`, so when the
variable's `defcustom` is procesed the variable isn't initialized yet,
and instead initialization happens in `startup.el` by calling
`custom-reevaluate-setting` on each one of those delayed variables.

In Emacs-26, we did that just before loading the `.emacs` file and
everybody was happy.  But the `early-init.el` file added to Emacs-27
introduced a difficulty there:

- Those vars's values might be needed in `early-init.el` so we should
  call `custom-reevaluate-setting` before we load `early-init.el`.

- The value of `blink-cursor-mode` depends on whether window-system is
  nil or not, which is only known after loading `early-init.el`, so we
  should call `custom-reevaluate-setting` after we load `early-init.el`.

Currently we solve this by calling `custom-reevaluate-setting` twice for
every one of those variables.  But it means that we silently override
any change made to those variables from `early-init.el`.

As noted, the only var whose default value needs to be (re)computed
after loading `early-init.el` is `blink-cursor-mode`.  In theory there
could be more, but I think we should aim to reduce rather than increase
those cases.  E.g. the current way `blink-cursor-mode` is defined means
that if I start `emacs -Q -nw` and later create a GUI frame, that frame
won't have a blinking cursor.  I think this is a bug (tho I can see
that some people may consider it a feature if they (like me) dislike
blinking cursors ;-0)


        Stefan





This bug report was last modified 4 years and 124 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.