From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20164: 25.0.50; Do not tell users that `x-show-tip' is internal Date: Fri, 02 Aug 2019 17:20:53 +0300 Message-ID: <83imrffy2i.fsf@gnu.org> References: <7d0f8249-d653-40f9-8534-9ffe29d689a2@default> <87ftmjrbsy.fsf@mouse.gnus.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="86143"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 20164@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 02 16:22:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htYRf-000MFN-Uy for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Aug 2019 16:22:12 +0200 Original-Received: from localhost ([::1]:35238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htYRe-0008M6-HL for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Aug 2019 10:22:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35594) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htYRX-0008LV-Im for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 10:22:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htYRW-00087N-AS for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 10:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48688) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htYRV-000879-RG for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 10:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1htYRV-0001hK-K5 for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2019 10:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Aug 2019 14:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20164 X-GNU-PR-Package: emacs Original-Received: via spool by 20164-submit@debbugs.gnu.org id=B20164.15647556686429 (code B ref 20164); Fri, 02 Aug 2019 14:22:01 +0000 Original-Received: (at 20164) by debbugs.gnu.org; 2 Aug 2019 14:21:08 +0000 Original-Received: from localhost ([127.0.0.1]:57505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htYQe-0001fd-Go for submit@debbugs.gnu.org; Fri, 02 Aug 2019 10:21:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1htYQc-0001eo-B7 for 20164@debbugs.gnu.org; Fri, 02 Aug 2019 10:21:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1htYQW-0007oD-W6; Fri, 02 Aug 2019 10:21:01 -0400 Original-Received: from [176.228.60.248] (port=2636 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1htYQW-00010W-G1; Fri, 02 Aug 2019 10:21:00 -0400 In-reply-to: <87ftmjrbsy.fsf@mouse.gnus.org> (message from Lars Ingebrigtsen on Fri, 02 Aug 2019 14:28:45 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:164353 Archived-At: > From: Lars Ingebrigtsen > Date: Fri, 02 Aug 2019 14:28:45 +0200 > Cc: 20164@debbugs.gnu.org > > Drew Adams writes: > > > The doc string says this: > > > > This is an internal function; Lisp code should call `tooltip-show'. > > > > Why? While it is true that you can get, using `tooltip-show', the > > behavior of arg PARMS by binding `tooltip-frame-parameters', the behavior > > of args DX and DY by binding `tooltip-x-offset' and `tooltip-y-offset', > > and the behavior of arg TIMEOUT by binding `tooltip-hide-delay' (which is > > not documented, BTW), you cannot the behavior of arg FRAME. And binding > > user options is not really a great way to control the function behavior, > > in general. I wonder when we will stop wasting time and energy on hair-splitting reports such as this one. Probably never. Sigh. > I agree that the calling conventions for `x-show-tip' seems to be much > nicer than `tooltip-show'. If you do, please explain it to me, because the above arguments don't convince me, certainly not that x-show-tip's API is "nicer". Maybe I'm missing something. Tooltips are about showing short hints about various elements of the UI, they are not general-purpose tools for showing arbitrary text in arbitrary places. And tooltip-show looks entirely reasonable and adequate for the job as defined above. It could be that someone tried to use tooltips as poor-man's child frames, but we now have those as first-class objects, so any such (ab)use would be unnecessary. > > So `tooltip-show' is not really a user-level substitute for "internal" > > `x-tooltip-show'. > > > > What's more, the doc of `tooltip-show' explicitly refers to how variable > > `x-max-tooltip-size' affects the behavior. Why refer to that "internal" > > variable? And if it is not "internal" then why does it have the prefix > > `x-'? Why isn't there a `tooltip-max-size' option, corresponding to the > > other `tooltip-*' options? I don't remember why I added a reference to that variable when I extended the doc string of tooltip-show in 2001(!), but I hope no one will argue that it's important to know the displayed text might be truncated. > The commit that added the line about it being internal just says "doc > fix", Guilty as charged ;-) > so I can only guess what the reason behind it was No need for guessing; see the short discussion starting at https://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00261.html The conclusion to take out of that discussion is that whoever uses x-show-tip should know very well what they are doing, which is another way of saying "kids, don't try that at home", a.k.a. "an internal function". > So perhaps the way forward here is to make `x-max-tooltip-size' an > obsolete alias for a new variable `tooltip-max-size'? And add a way to > specify the FRAME parameter somehow... but the calling convention for > that function is kinda meh. Before we do something like that, I'd like someone to explain why would they need to call x-show-tip for showing a tooltip.