From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Bug with S-Tab in keymaps Date: Wed, 7 May 2008 08:24:52 +0000 Message-ID: <20080507082452.GA2497@muc.de> References: <20080505141152.GA1365@muc.de> <20080505205411.GB1365@muc.de> <20080506212629.GA4534@muc.de> <87d4nzdo1m.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210147676 22795 80.91.229.12 (7 May 2008 08:07:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 May 2008 08:07:56 +0000 (UTC) Cc: Stefan Monnier , Drew Adams , emacs-devel@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 07 10:08:31 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JtehJ-0002S2-G7 for ged-emacs-devel@m.gmane.org; Wed, 07 May 2008 10:08:21 +0200 Original-Received: from localhost ([127.0.0.1]:49764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jtef6-0002KJ-PS for ged-emacs-devel@m.gmane.org; Wed, 07 May 2008 04:06:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JteeX-0001X0-CI for emacs-devel@gnu.org; Wed, 07 May 2008 04:05:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JteeV-0001TA-Gq for emacs-devel@gnu.org; Wed, 07 May 2008 04:05:28 -0400 Original-Received: from [199.232.76.173] (port=49868 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JteeV-0001Ss-6y for emacs-devel@gnu.org; Wed, 07 May 2008 04:05:27 -0400 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JteeU-0005jV-Cd for emacs-devel@gnu.org; Wed, 07 May 2008 04:05:26 -0400 Original-Received: (qmail 24797 invoked by uid 3782); 7 May 2008 08:05:24 -0000 Original-Received: from acm.muc.de (p57AF68E7.dip.t-dialin.net [87.175.104.231]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 07 May 2008 10:05:21 +0200 Original-Received: (qmail 2879 invoked by uid 1000); 7 May 2008 08:24:52 -0000 Content-Disposition: inline In-Reply-To: <87d4nzdo1m.fsf@catnip.gol.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96666 Archived-At: 'Morning, Miles! On Wed, May 07, 2008 at 08:13:09AM +0900, Miles Bader wrote: > Alan Mackenzie writes: > > here's an embryonic `canonicalize-event' (note the American spelling > > ;-). It works, e.g. for > Why all the mucking about with symbols?! [E.g. 'C-M-u ] My main point is that there should BE a standard way of representing key sequences. At the moment there is not. So that if I type - on my keyboard, function-key-map turns this into #x2000009. `lookup-key' then fails to find the binding on the symbol 'S-tab in a keymap. This is a bug. Whether the standard I tentatively proposed is the right one or not can be debated. I'd appreciate people agreeing with me that a standard is wanted. > Why not use a representation that actually works with emacs like > '(control meta u)? What do you mean? Symbols actually work with Emacs very well. For the specific instance you give, I actually proposed a number: #x8000015 = ?\C-u + the meta bit. But I still think 'C-M-up is superior to '(control meta up). It takes less space, and (eq sym 'C-M-up) is faster than (equal sym '(control meta up)). Also, events are represented as symbols at the moment, so why change this to a list? Of course, if the speed of looking up keys were a problem (it's not) we could use an obarray. The mucking about with symbols in my `canonicalize-event' only needs to be twice per event per key lookup (and when the binding is made, of course). > Thanks, > -Miles -- Alan Mackenzie (Nuremberg, Germany).