From: Drew Adams <drew.adams@oracle.com>
To: Po Lu <luangruo@yahoo.com>, Lars Ingebrigtsen <larsi@gnus.org>
Cc: "clement.pitclaudel@live.com" <clement.pitclaudel@live.com>,
"23341@debbugs.gnu.org" <23341@debbugs.gnu.org>
Subject: bug#23341: x-show-tip does not respect the value of tooltip-hide-delay, and the default tooltip timeout isn't configurable
Date: Sun, 1 May 2022 16:19:28 +0000 [thread overview]
Message-ID: <SJ0PR10MB548827784AEE6645F266F552F3FE9@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <8735htqum4.fsf@yahoo.com>
> But there are external packages calling that function utilizing the
> default meanings of its parameters, and it's also an internal function
> used by `read-file-dialog', so the analogy with `x-show-tip' is
> complete.
FWIW, I don't see why `x-show-tip' is being
considered "internal". And I'm one who uses it in
external libraries.
If `tooltip-show' can use `x-show-tip' then so
can "external" code that does something similar.
The only even partially good excuse for branding
something "internal" is to let users know not to
depend too heavily on its behavior, as it might
change sometime. (And that's anyway true of
everything in Emacs.)
`tooltip-show' is not sufficiently general to
serve as a replacement for the use cases of
`x-show-tip'. Branding the latter "off limits"
is misguided, IMO.
This, in the `x-show-tip' doc string, is misguided:
This is an internal function; Lisp code should
call `tooltip-show'.
(No reason given, BTW. Nothing that helps users
understand. Just a big "VERBOTEN !" sign.)
___
On the other hand, there's nothing wrong with
_documenting_, clearly, any caveats that you
think users of `x-show-tip' should be aware of.
And by "documenting" I don't mean hand-waving
about unspoken, unclear "complications".
___
Even the title of this bug should be a clue
that something is wrong about it: the tail is
wagging the dog. Why should `x-show-tip'
respect the value of `tooltip-hide-delay'?
It's the other way around: `x-show-tip' does
not, and should not, depend on any `tooltip-*'.
It's `tooltip-*' that depends on its use of
`x-show-tip'.
___
What Martin said in this bug thread is sound:
A function that calls 'x-show-tip' directly
should generally use 'tooltip-hide-delay' as
^^^^^^^^^
TIMEOUT argument. If it doesn't, it should
provide a customizable variable to use as
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TIMEOUT argument instead.
That's reasonable. If you can reasonably use
`tooltip-show' then do so. If you can't, use
`x-show-tip'.
And in the latter case, if it makes sense to
use `tooltip-hide-delay' as the TIMEOUT arg,
then do so.
If not, then if you can reasonably provide a
user option, to let users specify the TIMEOUT
to use, then do so.
Different uses of showing a tooltip can call
for different behaviors, including different
TIMEOUT values. For some uses the general
option `tooltip-hide-delay' is appropriate.
For others it's not - instead, you want to
let users specify another timeout value.
Martin also suggested:
Any package that optionally provides its
own delay for hiding tips should, by default,
use the value of 'tooltip-hide-delay' for
that option.
That too makes sense, _in general_. But
"should" should be avoided in such guidance,
unless "in general" follows. The devil is
in the details, i.e., in what the use case is.
None of this is complicated. None of it is
a reason to call `x-show-tip' off limits.
___
And what Martin said about `x-show-tip' arg
TIMEOUT is also sound for args DX and DY:
use options `tooltip-[xy]-offset', or
provide library-specific options.
___
The bug filer even admitted the following,
in response to Martin's clear advice:
this isn't a documented convention AFAICS,
That calls out for the _proper_ "fix": Just
add what Martin suggested to the doc. Don't
make a mountain out of this mole hill.
___
This, I think, is the bottom-line expression
of the bug OP's problem:
I opened this issue based on the experience
that it took me some non-trivial amount of
time to figure out that I had to configure
flycheck-pos-tip-delay, and not tooltip-delay.
flycheck-pos-tip follows the convention that
you outlined above, but that convention wasn't
obvious to me, and doesn't yield a consistent
or very nice experience (any time I install a
package that uses tooltips, I need to wonder
configure its timeout, unless it uses tooltip
- which I can't easily guess).
IMO, this just points to a case of either or
both (1) something (`flycheck-pos-tip') not
being well-enough documented or (2) a user not
using `C-m' or otherwise checking what a library
provides before using it.
If Flycheck provides an option for the hide
delay it uses, and if it makes that provision
obvious, then I don't see a Flycheck bug (or
any other bug).
Eli said something similar, I think:
Bottom line, I think the bug is in the
packages that don't provide customizations
for this, and you should take this up with
the respective maintainers.
(I say "I think", because maybe he meant more
than that, about an option. Maybe he too
meant to suggest that no library should use
`x-show-tip'.)
If in fact it makes better sense for Flycheck
to _not_ provide its own delay option, and
instead to just use `tooltip-hide-delay', then
change it to do that. (I have no opinion here.)
But there's no requirement that code that uses
`x-show-tip' use anything `tooltip-*'. That
would be backward: the tail wagging the dog.
3rd-party code, just as much as `tooltip.el',
can reasonably make use of `x-show-tip'.
The OP's complaint is essentially this:
I don't want to have to configure every
package that I use independently. It's
good to be able to fine-tune independent
packages, but consistent defaults are nice
in any case, aren't they?
And this:
As a user, I would like to have a way to
globally configure how long tooltips
produced by Emacs are displayed. At the
moment, Emacs does not provide such a
default. tooltip-hide-delay is close, but
it does not cover all tooltips.
It can't - and it shouldn't necessarily -
cover all tooltips, because Emacs cannot
know how some particular library (use case)
might make use of tooltips. OP's
inconvenience is the cost of not being able
to predict and reasonably cover every use
case.
So the answer is yes, consistency is nice
when it makes sense. But yes, if it makes
sense for a library to provide its own
settings, such a options, as opposed to just
using a generally/globally "consistent"
setting, then it's up to you as a user to
recognize that fact and act accordingly.
If a library gives you an option to get the
behavior you like as a user, then don't
complain that it's a bother to specify that.
If _you_ think that option should default
to the value of a more general option, then
tell it to the library maintainer. It's
possible that the maintainer has a good
reason to have provided you with a separate
option.
Or not. IOW, it's either a problem with
that library or a user problem. It's not a
problem with `x-show-tip'. One person's
inconvenience for having to customize more
than just one option is another person's
relief in being able to get behavior, in a
particular context, that differs from what
that general option provides.
As Eli put it:
to me, such a global value makes very
little sense, because tooltips can be
used for many different features that
don't necessary display short helpful
text. Having a single value for all the
possible use cases is IMO not a good
customization design, as it can never be
a "one fits all" value anyway.
And he says this, with which I also agree:
tooltip-hide-delay has no relation
whatsoever to x-show-tip. It is a user
option supported by functions in tooltip.el,
as its name says.
No relation, although I also agree with
Martin's suggestion that it can make sense
to use that option in a call to `x-show-tip'
when other things are equal (i.e., when
there's no good reason not to).
___
There were good things said in this thread.
This is not one of them, IMO:
Reading this thread, there were some good
arguments for why we shouldn't add such a
variable -- x-show-tip isn't supposed to
be called directly, and tooltip.el already
has a way to tweak this.
Drop the "x-show-tip isn't supposed to be
called directly". That's misguided. The
rest is fine.
___
Just one opinion, from one 3rd-party provider,
who sometimes uses `x-show-tip' with
`tooltip-hide-delay' and sometimes uses it
with a delay option designed for use with a
specific library that calls `x-show-tip'.
next prev parent reply other threads:[~2022-05-01 16:19 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-23 2:47 bug#23341: x-show-tip does not respect the value of tooltip-hide-delay, and the default tooltip timeout isn't configurable Clément Pit--Claudel
2016-04-23 6:53 ` Eli Zaretskii
2016-04-23 14:22 ` Clément Pit--Claudel
2016-04-23 14:36 ` Eli Zaretskii
2016-04-23 15:26 ` Clément Pit--Claudel
2016-04-23 17:54 ` Eli Zaretskii
2016-04-23 22:33 ` Clément Pit--Claudel
2016-04-24 6:08 ` Eli Zaretskii
2016-04-24 14:43 ` Clément Pit--Claudel
2016-04-24 15:59 ` Eli Zaretskii
2016-04-23 8:13 ` martin rudalics
2016-04-23 14:27 ` Clément Pit--Claudel
2016-04-23 17:08 ` martin rudalics
2016-04-23 17:26 ` Clément Pit--Claudel
2016-04-24 8:40 ` martin rudalics
2016-04-24 14:40 ` Clément Pit--Claudel
2016-04-24 15:57 ` Eli Zaretskii
2016-04-24 16:30 ` Clément Pit--Claudel
2016-04-26 6:35 ` martin rudalics
2016-04-26 11:25 ` Dmitry Gutov
2022-04-30 15:10 ` Lars Ingebrigtsen
2022-04-30 15:30 ` Eli Zaretskii
2022-04-30 15:38 ` Lars Ingebrigtsen
2022-04-30 16:01 ` Eli Zaretskii
2022-04-30 16:22 ` Lars Ingebrigtsen
2022-04-30 16:50 ` Eli Zaretskii
2022-05-01 0:12 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-01 8:37 ` Lars Ingebrigtsen
2022-05-01 9:19 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-01 9:53 ` Lars Ingebrigtsen
2022-05-01 10:38 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-01 10:39 ` Lars Ingebrigtsen
2022-05-01 11:00 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-01 11:42 ` Lars Ingebrigtsen
2022-05-01 12:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-01 16:19 ` Drew Adams [this message]
2022-05-02 0:35 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-02 2:19 ` Drew Adams
2022-05-02 2:50 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-02 14:53 ` Drew Adams
2022-05-03 0:22 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-03 1:32 ` Drew Adams
2022-05-03 2:01 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-03 4:16 ` Drew Adams
2022-05-03 4:44 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=SJ0PR10MB548827784AEE6645F266F552F3FE9@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=23341@debbugs.gnu.org \
--cc=clement.pitclaudel@live.com \
--cc=larsi@gnus.org \
--cc=luangruo@yahoo.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).