* Re: master 47dcf72: Fix tooltip text properties showing up in dragged text
@ 2022-03-16 12:34 Eli Zaretskii
2022-03-16 13:29 ` Po Lu
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-03-16 12:34 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> diff --git a/lisp/mouse.el b/lisp/mouse.el
> index b650bea..4eead39 100644
> --- a/lisp/mouse.el
> +++ b/lisp/mouse.el
> @@ -3097,12 +3097,28 @@ mouse-drag-and-drop-region
> (frame-pixel-width frame))
> (> (cdr location)
> (frame-pixel-height frame)))))
> - (tooltip-hide)
> + (x-hide-tip)
What will this (and other similar changes you did in that commit) do
when tooltip-use-echo-area is non-nil?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: master 47dcf72: Fix tooltip text properties showing up in dragged text
2022-03-16 12:34 master 47dcf72: Fix tooltip text properties showing up in dragged text Eli Zaretskii
@ 2022-03-16 13:29 ` Po Lu
2022-03-16 13:42 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Po Lu @ 2022-03-16 13:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> diff --git a/lisp/mouse.el b/lisp/mouse.el
>> index b650bea..4eead39 100644
>> --- a/lisp/mouse.el
>> +++ b/lisp/mouse.el
>> @@ -3097,12 +3097,28 @@ mouse-drag-and-drop-region
>> (frame-pixel-width frame))
>> (> (cdr location)
>> (frame-pixel-height frame)))))
>> - (tooltip-hide)
>> + (x-hide-tip)
>
> What will this (and other similar changes you did in that commit) do
> when tooltip-use-echo-area is non-nil?
It'll display a tooltip, which is according to the doc string of
`mouse-drag-and-drop-region-show-tooltip' what that code is supposed to
do (display a tooltip, not a message in the echo area.)
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: master 47dcf72: Fix tooltip text properties showing up in dragged text
2022-03-16 13:29 ` Po Lu
@ 2022-03-16 13:42 ` Eli Zaretskii
2022-03-16 13:45 ` Po Lu
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-03-16 13:42 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Wed, 16 Mar 2022 21:29:08 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> diff --git a/lisp/mouse.el b/lisp/mouse.el
> >> index b650bea..4eead39 100644
> >> --- a/lisp/mouse.el
> >> +++ b/lisp/mouse.el
> >> @@ -3097,12 +3097,28 @@ mouse-drag-and-drop-region
> >> (frame-pixel-width frame))
> >> (> (cdr location)
> >> (frame-pixel-height frame)))))
> >> - (tooltip-hide)
> >> + (x-hide-tip)
> >
> > What will this (and other similar changes you did in that commit) do
> > when tooltip-use-echo-area is non-nil?
>
> It'll display a tooltip, which is according to the doc string of
> `mouse-drag-and-drop-region-show-tooltip' what that code is supposed to
> do (display a tooltip, not a message in the echo area.)
tooltip-use-echo-area also displays a tooltip, just in a special way.
Is there any reason not to honor it here?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: master 47dcf72: Fix tooltip text properties showing up in dragged text
2022-03-16 13:42 ` Eli Zaretskii
@ 2022-03-16 13:45 ` Po Lu
2022-03-16 14:25 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Po Lu @ 2022-03-16 13:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> It'll display a tooltip, which is according to the doc string of
>> `mouse-drag-and-drop-region-show-tooltip' what that code is supposed to
>> do (display a tooltip, not a message in the echo area.)
> tooltip-use-echo-area also displays a tooltip, just in a special way.
> Is there any reason not to honor it here?
It doesn't follow the mouse when dragging, which is the purpose of the
special tooltip displayed when dragging.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: master 47dcf72: Fix tooltip text properties showing up in dragged text
2022-03-16 13:45 ` Po Lu
@ 2022-03-16 14:25 ` Eli Zaretskii
2022-03-17 0:33 ` Po Lu
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-03-16 14:25 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Wed, 16 Mar 2022 21:45:35 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> It'll display a tooltip, which is according to the doc string of
> >> `mouse-drag-and-drop-region-show-tooltip' what that code is supposed to
> >> do (display a tooltip, not a message in the echo area.)
>
> > tooltip-use-echo-area also displays a tooltip, just in a special way.
> > Is there any reason not to honor it here?
>
> It doesn't follow the mouse when dragging, which is the purpose of the
> special tooltip displayed when dragging.
The tooltip display in the echo area also doesn't follow the mouse, so
it doesn't sound to me as if this case is a significant difference.
Users who have tooltip-use-echo-area non-nil already indicate that
they "give up" the position of the tool-tip text display on the
screen, and don't mind to see all the tool-tips in the same place
regardless of where the mouse is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: master 47dcf72: Fix tooltip text properties showing up in dragged text
2022-03-16 14:25 ` Eli Zaretskii
@ 2022-03-17 0:33 ` Po Lu
2022-03-17 6:49 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Po Lu @ 2022-03-17 0:33 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> The tooltip display in the echo area also doesn't follow the mouse, so
> it doesn't sound to me as if this case is a significant difference.
> Users who have tooltip-use-echo-area non-nil already indicate that
> they "give up" the position of the tool-tip text display on the
> screen, and don't mind to see all the tool-tips in the same place
> regardless of where the mouse is.
I thought the reason for displaying tooltips during mouse dragging was
that it allowed to provide some visual feedback as to what text is being
dragged and where it will end up.
Displaying tooltips in the echo area will naturally give up on the
latter.
But if you insist, I can make the changes conditional on tooltips being
displayed normally (i.e. not in the echo area).
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: master 47dcf72: Fix tooltip text properties showing up in dragged text
2022-03-17 0:33 ` Po Lu
@ 2022-03-17 6:49 ` Eli Zaretskii
2022-03-17 7:04 ` Po Lu
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-03-17 6:49 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 17 Mar 2022 08:33:42 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > The tooltip display in the echo area also doesn't follow the mouse, so
> > it doesn't sound to me as if this case is a significant difference.
> > Users who have tooltip-use-echo-area non-nil already indicate that
> > they "give up" the position of the tool-tip text display on the
> > screen, and don't mind to see all the tool-tips in the same place
> > regardless of where the mouse is.
>
> I thought the reason for displaying tooltips during mouse dragging was
> that it allowed to provide some visual feedback as to what text is being
> dragged and where it will end up.
>
> Displaying tooltips in the echo area will naturally give up on the
> latter.
But isn't that better than not showing anything at all (which is what
will happen with the current code)? Suppose we are talking about a
terminal where x-show-tip doesn't work at all, like a TTY with a
mouse, or when tooltip-mode is turned off?
> But if you insist, I can make the changes conditional on tooltips being
> displayed normally (i.e. not in the echo area).
I'd rather suggest that you call tooltip-show-help-non-mode directly
when tooltip-use-echo-area is non-nil. Or am I missing something?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: master 47dcf72: Fix tooltip text properties showing up in dragged text
2022-03-17 6:49 ` Eli Zaretskii
@ 2022-03-17 7:04 ` Po Lu
0 siblings, 0 replies; 8+ messages in thread
From: Po Lu @ 2022-03-17 7:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> But isn't that better than not showing anything at all (which is what
> will happen with the current code)? Suppose we are talking about a
> terminal where x-show-tip doesn't work at all, like a TTY with a
> mouse, or when tooltip-mode is turned off?
Ah, yes, I missed those. We should thus call
`tooltip-show-help-non-mode' on such TTYs. I'm still not quite sure
about what to do when tooltip-mode is off, though, since that precludes
the possibility of displaying "real" tooltips while dragging even if
tooltip-mode is off.
> I'd rather suggest that you call tooltip-show-help-non-mode directly
> when tooltip-use-echo-area is non-nil. Or am I missing something?
This looks good to me, thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-03-17 7:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-16 12:34 master 47dcf72: Fix tooltip text properties showing up in dragged text Eli Zaretskii
2022-03-16 13:29 ` Po Lu
2022-03-16 13:42 ` Eli Zaretskii
2022-03-16 13:45 ` Po Lu
2022-03-16 14:25 ` Eli Zaretskii
2022-03-17 0:33 ` Po Lu
2022-03-17 6:49 ` Eli Zaretskii
2022-03-17 7:04 ` Po Lu
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).