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: angle-bracket notation for keys (was: Selection changes) Date: Sat, 17 Jul 2010 18:54:28 -0700 Message-ID: References: <4C3FAF2F.8060700@alice.it> <4C40275D.704@harpegolden.net> <4C42418F.4060600@alice.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1279418164 9199 80.91.229.12 (18 Jul 2010 01:56:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 18 Jul 2010 01:56:04 +0000 (UTC) Cc: 'Chong Yidong' , 'emacs' To: "'Angelo Graziosi'" , "'David De La Harpe Golden'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 18 03:56:02 2010 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.69) (envelope-from ) id 1OaJ6j-0001hD-CS for ged-emacs-devel@m.gmane.org; Sun, 18 Jul 2010 03:55:59 +0200 Original-Received: from localhost ([127.0.0.1]:35312 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaJ6i-0004IF-1J for ged-emacs-devel@m.gmane.org; Sat, 17 Jul 2010 21:55:56 -0400 Original-Received: from [140.186.70.92] (port=36747 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OaJ6X-0004Gy-H8 for emacs-devel@gnu.org; Sat, 17 Jul 2010 21:55:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OaJ6V-00021V-PR for emacs-devel@gnu.org; Sat, 17 Jul 2010 21:55:45 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:57998) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OaJ6V-00021E-Fk for emacs-devel@gnu.org; Sat, 17 Jul 2010 21:55:43 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o6I1tbgl021862 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 18 Jul 2010 01:55:39 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o6I1VDwN030768; Sun, 18 Jul 2010 01:55:36 GMT Original-Received: from abhmt010.oracle.com by acsmt355.oracle.com with ESMTP id 414137891279418059; Sat, 17 Jul 2010 18:54:19 -0700 Original-Received: from dradamslap1 (/141.144.80.6) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 17 Jul 2010 18:54:19 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4C42418F.4060600@alice.it> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Thread-Index: AcsmCsLOMSEJOQSgSbSqelPbIfiA9wAA6qNw X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4C425F19.013D:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:127538 Archived-At: > '<...-insertchar>' is very ugly and... unattractive! And unnecessary. `' etc. used to (sometimes) be written `S-tab' or `S-TAB'. But, sigh, function keys have always been written in Emacs (e.g. in Info) using angle brackets, IIRC. Even Emacs 20's Info uses `' to represent the `f1' key, though it at least writes `f1' or f1 in *Help*. Emacs 22 was "improved" to make this consistent - consistently ugly. The angle-bracket notation is unnecessary because multi-character key names such as `delete' could be written just like that. `delete', `C-delete', `C-delete insert', `C-insert M-delete' etc. This is an unambiguous notation, but we don't use it, unfortunately. We do sometimes represent user input by separating keys in a sequence with whitespace, e.g. in instructions: "Type `h e l l o'". But we are not consistent in that, writing sometimes "Type `hello'" to also mean type those five keys. And we still treat some keys differently, using angle brackets: "Type `hello '" (where the space is not necessary but is typically present). There is no ambiguity between `delete' and `d e l e t e', given consistent use of the simple convention that whitespace separates keys in a sequence. The former is a single key named "delete"; that latter is a sequence of six keys. It doesn't matter whether it's a new function key that you never heard of, `foo' or one such as `delete' that is well-known. The convention is crystal clear and foolproof. You know that `foo' means a key and `f o o' means a sequence of three keys. Even when multi-character key names are used in representations of user input (e.g. instructions) there is no problem: "Type `C-insert h e l l o C-RET'". Whitespace can be used to separate keystrokes this way because we have `SPC' to represent hitting the space bar: "Type `d o g , SPC c a t'". And sequences of many keys like that are relatively rare in the doc anyway, so the admittedly less readable "Type `h e l l o'" (vs "Type `hello'") would not be a big deal in practice. And it's not just about the doc (Info). It's also about the UI: *Help*, messages, etc. It's about the way Emacs talks about itself. If we used this simpler convention consistently, we would gain in clarity. And we would reduce the number of extra chars that just represent noise: <> plus a space vs just a space. ` ' vs `f1 S-tab C-delete'. (A no-brainer, wouldn't you say?) Not to mention that all keys would be treated the same way - there is nothing special about `f1' and `TAB' vs `a' and `C-a'. There's no reason to write `' and `' but also write `a' and `C-a' (not `' and `'). The angle brackets serve no useful purpose. If they are noise in the case of `' then they are just as much noise in the case of `'. And even though angle brackets separate keys (presumably that's their raison d'etre), they are so ugly and unclear that we typically use whitespace as well! We often write ` b ', not `b', even though the latter is also unambiguous. Why? Because of the ugliness factor. Because angle brackets are not very readable. Our convention uses at least two chars, and more often three, to separate two keys - even when some of those key representations use angle brackets: ` ' (3 chars: >, SPC, <). This is just not necessary. Anyway, no, I do not really intend to open this discussion again. My suggestion about this was rejected long ago. I just wanted to say that (a) yes, what we use is ugly, (b) it does not have to be that ugly, and (c) we've been around the block on this question before. If you are interested, see these old threads, which deal with the question in some detail (examples, arguments, etc.): http://lists.gnu.org/archive/html/emacs-devel/2005-10/msg00142.html http://lists.gnu.org/archive/html/emacs-devel/2006-09/msg00732.html http://lists.gnu.org/archive/html/emacs-devel/2006-09/msg00984.html http://lists.gnu.org/archive/html/emacs-devel/2006-10/msg00213.html