GNU bug report logs -
#76653
31.0.50; tooltip-delay not honored when tooltip-mode is disabled
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Fri, 28 Feb 2025 18:18:05 UTC
Severity: normal
Found in version 31.0.50
Done: Dani Moncayo <dmoncayo <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76653 in the body.
You can then email your comments to 76653 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76653
; Package
emacs
.
(Fri, 28 Feb 2025 18:18:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dani Moncayo <dmoncayo <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 28 Feb 2025 18:18:06 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From 'emacs -Q': disable tooltip-mode (M-x tooltip-mode RET) and then
move the mouse pointer over the buffer ID (in the mode line).
The tooltip text appears in the echo area immediately (just after the
mouse pointer enters the "buffer ID area").
But IIUC, it should wait a little time (tooltip-delay seconds) before
showing the help text (just like when tooltip-mode is enabled).
In GNU Emacs 31.0.50 (build 70, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2025-02-28 built on C11-Q8YAKWONJX0
Repository revision: 68a37760dec83a8126b03bcacc60a96644a6831f
Repository branch: master
Windowing system distributor 'Microsoft Corporation', version 11.0.12010000
System Description: Ubuntu 24.04.2 LTS
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA
XINPUT2 XPM XRANDR GTK3 ZLIB
Important settings:
value of $LANG: C.UTF-8
locale-coding-system: utf-8-unix
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76653
; Package
emacs
.
(Sat, 01 Mar 2025 11:30:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 76653 <at> debbugs.gnu.org (full text, mbox):
> From: Dani Moncayo <dmoncayo <at> gmail.com>
> Date: Fri, 28 Feb 2025 19:17:31 +0100
>
> >From 'emacs -Q': disable tooltip-mode (M-x tooltip-mode RET) and then
> move the mouse pointer over the buffer ID (in the mode line).
>
> The tooltip text appears in the echo area immediately (just after the
> mouse pointer enters the "buffer ID area").
> But IIUC, it should wait a little time (tooltip-delay seconds) before
> showing the help text (just like when tooltip-mode is enabled).
Thanks. Indeed, the current code ignores the delays on text-only
terminals. Does the patch below give good results?
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 482af3b..51a9841 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -251,7 +251,8 @@ tooltip-show
`use-system-tooltips' is non-nil and Emacs is built with support
for system tooltips, such as on NS, Haiku, and with the GTK
toolkit."
- (if use-echo-area
+ (if (or use-echo-area
+ (not (display-graphic-p)))
(tooltip-show-help-non-mode text)
(condition-case error
(let ((params (copy-sequence tooltip-frame-parameters))
@@ -285,8 +286,13 @@ tooltip-hide
"Hide a tooltip, if one is displayed.
Value is non-nil if tooltip was open."
(tooltip-cancel-delayed-tip)
- (when (x-hide-tip)
- (setq tooltip-hide-time (float-time))))
+ (if (display-graphic-p)
+ (when (x-hide-tip)
+ (setq tooltip-hide-time (float-time)))
+ (let ((msg (current-message)))
+ (message "")
+ (when (not (or (null msg) (equal msg "")))
+ (setq tooltip-hide-time (float-time))))))
;;; Debugger-related functions
@@ -386,11 +392,10 @@ tooltip-show-help-non-mode
(defun tooltip-show-help (msg)
"Function installed as `show-help-function'.
MSG is either a help string to display, or nil to cancel the display."
- (if (and (display-graphic-p)
- ;; Tooltips can't be displayed on top of the global menu
- ;; bar on NS.
- (or (not (eq window-system 'ns))
- (not (menu-or-popup-active-p))))
+ (if ;; Tooltips can't be displayed on top of the global menu bar on
+ ;; NS.
+ (not (and (eq window-system 'ns)
+ (menu-or-popup-active-p)))
(let ((previous-help tooltip-help-message))
(setq tooltip-help-message msg)
(cond ((null msg)
@@ -408,9 +413,7 @@ tooltip-show-help
;; A different help. Remove a previous tooltip, and
;; display a new one, with some delay.
(tooltip-hide)
- (tooltip-start-delayed-tip))))
- ;; On text-only displays, try `tooltip-show-help-non-mode'.
- (tooltip-show-help-non-mode msg)))
+ (tooltip-start-delayed-tip))))))
(defun tooltip-help-tips (_event)
"Hook function to display a help tooltip.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76653
; Package
emacs
.
(Sat, 01 Mar 2025 12:07:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 76653 <at> debbugs.gnu.org (full text, mbox):
On Sat, Mar 1, 2025 at 12:29 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> Thanks. Indeed, the current code ignores the delays on text-only
> terminals. Does the patch below give good results?
Unless I'm doing something wrong (which is quite possible), your patch
isn't working here.
I've applied the patch, built Emacs, and repeated the original recipe
-- I see the same behavior as before (the help text appears in the
echo area immediately).
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76653
; Package
emacs
.
(Sat, 01 Mar 2025 14:16:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 76653 <at> debbugs.gnu.org (full text, mbox):
> From: Dani Moncayo <dmoncayo <at> gmail.com>
> Date: Sat, 1 Mar 2025 13:06:17 +0100
> Cc: 76653 <at> debbugs.gnu.org
>
> On Sat, Mar 1, 2025 at 12:29 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > Thanks. Indeed, the current code ignores the delays on text-only
> > terminals. Does the patch below give good results?
>
> Unless I'm doing something wrong (which is quite possible), your patch
> isn't working here.
>
> I've applied the patch, built Emacs, and repeated the original recipe
> -- I see the same behavior as before (the help text appears in the
> echo area immediately).
Please describe what you did, in all the details.
Please also enlarge the value of tooltip-delay to something like 3
sec, to make sure you can reliably distinguish between the delay and
the "immediate" display. And be sure you understand the effect of
tooltip-recent-seconds on the tool-tip delay display.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76653
; Package
emacs
.
(Sat, 01 Mar 2025 14:27:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 76653 <at> debbugs.gnu.org (full text, mbox):
> Cc: 76653 <at> debbugs.gnu.org
> Date: Sat, 01 Mar 2025 16:14:35 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > From: Dani Moncayo <dmoncayo <at> gmail.com>
> > Date: Sat, 1 Mar 2025 13:06:17 +0100
> > Cc: 76653 <at> debbugs.gnu.org
> >
> > On Sat, Mar 1, 2025 at 12:29 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > >
> > > Thanks. Indeed, the current code ignores the delays on text-only
> > > terminals. Does the patch below give good results?
> >
> > Unless I'm doing something wrong (which is quite possible), your patch
> > isn't working here.
> >
> > I've applied the patch, built Emacs, and repeated the original recipe
> > -- I see the same behavior as before (the help text appears in the
> > echo area immediately).
>
> Please describe what you did, in all the details.
>
> Please also enlarge the value of tooltip-delay to something like 3
> sec, to make sure you can reliably distinguish between the delay and
> the "immediate" display. And be sure you understand the effect of
> tooltip-recent-seconds on the tool-tip delay display.
Sorry, ignore the above.
When you disable tooltip-mode, the delays are also disabled. That's
by design, since the delayed display is part of this mode.
What I fixed was that on text-mode terminals the delay was also
disabled, even though tooltip-mode was enabled.
So if you expect the delay to be in effect when the mode is disabled,
then your expectations are incorrect.
Reply sent
to
Dani Moncayo <dmoncayo <at> gmail.com>
:
You have taken responsibility.
(Sat, 01 Mar 2025 14:49:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dani Moncayo <dmoncayo <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 01 Mar 2025 14:49:03 GMT)
Full text and
rfc822 format available.
Message #22 received at 76653-done <at> debbugs.gnu.org (full text, mbox):
On Sat, Mar 1, 2025 at 3:26 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> When you disable tooltip-mode, the delays are also disabled. That's
> by design, since the delayed display is part of this mode.
>
> What I fixed was that on text-mode terminals the delay was also
> disabled, even though tooltip-mode was enabled.
>
> So if you expect the delay to be in effect when the mode is disabled,
> then your expectations are incorrect.
OK. I think it would be nice to have the possibility to configure the
delay I was expecting. But this is a minor feature that nobody
(except me) seems to have missed. So let's close this ticket.
Thanks.
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76653
; Package
emacs
.
(Sat, 01 Mar 2025 15:18:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 76653-done <at> debbugs.gnu.org (full text, mbox):
> From: Dani Moncayo <dmoncayo <at> gmail.com>
> Date: Sat, 1 Mar 2025 15:48:25 +0100
> Cc: 76653-done <at> debbugs.gnu.org
>
> On Sat, Mar 1, 2025 at 3:26 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > When you disable tooltip-mode, the delays are also disabled. That's
> > by design, since the delayed display is part of this mode.
> >
> > What I fixed was that on text-mode terminals the delay was also
> > disabled, even though tooltip-mode was enabled.
> >
> > So if you expect the delay to be in effect when the mode is disabled,
> > then your expectations are incorrect.
>
> OK. I think it would be nice to have the possibility to configure the
> delay I was expecting. But this is a minor feature that nobody
> (except me) seems to have missed. So let's close this ticket.
>
> Thanks.
OK, I've installed the changes on the master branch.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 30 Mar 2025 11:24:29 GMT)
Full text and
rfc822 format available.
This bug report was last modified 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.