From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: rmsbolt.el [Was: Colorful line numbers]
Date: Sat, 23 Jul 2022 10:35:07 +0100 [thread overview]
Message-ID: <87pmhwmat0.fsf@gmail.com> (raw)
In-Reply-To: <835yjojr0f.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 23 Jul 2022 09:13:20 +0300")
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.
João
next prev parent reply other threads:[~2022-07-23 9:35 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 7:50 Colorful line numbers João Távora
2022-07-22 11:00 ` Eli Zaretskii
2022-07-22 11:29 ` João Távora
2022-07-22 11:42 ` Eli Zaretskii
2022-07-22 12:02 ` João Távora
2022-07-22 13:27 ` Eli Zaretskii
2022-07-22 13:53 ` João Távora
2022-07-22 14:33 ` Eli Zaretskii
2022-07-22 15:10 ` João Távora
2022-07-22 15:38 ` Eli Zaretskii
2022-07-22 16:30 ` rmsbolt.el [Was: Colorful line numbers] João Távora
2022-07-22 19:53 ` Stefan Monnier
2022-07-23 6:13 ` Eli Zaretskii
2022-07-23 9:35 ` João Távora [this message]
2022-07-23 10:25 ` Eli Zaretskii
2022-07-23 14:43 ` Stefan Monnier
2022-07-23 15:52 ` Eli Zaretskii
2022-07-23 16:31 ` Stefan Monnier
2022-07-23 17:07 ` Colorful line numbers Eli Zaretskii
2022-07-23 18:18 ` rmsbolt.el [Was: Colorful line numbers] João Távora
2022-07-23 18:11 ` João Távora
2022-07-23 14:53 ` Jay Kamat
2022-07-23 17:25 ` Stefan Monnier
2022-07-23 17:34 ` Eglot to core [Was: rmsbolt.el [Was: Colorful line numbers]] João Távora
2022-07-23 17:52 ` Stefan Monnier
2022-07-24 18:58 ` João Távora
2022-07-24 19:04 ` Stefan Monnier
2022-07-25 1:05 ` Po Lu
2022-07-25 2:45 ` Stefan Monnier
2022-07-25 5:55 ` Philip Kaludercic
2022-07-25 15:31 ` Stefan Monnier
2022-07-25 6:23 ` Po Lu
2022-07-25 10:49 ` Bozhidar Batsov
2022-07-25 11:01 ` João Távora
2022-07-25 11:50 ` Felician Nemeth
2022-07-25 12:27 ` João Távora
2022-07-25 12:29 ` João Távora
2022-07-25 15:00 ` Felician Nemeth
2022-07-25 15:41 ` João Távora
2022-07-26 8:12 ` Felician Nemeth
2022-07-26 8:21 ` João Távora
2022-07-26 8:55 ` Felician Nemeth
2022-07-25 16:07 ` Max Brieiev
2022-07-25 17:05 ` João Távora
2022-07-25 15:33 ` Stefan Monnier
2022-07-22 12:18 ` Colorful line numbers Dmitry Gutov
2022-07-22 12:38 ` Stefan Monnier
2022-07-22 13:41 ` Dmitry Gutov
2022-07-22 14:01 ` João Távora
2022-07-22 23:32 ` Stefan Monnier
2022-07-23 18:50 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmhwmat0.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.