From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#30399: 27.0.50; tooltips are broken Date: Fri, 09 Feb 2018 11:49:30 +0100 Message-ID: <87d11eh1z9.fsf@gmx.net> References: <87wozn9kyy.fsf@gmx.net> <5A7D6F9A.1010504@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1518173390 3137 195.159.176.226 (9 Feb 2018 10:49:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Feb 2018 10:49:50 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 30399@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 09 11:49:45 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ek6FI-0008Cq-0d for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Feb 2018 11:49:32 +0100 Original-Received: from localhost ([::1]:33353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ek6HJ-0002qR-5c for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Feb 2018 05:51:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ek6Fx-0001qJ-Lt for bug-gnu-emacs@gnu.org; Fri, 09 Feb 2018 05:50:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ek6Fn-0001KJ-0a for bug-gnu-emacs@gnu.org; Fri, 09 Feb 2018 05:50:12 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55060) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ek6Fm-0001K7-St for bug-gnu-emacs@gnu.org; Fri, 09 Feb 2018 05:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ek6Fm-0004mh-Lr for bug-gnu-emacs@gnu.org; Fri, 09 Feb 2018 05:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Feb 2018 10:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30399 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30399-submit@debbugs.gnu.org id=B30399.151817338018359 (code B ref 30399); Fri, 09 Feb 2018 10:50:02 +0000 Original-Received: (at 30399) by debbugs.gnu.org; 9 Feb 2018 10:49:40 +0000 Original-Received: from localhost ([127.0.0.1]:34724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ek6FQ-0004m3-1P for submit@debbugs.gnu.org; Fri, 09 Feb 2018 05:49:40 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:44555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ek6FO-0004lq-3q for 30399@debbugs.gnu.org; Fri, 09 Feb 2018 05:49:38 -0500 Original-Received: from rosalinde ([83.135.20.151]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MTSrf-1eIlx61yUx-00SRnb; Fri, 09 Feb 2018 11:49:31 +0100 In-Reply-To: <5A7D6F9A.1010504@gmx.at> (martin rudalics's message of "Fri, 09 Feb 2018 10:53:30 +0100") X-Provags-ID: V03:K0:rhan4VSfczawkY9ASaSwDBw3EudhzTICK1lOgI0PICIy7lxh5Js rUbA+0+/dYJxv2ZQ5d5S6bjgs5CAu3TKxrAZ1C5MVhSr0ztV6BmOf9R3Qre4Pfmjab9/jar 9RDG63wdnuXyjw5luMXmh9ha2NhXSypwYIVazR13F76lZHjw6n8bDNaLLuG3zOA1QALvXgC MnRSiGBMGbXPS7p9xi+ow== X-UI-Out-Filterresults: notjunk:1;V01:K0:/ymsaLCvo+Q=:YazEDyOWTecAvxA3RWST6q RPcp52Br3Etvmv18IKJ/SIJ+D0w61F1oMODI9ckbcoom9uapxTy/8eEz6sL0oeBE5YuphzzoM K8nidnMOFB7lT5rf+q4S0s/q1VcGCdzO7ILy/KjFpMslDFCZqNGtLlbinXibxI1uSXoMGP8wS kpV09BgfSHMwBlDh4rY8zhEsZ2KxUV/msktm/t2sjsjGjeWy58SAT8bss5RT0r46CErVh358g BDPGgREmzlNdFKCgh/E8DlL2Y5sYLIT0L0mdbIw8ScvqhGxzpJQTaAvPIMG5OtdhHSYD26XlY En4B7aqKEqhKZdGipd1mWN6YoETG8ohJCMzgU0XBahnewrY1r8Vl//iSdC/tcevdgG/ZSFk1p LF8PmB2k87KewxG//dysQxBQLzriZrxIAwBEmdVT5EJwknyohceEiUGTJlXSMGE28wnmnhwlv IXlUHIS1EJgW9JV4ZZ9UV+voSo9pKy5d47wcrr9b8w0+vqb+L70t3ZXfCuBue7fIzjMTd8AJr DQz+TWrqitHeyCq6huhOIVHsiDF9kaSxe/XBZkBit3Eyo5Z7qSB9PZ3ItE0oIi3QslbmsGYyp 0+us2l7eJ1FNOBppXTVgoYqzrX+JHsbfz1pa5fHBrU37gRKQervSffFn+Nh9NESTMgMcsPucV FbsYtpNLF02wlr6YAYj0omnUdWVcs2TjjeCK7FE9tNC3FoC8tLRgb+1poYU2d4CrHeKPu5snk 4gzbQb+bxw0zXS1dgQ3ygyaXDjZ8BOMrpvDeAfafvJSf6VA0MY8vw+VYpF6wtBsQaXo21ksK 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: 208.118.235.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:143050 Archived-At: On Fri, 09 Feb 2018 10:53:30 +0100 martin rudalics wrote: >> And here's the buggy behavior (starting with step 2) I see on master >> since the above commit: >> >> 0. emacs -Q >> 1. evaluate (tooltip-show "This is a test") >> => A GTK+-themed tooltip is displayed for 10 seconds or until there >> is an input event, then disappears. >> 2. evaluate (x-show-tip "This is a test") >> => A GTK+-themed tooltip is displayed and remains displayed, even if >> there are input events, until executing step 3 or repeating step 1. > > This is due to a rather silly omission which should have already > defeated a feature in Emacs 26 when calling 'x-show-tip' (you've been > warned - Lisp code should call 'tooltip-show'). I know, and the code that revealed this bug does use tooltip-show; but the above difference between them puzzled me, since tooltip-show is a wrapper around x-show-tip. >> 3. evaluate (let (x-gtk-use-system-tooltips) >> (tooltip-show "This is a test")) >> => A non-toolkit tooltip is displayed and remains displayed, even if >> there are input events, until the end of the Emacs session (at least >> I haven't found a way to get rid of it); however, if the GTK+-themed >> tooltip from step 2 is still displayed when the above sexp is >> evaluated, then after 10 (not 5) seconds the GTK+-themed tooltip >> disappears (but the non-toolkit tooltip remains). >> 4. evaluate (let (x-gtk-use-system-tooltips) >> (x-show-tip "This is a test")) >> => A non-toolkit tooltip is displayed and remains displayed, even if >> there are input events, until the end of the Emacs session AFAICT; if >> the tooltip from step 3 is still displayed when the above sexp is >> evaluated, it is just moved by this step but does not disappear, and >> if the GTK+-themed tooltip from step 2 is still displayed that >> tooltip also remains displayed (unlike in step 3). > > Let-binding 'x-gtk-use-system-tooltips' is a more delicate issue. As > a rule, options should never be let-bound but since the customizer is > always right we'll probably have to fix this as well. I generally use the default value of x-gtk-use-system-tooltips, but for appointments I use a custom tooltip, which AFAICT requires setting x-gtk-use-system-tooltips to nil. Is there some way to achieve this without let-binding (or using setq twice within the function defining the appointment tooltip)? > Please try the attached fix. It restores the previous behavior; thanks! > And please test it also with the inverse > scenario > > (setq x-gtk-use-system-tooltips nil) > (let ((x-gtk-use-system-tooltips t)) > (tooltip-show "Test")) This also works as expected, i.e., within the let-binding the tooltip is the GTK+-themed one, and outside of the let-binding it's the not-toolkit tooltip. Thanks for the quick fix. Steve Berman