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: Why does show_help_echo call substitute_command_keys? Date: Fri, 21 Jul 2017 07:54:42 -0700 (PDT) Message-ID: <6364429e-0696-4835-bed8-458a6095067f@default> References: <4f821efa-1448-8ba0-d164-abeff36180d4@gmail.com> 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 1500648950 25922 195.159.176.226 (21 Jul 2017 14:55:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Jul 2017 14:55:50 +0000 (UTC) Cc: Emacs developers To: Yuri Khan , =?utf-8?B?Q2zDqW1lbnQgUGl0LUNsYXVkZWw=?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 21 16:55:46 2017 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 1dYZLG-0006TR-3A for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2017 16:55:46 +0200 Original-Received: from localhost ([::1]:43593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYZLL-0002mo-1v for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2017 10:55:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYZKP-0002mc-QE for emacs-devel@gnu.org; Fri, 21 Jul 2017 10:54:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYZKL-0007tC-Sz for emacs-devel@gnu.org; Fri, 21 Jul 2017 10:54:53 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:20191) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dYZKL-0007sj-Ip for emacs-devel@gnu.org; Fri, 21 Jul 2017 10:54:49 -0400 Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v6LEsj3L018127 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Jul 2017 14:54:45 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v6LEsi8q019896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Jul 2017 14:54:44 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v6LEsiaC007417; Fri, 21 Jul 2017 14:54:44 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6770.5000 (x86)] X-Source-IP: userv0022.oracle.com [156.151.31.74] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 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:216917 Archived-At: > Because the help-echo property is the Emacs API to tooltips, and > tooltips are expected to be able to display keyboard equivalents ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > to clicking the thing that is pointed? Tooltips are not expected to display keys, change quote chars, etc. But of course they are expected to "be able to" do that. They are expected to be able to display lots of things. `tooltip-show-help' just shows "a help string", as it says. There is nothing in the notion of a tooltip or the doc about `tooltip-mode' or the doc about property `help-echo' or the code in `tooltip.el' that suggests that a tooltip should be about translating commands to keys or apostrophes to curly quotes or should impose `substitute-command-keys' on the help text it's given to display. A tooltip should just display whatever text it is handed, with no fiddling with or elaboration of that text. If you need such fiddling, whether by ``substitute-command-keys' or `format' or something else, do it beforehand. > There should probably be a function that knows when and how to > quote the characters that cause such substitution with \=3D. A tooltip should not automatically try to substitute command keys or change quote characters. Why impose such behavior on tooltips? You should be able, by default, to pass text that contains `\\[...]' etc. or quote chars to a tooltip and not have it interpreted and transmogrified.