emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] User-defined fringe tooltips (a request for review)


From: Eli Zaretskii
Subject: Re: [PATCH] User-defined fringe tooltips (a request for review)
Date: Sun, 07 Apr 2024 21:40:34 +0300

> From: Vladimir Kazanov <vekazanov@gmail.com>
> Date: Sun, 7 Apr 2024 18:07:31 +0100
> Cc: emacs-devel@gnu.org
> 
> 1. Use the iterator it used in the display_line function to extract
> tooltips from fringe-related display specs (patch v1). This needs
> caching Lisp_Objects in glyph_row structures for future retrieval.
> This is good because it looks in all specs everywhere, doesn't matter
> if the text is visible or not. Bad because it needs storing additional
> non-text values in glyph_row.
> 2. Iterating over buffer text positions of the row (patch v2). Hard to
> take into account all variants of text coming from buffers and
> strings. This implementation only finds fringe-help in visible text of
> the buffer.
> 3. Iterating of glyphs of the row (patch v3). All visible text, both
> from the buffer and strings, is visited by the implementation.
> 
> I'd say that option 1 is best for user code as specs are retrieved uniformly.

But it has a disadvantage of storing Lisp objects in the glyph row
structure (which means basically to store them in the glyph matrices).
I'd like to avoid that.

> Option 3 is the cleanest implementation-wise but we'd have to document
> limitations and the suggested solution.
> 
> So if you're fine with this approach, I'll clean up the documentation
> and provide a final patch based on option 3.

Yes, please.



reply via email to

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