emacs-devel
[Top][All Lists]
Advanced

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

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


From: Vladimir Kazanov
Subject: [PATCH] User-defined fringe tooltips (a request for review)
Date: Tue, 19 Dec 2023 19:38:09 +0000

Hi all,

Recently I've been looking into implementing a suggestion from
etc/TODO related to fringe indicator tooltips:

> ** Allow fringe indicators to display a tooltip
> Provide a help-echo property?

Attached is a quick and dirty proof-of-concept. The patch extends the
display specification with an optional string that would be displayed
through either tooltips or the echo area:

(overlay-put (make-overlay (point) (point))
   'before-string (propertize "x" 'display `(left-fringe right-arrow
nil "left fringe test tooltip")))

Moving a mouse pointer to the fringe would then display the string in
a tooltip on a relevant line.

To make this work I've extended "struct it" and "struct glyphs_row"
with pointers to strings, and added some mouse hover handling in the
"note_mouse_highlight function". Obviously, the code needs more checks
but I want to confirm the approach with emacs-devel@ first.

Happy to hear comments and suggestions about the path taken!

Thank you

-- 
Regards,

Vladimir Kazanov

Attachment: 0001-first-draft-version-of-user-fringe-tooltips.patch
Description: Text Data


reply via email to

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