From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel Subject: Re: Customize key bindings? Date: Tue, 30 Dec 2003 21:34:28 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1072816662 22497 80.91.224.253 (30 Dec 2003 20:37:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Dec 2003 20:37:42 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Dec 30 21:37:37 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AbQcS-0005c5-00 for ; Tue, 30 Dec 2003 21:37:36 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AbQcS-0002PF-00 for ; Tue, 30 Dec 2003 21:37:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AbRYP-0005qS-FZ for emacs-devel@quimby.gnus.org; Tue, 30 Dec 2003 16:37:29 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AbRY1-0005op-PH for emacs-devel@gnu.org; Tue, 30 Dec 2003 16:37:05 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AbRXV-0005bZ-2j for emacs-devel@gnu.org; Tue, 30 Dec 2003 16:37:04 -0500 Original-Received: from [217.13.230.178] (helo=yxa.extundo.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AbRWx-0005Jz-JP; Tue, 30 Dec 2003 16:35:59 -0500 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.10/8.12.10) with ESMTP id hBUKYUAU032490 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 30 Dec 2003 21:34:31 +0100 Original-To: rms@gnu.org X-Hashcash: 0:031230:rms@gnu.org:296519cc5a67ac5d X-Hashcash: 0:031230:emacs-devel@gnu.org:fe8056ba83992553 In-Reply-To: (Richard Stallman's message of "Tue, 30 Dec 2003 14:43:52 -0500") User-Agent: Gnus/5.1004 (Gnus v5.10.4) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18918 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18918 Richard Stallman writes: > I have an idea for a custom-key.el that would allow users to add > global key bindings via the customize interface. I suspect this is > sufficient for many people. It would be sufficient for me. See below. > > That is a feature I would definitely like to have added. > I agree that global bindings are enough to make a very useful feature. Good. > However, I would expect that the `string' type is not very convenient > for specifying a key sequence. The right way is to let the user > actually type the key sequene to bind, as global-set-key already does. > Can someone define a type for that? Yes, this would be better. I'm not really familiar with custom enough to add a new type, but some ideas on the GUI: The custom buffer could look like: [INS] [DEL] Key: ... [READ KEY] Function: compile... Where the '...' and 'compile...' are the current string input fields, [INS]/[DEL] are the alist buttons, and [READ KEY] is a new button users can press that read a key interactively, much like C-h k or similar. Advanced users can still enter the key binding using the string input field. There is one complication though -- imagine if the user wants to bind 'C-c x y z' to something, effectively creating sub-keymaps. Should this be possible? How? I'm leaning towards not supporting it. The problem is to find out when the key pressed by the user "ends". It is easier to only allow the user to only add simple key bindings to existing keymaps. > I think that our current interface for adding to an alist > is rather inconvenient too. Hm, I can't think of anything I find problematic.