[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rmsbolt.el [Was: Colorful line numbers]

From: João Távora
Subject: Re: rmsbolt.el [Was: Colorful line numbers]
Date: Sat, 23 Jul 2022 10:35:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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.  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.  But
without the complexity of a new data structure.

But I'd have to see the proposed API and benchmark the two solutions to
make sure.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]