[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tick Reduction
From: |
Eli Zaretskii |
Subject: |
Re: Tick Reduction |
Date: |
Thu, 25 Nov 2021 16:02:04 +0200 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: dgutov@yandex.ru, stefankangas@gmail.com, emacs-devel@gnu.org
> Date: Thu, 25 Nov 2021 14:06:45 +0100
>
> The one remaining problem I have now is with the mode line -- the
> display handlers aren't called in all circumstances, and I don't quite
> understand why.
>
> With this:
>
> (defvar mode-line-position
> `((:propertize
> (" " mode-line-percent-position)
> display (min-width (6.0))
>
> handle_display_prop is called (via next_element_from_string) as you'd
> expect, and everything works fine. However, if you just have:
>
> (defvar mode-line-position
> `((:propertize
> mode-line-percent-position
> display (min-width (6.0))
>
> handle_display_prop is never called.
The value of mode-line-percent-position is '(-3 "%p"). So in the
second example you propertize the thing which Emacs produces from the
%p mode-line format. But %p produces a C string, and C strings cannot
have text properties. That's why handle_display_prop isn't called: it
is never called for C strings we display.
Bottom line: to put text properties on stuff we display on the mode
line, you need to make sure that stuff is a Lisp string.
- Re: Tick Reduction, (continued)
- Re: Tick Reduction, Eli Zaretskii, 2021/11/26
- Re: Tick Reduction, Lars Ingebrigtsen, 2021/11/24
- Re: Tick Reduction, Eli Zaretskii, 2021/11/24
- Re: Tick Reduction, Yuan Fu, 2021/11/24
- Re: Tick Reduction, Eli Zaretskii, 2021/11/25
- Re: Tick Reduction, Yuan Fu, 2021/11/26
- Re: Tick Reduction, Eli Zaretskii, 2021/11/26
- Re: Tick Reduction, Yuan Fu, 2021/11/26
- Re: Tick Reduction, Eli Zaretskii, 2021/11/26
- Re: Tick Reduction, Lars Ingebrigtsen, 2021/11/25
- Re: Tick Reduction,
Eli Zaretskii <=
- Re: Tick Reduction, Lars Ingebrigtsen, 2021/11/25
- Re: Tick Reduction, Eli Zaretskii, 2021/11/25
- Re: Tick Reduction, Lars Ingebrigtsen, 2021/11/25
- Re: Tick Reduction, Eli Zaretskii, 2021/11/25
- Re: Tick Reduction, Lars Ingebrigtsen, 2021/11/26
- Re: Tick Reduction, Eli Zaretskii, 2021/11/26
- Re: Tick Reduction, Lars Ingebrigtsen, 2021/11/27
- Re: Tick Reduction, Eli Zaretskii, 2021/11/27
- Re: Tick Reduction, Lars Ingebrigtsen, 2021/11/29
- Re: Tick Reduction, Eli Zaretskii, 2021/11/29