From: Eli Zaretskii <eliz@gnu.org>
To: Vladimir Kazanov <vekazanov@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] User-defined fringe tooltips (a request for review)
Date: Wed, 20 Dec 2023 14:31:41 +0200 [thread overview]
Message-ID: <83sf3xgimq.fsf@gnu.org> (raw)
In-Reply-To: <CAAs=0-3itod4Z7KyVo8ZT4ffe3Zyv+CyRzWD3ckOFKtyXOnCug@mail.gmail.com> (message from Vladimir Kazanov on Tue, 19 Dec 2023 19:38:09 +0000)
> From: Vladimir Kazanov <vekazanov@gmail.com>
> Date: Tue, 19 Dec 2023 19:38:09 +0000
>
> 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.
Thanks.
> 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!
I'm not sure I like to have Lisp_Object members in 'struct glyph_row'.
I also don't think I understand why you needed to copy the hel-echo
string to the glyph row. The code in note_mouse_highlight examines
the buffer text and overlays for text properties whose meaning is to
display a help-echo string, so why cannot you do the same to look for
a 'display' property of this specific structure, and extract the
help-echo directly from there at mouse-highlight time instead of at
glyph-generation time?
next prev parent reply other threads:[~2023-12-20 12:31 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 19:38 [PATCH] User-defined fringe tooltips (a request for review) Vladimir Kazanov
2023-12-20 12:31 ` Eli Zaretskii [this message]
2023-12-21 16:51 ` Vladimir Kazanov
2023-12-21 17:37 ` Eli Zaretskii
2023-12-23 13:28 ` Vladimir Kazanov
2023-12-23 13:40 ` Eli Zaretskii
2023-12-24 11:31 ` Vladimir Kazanov
2023-12-24 16:54 ` Eli Zaretskii
2024-03-25 15:55 ` Vladimir Kazanov
2024-03-25 17:11 ` Eli Zaretskii
2024-03-26 22:16 ` Vladimir Kazanov
2024-03-27 10:59 ` Vladimir Kazanov
2024-03-27 11:25 ` Po Lu
2024-03-27 12:48 ` Vladimir Kazanov
2024-03-27 11:25 ` Po Lu
2024-03-31 8:36 ` Eli Zaretskii
2024-04-07 11:14 ` Vladimir Kazanov
2024-04-07 12:44 ` Eli Zaretskii
2024-04-07 17:07 ` Vladimir Kazanov
2024-04-07 18:40 ` Eli Zaretskii
2024-04-08 14:41 ` Vladimir Kazanov
2024-04-13 9:14 ` Eli Zaretskii
2024-04-13 9:32 ` Vladimir Kazanov
2024-04-13 11:21 ` Eli Zaretskii
2024-04-13 14:53 ` Vladimir Kazanov
2024-04-13 15:47 ` Eli Zaretskii
2024-03-27 12:14 ` Eli Zaretskii
2024-03-27 12:48 ` Vladimir Kazanov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83sf3xgimq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=vekazanov@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).