[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rmsbolt.el [Was: Colorful line numbers]
From: |
Eli Zaretskii |
Subject: |
Re: rmsbolt.el [Was: Colorful line numbers] |
Date: |
Sat, 23 Jul 2022 13:25:31 +0300 |
> From: João Távora <joaotavora@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 23 Jul 2022 10:35:07 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> Aaanyway, I think I'm happy with the current implementation that _doesn't_
> >> use line numbers at all. I think this discussion has been productive (to
> >> some
> >> degree). If I ever need this again (or someone else, like Dmitry), I'll
> >> be sure
> >> to ping here again.
> >
> > OK. Let me just say, for the future, that basing this on text
> > properties is IMO not the best idea. I think a better idea is to have
> > some buffer-local (or window-local) variable whose value is an
> > appropriate data structure that specifies faces for ranges of line
> > numbers. Of course that value will need to be updated at suitable
> > times, which in itself is not a trivial task.
>
> OK. Since we're in speculation territory, I don't see a big difference
> between that and using text properties, which are also a buffer-local
> structure.
The big difference from my POV is that text properties slow down
redisplay code in general, whereas buffer-local variables only slow
down (somewhat) the code which examines their values and uses them.
> Looking up the line we're iterating in that hypothetical
> Lisp structure would seem to amount to about the same work as looking
> for a particulr text property in a known place of that same line.
No, referencing a variable is much faster, because it doesn't involve
finding the correct interval for a buffer position.
- Re: Colorful line numbers, (continued)
- Re: Colorful line numbers, João Távora, 2022/07/22
- Re: Colorful line numbers, Eli Zaretskii, 2022/07/22
- Re: Colorful line numbers, João Távora, 2022/07/22
- Re: Colorful line numbers, Eli Zaretskii, 2022/07/22
- Re: Colorful line numbers, João Távora, 2022/07/22
- Re: Colorful line numbers, Eli Zaretskii, 2022/07/22
- rmsbolt.el [Was: Colorful line numbers], João Távora, 2022/07/22
- Re: rmsbolt.el [Was: Colorful line numbers], Stefan Monnier, 2022/07/22
- Re: rmsbolt.el [Was: Colorful line numbers], Eli Zaretskii, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], João Távora, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers],
Eli Zaretskii <=
- Re: rmsbolt.el [Was: Colorful line numbers], Stefan Monnier, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], Eli Zaretskii, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], Stefan Monnier, 2022/07/23
- Re: Colorful line numbers, Eli Zaretskii, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], João Távora, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], João Távora, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], Jay Kamat, 2022/07/23
- Re: rmsbolt.el [Was: Colorful line numbers], Stefan Monnier, 2022/07/23
- Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]], João Távora, 2022/07/23
- Re: Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]], Stefan Monnier, 2022/07/23