all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Sticky tooltips
Date: Tue, 29 Sep 2020 23:30:14 +0200	[thread overview]
Message-ID: <VI1PR06MB45269A37540A692B73BCFD3A96320@VI1PR06MB4526.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <834kngllb1.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 29 Sep 2020 17:17:06 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Cc: emacs-devel@gnu.org
>> Date: Tue, 29 Sep 2020 05:36:29 +0200
>> 
>> > You propose to switch to "tooltips" that pop up in a special buffer?
>> I was mostly proposing for "pure Emacs" frame, special buffer or not, I
>> don't know. Why not?
>> 
>> That makes implementing "sticky" tooltip as someone suggested quite
>> trivial.
>> 
>> There is only one tooltip active at a time (I think), so there is just
>> one buffer/frame needed; and tooltip text could be erased/set when a
>> tooltip is shown. Would that be too inneificient?
>
> You are, in effect, describing the way our native tooltips are
> implemented: they are special small frames.  See tooltip.el.

Haha; typical me :-) 

I took looked in tooltip.el thanks. It works really nice, and it
switches flawlesly between gtk/native tooltips; I am impressed.

Yeah, you are correct, what tooltip already does, as you say is
logically what I described, but the implementation is different:
tooltip.el seems to outsource all it's work to xfns.c, and the code for
tooltip frame creation; I used just "a naked frame" and some Lisp to
create an effect of a tooltip.

By the way; "tooltip-show" (in tooltip.el) seems to take a string
argument; rather than a buffer, and that widget library "widget.el",
needs a buffer (for the minor mode, etc). Maybe it can be done
somehow, I don't know; however I am not so sure if "sticky tooltip" is
that good idea; echoing to message buffer is maybe good enough for most
people? 

Just as a side curious question: did tooltips really needed own c
implementation? Isn't code in x-create-tip-frame and x-show-tip seems
redundant to other frame creation routines/display? Couldn't tooltips be
implemented using normal frames, with "tooltip-special" code written in
lisp? 

I dont' mean to ditch it away, just a reflection on complexity. Maybe I
don't see all the complexity with tooltips; but it is still ~900+ lines
of c code that need to be maintained for X11, and there are well w32 and
ns implementations, so around 3k locs? 

Maybe special-buffers is not a bad idea? Just thinking out of the box :-).



  reply	other threads:[~2020-09-29 21:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 20:04 Sticky tooltips Arthur Miller
2020-09-28 22:11 ` Jean Louis
2020-09-29  3:39   ` Arthur Miller
2020-09-29  4:20     ` Jean Louis
2020-09-29  2:41 ` Eli Zaretskii
2020-09-29  3:36   ` Arthur Miller
2020-09-29 14:17     ` Eli Zaretskii
2020-09-29 21:30       ` Arthur Miller [this message]
2020-09-30 14:50         ` Eli Zaretskii
2020-09-30 15:17           ` Arthur Miller
2020-10-01  2:28           ` Sv: " arthur miller
2020-10-01 12:58             ` Eli Zaretskii
2020-10-02 10:47               ` Sv: " arthur miller
2020-10-05  9:27               ` Arthur Miller
2020-10-05  9:48                 ` Eli Zaretskii
2020-10-05 10:18                   ` Arthur Miller
2020-10-05 10:52                     ` Eli Zaretskii
2020-10-05 11:04                       ` Arthur Miller
  -- strict thread matches above, loose matches on Subject: below --
2020-10-05  0:55 Arthur Miller
2020-10-22 16:17 Arthur Miller

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=VI1PR06MB45269A37540A692B73BCFD3A96320@VI1PR06MB4526.eurprd06.prod.outlook.com \
    --to=arthur.miller@live.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.