From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Fix some tooltip related problems Date: Thu, 11 Jan 2018 11:50:10 -0800 (PST) Message-ID: References: <5A533FA4.4030507@gmx.at> <9384bae5-cbb9-4b4d-ac5c-1d01f01c8117@default> <5A53B633.5020706@gmx.at> <41d40db5-15d8-4b2c-a058-fb6dabc8bfd3@default> <5A548E7E.2040601@gmx.at> <5A55E8ED.1010602@gmx.at> <475d480b-3885-4779-ae46-09cf7fbbcee7@default> <5A5742E7.3070303@gmx.at> <5A5799A5.1070305@gmx.at> <5A57B302.5090108@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1515700118 7775 195.159.176.226 (11 Jan 2018 19:48:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Jan 2018 19:48:38 +0000 (UTC) To: martin rudalics , emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 11 20:48:34 2018 Return-path: Envelope-to: ged-emacs-devel@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 1eZipz-0001bP-5z for ged-emacs-devel@m.gmane.org; Thu, 11 Jan 2018 20:48:31 +0100 Original-Received: from localhost ([::1]:37727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZiry-0002sf-RY for ged-emacs-devel@m.gmane.org; Thu, 11 Jan 2018 14:50:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZirl-0002ps-B9 for emacs-devel@gnu.org; Thu, 11 Jan 2018 14:50:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZirh-0005lu-FJ for emacs-devel@gnu.org; Thu, 11 Jan 2018 14:50:21 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:49704) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eZirh-0005lO-3c for emacs-devel@gnu.org; Thu, 11 Jan 2018 14:50:17 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0BJkiOK009031; Thu, 11 Jan 2018 19:50:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=4w8bQoiRcOlNfz6TNuMcErKypRr9oBWDEI7BA3pJWPk=; b=K+zs4z5Udm91DRgwNg5juewRztf/usGcKK17ieL5kZ0yI6yYQuwZ6eXNFOwVj+n8ASva fw1T8Ly+RcccWGlqkRVaHiYAjHpADgCg/cBQY6w7CRxhNDQ3tns0FCkO9oGz1dDZYwYS 2r2Cl9Ni228gg/H7vn4zfCWcZYiQ3/tnBsmIfBzZPE5wFhB33jjJ9129H7bdZ6Mh4Ho6 jZrZqv5JgL8xnOAPOjdecjYMgnnsMxW5GC9H/TxuyeVlpxw10Lx5J6nKaMaq1ucozBs4 rsgxaumsoc5JdZB2E7jsJwwbX4SX9HNUUhvocKeYMsdeN4Q5Q6ce0zJ+ARTfh37VxrXW jQ== Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2fee5085fa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Jan 2018 19:50:12 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w0BJoBHi001837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 11 Jan 2018 19:50:12 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w0BJoBpr023995; Thu, 11 Jan 2018 19:50:11 GMT In-Reply-To: <5A57B302.5090108@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4627.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8771 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801110270 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:221854 Archived-At: > > 1. Can users with a GTK build today use Lisp code that decides > > which to use in any given (Lisp) context? How is that done > > in Lisp? >=20 > The option `x-gtk-use-system-tooltips' decides whether to use system > or Emacs tooltips. This is a user option and should never be set by > Lisp code. Then that doesn't satisfy what I requested: "being able to choose for any given context which to use" --------------------- "Can we let Lisp code (and so users too) decide, here or there, which kind of tooltip to use (heavyweight "Emacs" or lightweight "system")?" > > 2. What do you mean by "set up tooltip controls" on Windows? > > Windows uses the term "tooltip controls" for its native tooltips. In > order to use tooltip controls, an application programmer has to set > them up, that is, write the necessary API routines. So if no one "has the time to set up tooltip controls on Windows" then we have what we have now on Windows: "Emacs" tooltips - which is fine. > > Today, on Windows you can at least use faces in tooltips. > > (Dunno about using images, but I'm guessing that's OK too.) >=20 > A tooltip frame is a normal top-level frame that can be used like any > other frame. It has some restrictions (no margins, fringes, scroll > bars) but a criminal mind might be able to relieve some of them. That's all good, and what I expected but wasn't sure - "Emacs" tooltips are plenty flexible. > > But perhaps you mean that on Windows there are _only_ > > "Emacs" tooltips, not "system" tooltips? From my point of > > view that's not a problem - flexible beats inflexible. You > > say that tooltips on Windows are "heavyweight" and "incur > > an entire GC cycle", but I've never noticed any performance > > problem with them - on Emacs 20 through 26. >=20 > Probably because you don't use a battery or maybe you just don't care. I don't use a battery. I guess you're suggesting that "Emacs" tooltips, which are apparently all we have on Windows, are too slow for use with a battery. And you expect that no one will provide the choice of "system" tooltips on Windows. So from your point of view, tooltips on Windows should typically be turned off (at least by users) when a battery is used, so the info goes to the echo area. That's OK. Ignoring any battery users on Windows who don't turn off tooltips, we have what we need on Windows. (Yes, a Lisp choice would be even better, but if no one provides it...) And users on gtk-build systems can choose. Choice should also be available to Lisp functions, as use cases differ. It's of course possible to let a user option allow for Lisp control or override/prevent it, au choix. Today, does changing the value of that user option change the behavior dynamically? E.g., if you did change the value using a given Lisp function would the behavior change? If so then some specific contexts could, by default, use "Emacs" tooltips, while other contexts did not. For example, tooltip-dimming for mode-line mouseover could be done for non-Windows also, without imposing "Emacs" tooltips everywhere. And users could prevent that dimming using option `x-gtk-use-system-tooltips'. Since that's apparently possible for more than just Windows, including for at least some GNU/Linux builds, that's what we should do by default. I didn't propose it earlier because I thought you were saying that it is only Windows that supports faces in tooltips, and I know that we don't tailor default Emacs behavior for Windows only.