From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8951: 24.0.50; [PATCH] enhancement request: buttonize key names Date: Wed, 06 Jul 2011 14:49:11 -0400 Message-ID: References: <375C29E7AB4048148D18B461FC1E02F1@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309983251 5992 80.91.229.12 (6 Jul 2011 20:14:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2011 20:14:11 +0000 (UTC) Cc: 8951@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 06 22:14:06 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QeYU2-0001fB-20 for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jul 2011 22:14:06 +0200 Original-Received: from localhost ([::1]:37379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeYU0-00067T-DP for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jul 2011 16:14:04 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeXAq-0007VK-95 for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2011 14:50:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeXAo-00013w-8O for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2011 14:50:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeXAn-00013c-Va for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2011 14:50:10 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QeXAh-0002OF-Cp; Wed, 06 Jul 2011 14:50:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jul 2011 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8951 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 8951-submit@debbugs.gnu.org id=B8951.13099781609122 (code B ref 8951); Wed, 06 Jul 2011 18:50:02 +0000 Original-Received: (at 8951) by debbugs.gnu.org; 6 Jul 2011 18:49:20 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QeX9z-0002N3-G5 for submit@debbugs.gnu.org; Wed, 06 Jul 2011 14:49:19 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QeX9x-0002Ms-Qg for 8951@debbugs.gnu.org; Wed, 06 Jul 2011 14:49:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAL2tFE5FxIV4/2dsb2JhbABTqAd4iHrDNoY3BJA5jjKELw X-IronPort-AV: E=Sophos;i="4.65,488,1304308800"; d="scan'208";a="120704990" Original-Received: from 69-196-133-120.dsl.teksavvy.com (HELO ceviche.home) ([69.196.133.120]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 06 Jul 2011 14:49:12 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id D5427660D9; Wed, 6 Jul 2011 14:49:11 -0400 (EDT) In-Reply-To: <375C29E7AB4048148D18B461FC1E02F1@us.oracle.com> (Drew Adams's message of "Mon, 4 Jul 2011 14:08:19 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 06 Jul 2011 14:50:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:48120 Archived-At: >> Basically, the thing I don't like about your patch is the resulting >> redundancy between help-substitute-command-keys and >> substitute-command-keys, which could be removed by getting rid of the >> C version and only using the new Elisp version. > See the emacs-devel thread, where I addressed both of these things. > http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg01081.html I don't think that quite addresses it. But, I guess it does indirectly: you apparently haven't found problematic cases that require distinguishing help-substitute-command-keys from substitute-command-keys. Instead you just personally prefer to keep the option whether to buttonize or not. > I wrote Lisp, but if someone wants to instead patch the C code for > `substitute-command-keys' then go for it. No, I'm not interested in making this C code more complicated. I want to go the other way around. > The Lisp version I wrote still invokes the original C code for the > \\{...} case. I did not try to rewrite that in Lisp. I see. It should be pretty easy to do, easy exporting the needed underlying C function to Elisp, or rewriting it in Elisp (there's no good reason to have describe-buffer-bindings written in C, really). > 1. Keep the Lisp code I wrote (or similar), renaming it to > `substitute-command-keys'. Sounds good. > 2. Simplify the original C code to handle just the \\{...} case, > rename that function, and use it in #1 to handle the \\{...} parts > (just as now, but under its new, {}-specific name). Sounds good. > Alternatively, you can write #2 in Lisp, if you like. Sounds good as well. > Wrt your question of whether "there are places where such buttons > become annoying": I would say that it does not matter whether there > are currently any such places. There is no reason not to treat the > buttonizing as optional. Of course there's the reason that providing a choice is never free, so we should only provide the choice if there's a good reason for it. Stefan