From: Drew Adams <drew.adams@oracle.com>
To: Po Lu <luangruo@yahoo.com>
Cc: "clement.pitclaudel@live.com" <clement.pitclaudel@live.com>,
Lars Ingebrigtsen <larsi@gnus.org>, Eli Zaretskii <eliz@gnu.org>,
"23341@debbugs.gnu.org" <23341@debbugs.gnu.org>,
martin rudalics <rudalics@gmx.at>
Subject: bug#23341: x-show-tip does not respect the value of tooltip-hide-delay, and the default tooltip timeout isn't configurable
Date: Tue, 3 May 2022 04:16:17 +0000 [thread overview]
Message-ID: <SJ0PR10MB5488FAF9209DF66B6F66A531F3C09@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87fslrnzll.fsf@yahoo.com>
> > Everything that's not determined by the specific
> > call that `tooltip-show' makes of `x-show-tip'.
>
> Which includes? Almost everything `x-show-tip'
> accepts can be changed when using `tooltip-show',
Huh? _None_ of `x-show-tip's args is available
to `tooltip-show' - except the TEXT/STRING arg.
> and anything that cannot is simply unsafe,
> because none of the code was designed around
> or tested with that assumption.
Anything safe enough for `tooltip-show' to use
is safe enough for `x-show-tip' to use. That
much should be obvious, and that much you
should agree with, I think.
All the former does is call the latter. The
args it passes to `x-show-tip' are wide open
as to their possible values.
Limiting args passed to `x-show-tip' to the
possible values that `tooltip-show' can pass
to it clearly doesn't change anything wrt
"danger" or something that's not designed
or is untested.
It's only a question of HOW those values are
passed - in a crude, clumsy, straitjacket
way or in the usual, open, Lispy arg-passing
way.
Now maybe you want to make an explicit claim
that the set of all possible values for those
`tooltip-*' settings are all that should ever
be passed to `x-show-tip', because they're
all you're sure of (designed, tested).
If so, go right ahead. Put that in the
guidance, if you're so sure of those values,
and so unsure of any others.
> > IOW, the only possible input to the whole deal,
> > affecting the appearance, is TEXT. All the
> > rest is baked in.
>
> There could also be `tooltip-frame-parameters',
> but I fail to see the relevance.
That, and every other arg that `tooltip-show'
passes to `x-show-tip' - face `tooltip',
`tooltip-*' vars, etc. Pretty wide open.
Collect all their possible values, if you think
they're so well designed and tested. Tell users
of `x-show-tip' to use only those values as args.
End of story.
Then you end up, in effect, with a better, more
flexible, more normal, more lispy `tooltip-show'.
You end up with `x-show-tip' plus your guidance,
which you seem to be so sure of (though it's
pretty smoky, so far). Go for it, if that's
your real message: only those values are sure
and safe.
Only whatever face `tooltip' could possibly be.
Only what `tooltip-frame-parameters' could be.
Only what `tooltip-hide-delay', `tooltip-x-offset',
and `tooltip-y-offset' could possibly be.
Do you really believe that their possible values
make things safe? Fine, tell users not to use
any other values. I don't have a problem with
your telling users that - not at all. That's
still _wide open_.
> > Now, you can say that code could always bind
> > all of those `tooltip-*' thingies around a call
> > to `tooltip-show'. Sure, it could. It could
> > end up redefining, in effect, `x-tooltip-show'.
>
> That is indeed the way to go.
Really? You really think so?
> > I'd say it makes more sense to (also) let users
> > use the more general, more versatile function
> > itself, `x-show-tip' - just as `tooltip-show' does.
>
> I disagree, once again, because it's simply not safe.
See above. Same safety - identical.
(defun foo (string &optional frame parms timeout dx dy
use-echo-area)
(with-selected-frame frame)
(let ((text string)
(tooltip-frame-parameters (copy-sequence parms))
(tooltip-hide-delay timeout)
(tooltip-x-offset dx)
(tooltip-y-offset dy))
(tooltip-show text use-echo-area))))
Does that make you feel safer?
> If someone
> volunteers to look through all the X-related code that involves
> accessing frame widgets, pseudo windows, redisplay, and other frame
> parameters and window properties such as `override-redirect' and
> WM_TRANSIENT_FOR, then that might be okay, but so far nobody has done
> that. (And probably nobody will either, since no matter what you say,
> `x-show-tip' is still an internal function that user code should not
> touch.)
Bof. More bluster.
next prev parent reply other threads:[~2022-05-03 4:16 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
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 [this message]
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=SJ0PR10MB5488FAF9209DF66B6F66A531F3C09@SJ0PR10MB5488.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=23341@debbugs.gnu.org \
--cc=clement.pitclaudel@live.com \
--cc=eliz@gnu.org \
--cc=larsi@gnus.org \
--cc=luangruo@yahoo.com \
--cc=rudalics@gmx.at \
/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).