Closed getong closed 6 months ago
mode-line-end-spaces
has been a member of mode-line-format
's default value for twelve years (since https://github.com/emacsmirror/emacs/commit/5f2c76c6cee2b5d2d84ffd409839fd58d2ad16fa).
If that is not the case for you then something probably removes it (try with emacs -Q
).
Look at the value of mode-line-format
and decide after which actual element of that list you want to add the keycast element. Then customize keycast-mode-line-insert-after
accordingly.
If that is not the case for you then something probably removes it [mode-line-end-spaces]
That something turned out to be keycast.
Steps to repro:
Enable keycast-mode-line-mode
with default settings.
The default value of keycast-mode-line-insert-after
is mode-line-buffer-identification
, and keycast-mode-line-remove-tail-elements
is t
.
At this point, mode-line-format
looks like:
(... mode-line-buffer-identification keycast-mode-line)
Anything after mode-line-buffer-identification
, including mode-line-end-spaces
, has been removed.
Set keycast-mode-line-insert-after
to mode-line-end-spaces
Explicitly enable (not toggle) keycast-mode-line-mode
e.g. by evaluating (keycast-mode-line-mode 1)
. Since mode-line-format
currently does not contain mode-line-end-spaces
, we get the reported error.
More generally, enabling keycast-mode-line-mode
while it is already enabled loses information about the user's original mode-line-format
:
Enable keycast-mode-line-mode
with default settings
Explicitly enable it again (not toggle)
Disable it. Oops, our mode line is fucked until we restart Emacs.
Emacs 29.4 (emacs-29.4-2.fc39.x86_64 from Fedora 39 repo) keycast 20240713.1919 (cce63c166a47593c2d2a0a4e0e1e9671a537f1cb) from MELPA
mode-line-end-spaces has been a member of mode-line-format's default value for twelve years
This is not useful information for the OP trying to understand what happened. It's more helpful to show that mode-line-end-spaces
is currently in the default mode-line-format
, but I expect they knew that.
More generally, enabling
keycast-mode-line-mode
while it is already enabled
I consider that a user error and have added a kludge to recover from it.
Sure, but it's an easy mistake to make. Users are gonna have (*-mode)
in a use-package form and repeatedly evaluate it while tinkering.
Thanks for the fix.
emacs 29.3 on macos
config sample:
or