From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Improving describe-mode and discoverability Date: Thu, 23 Jun 2016 17:05:55 -0700 (PDT) Message-ID: <531a7bec-28af-4c4c-aa85-1d13e84c98be@default> References: <576C2A6C.3090908@gmail.com> <576C59AF.7080902@gmail.com> <9c928ea6-6799-d096-de54-b2bf7ac140ec@yandex.ru> <576C6256.6060708@gmail.com> <576C7326.1020502@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1466726815 4613 80.91.229.3 (24 Jun 2016 00:06:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2016 00:06:55 +0000 (UTC) To: =?utf-8?B?Q2zDqW1lbnQgUGl0LS1DbGF1ZGVs?= , Dmitry Gutov , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 24 02:06:44 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bGEdu-0001GV-HS for ged-emacs-devel@m.gmane.org; Fri, 24 Jun 2016 02:06:42 +0200 Original-Received: from localhost ([::1]:40074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGEdt-0005Ks-Fg for ged-emacs-devel@m.gmane.org; Thu, 23 Jun 2016 20:06:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGEdJ-0005Kl-Jg for emacs-devel@gnu.org; Thu, 23 Jun 2016 20:06:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGEdG-0001tX-9H for emacs-devel@gnu.org; Thu, 23 Jun 2016 20:06:05 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:37847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGEdG-0001tP-0K for emacs-devel@gnu.org; Thu, 23 Jun 2016 20:06:02 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u5O05wjf020380 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 24 Jun 2016 00:05:58 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u5O05vhr003837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 24 Jun 2016 00:05:58 GMT Original-Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u5O05t26028266; Fri, 24 Jun 2016 00:05:56 GMT In-Reply-To: <576C7326.1020502@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] 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:204715 Archived-At: > > Personally, I have no problem with the _current_ situation, > > and so far I have not heard a clear alternative proposal > > that sounds better to me. >=20 > Possibly because I was hoping for your help (and that of others, of cours= e) > to come up with a clear proposal :) I've probably said too much here already. Others will no doubt be more hel= pful. > Here's an attempt. I propose that we: >=20 > 1. Introduce a new function variable `format-keymap-function'. It should = be > set to a function accepting one argument (a keymap) and rendering that > keymap for display to the user. >=20 > 2. Change the way \\{...} formatting works to make it call out to the val= ue > of format-keymap-function. >=20 > 3. Set the default value of format-keymap-function to a new function, > implemented to render keymaps as I demoed in previous messages. >=20 > I think this responds to your four points: >=20 > > 1. Whether to replace \\{...} with Clement's alternative > > representation or to provide a different construct to show it. >=20 > I propose to replace the existing \\{} construct. >=20 > > 2. Whether to let users choose to show the result of \\{...} > > differently (i.e., as it is shown currently or in Clement's > > way). >=20 > I propose to let user customize the result, using `format-keymap-function= '. `keymap-format-function'? > > 3. Whether to include \\{...} automatically for all modes, > > whether it uses the original representation or Clement's > > alternative. >=20 > I propose to not include it automatically; this is left to the mode autho= r, > or in any case to a separate proposal. >=20 > > 4. Whether including \\{...} automatically for all modes > > should be a user option (regardless of which representation > > is used). >=20 > I propose to not create such an option. This could be a separate proposal= . >=20 > The current proposal is to not hardcode \\{} to produce a two-columns > display, but instead to make it customizable. In addition, the proposal i= s > to change the default to include the headers of docstrings, as demoed in > previous emails. >=20 > Let me know if I can make this clearer :) Much clearer; thanks. (And I appreciate the lack of automatic use.) For my part: 1. A user option for how to display \\{...} is not a bad idea. 2. The defcustom type could include a `choice' among: two predefined format= s (the current one and yours) and an arbitrary user-defined function. (IMO, the default behavior should probably be what the behavior has been, but that's another discussion.) 3. A problem I see with this is that there needs to be a way for code to control the format in some cases - separately from users being able to control the display in other cases. 4. For that, code could I guess bind the option around a given use of the string. (Would that handle all use cases?) I'm writing this quickly without thinking much about it, so no doubt others will see clearer.