Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU Path: utzoo!watmath!clyde!cbosgd!ucbvax!mc.lcs.mit.edu!KFL From: KFL@MC.LCS.MIT.EDU ("Keith F. Lynch") Newsgroups: mod.computers.vax Subject: Lone escapes Message-ID: <[MC.LCS.MIT.EDU].851812.860315.KFL> Date: Sat, 15-Mar-86 13:33:21 EST Article-I.D.: <[MC.LCS.MIT.EDU].851812.860315.KFL> Posted: Sat Mar 15 13:33:21 1986 Date-Received: Mon, 17-Mar-86 04:03:14 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 26 Approved: info-vax@sri-kl.arpa Actually, recognition of lone escapes is not necessary for Emacs to work right. It is always unambiguous when a command ends. If ESC-A is a command then there is no ESC-A-B command. Of course this means you can run into difficulties when binding commands to keys which producs escape sequences. On an ANSI terminal, most such keys produce ESC-[-something. So ESC-[ cannot be a command itself. On non-ANSI terminals the arrow keys might generate ESC-A ESC-B ESC-C and ESC-D. So these commands cannot be used to mean things other than what the arrow keys mean. This is unfortunate since these are well known Emacs commands. The solution Gosling's Emacs uses is to allow case-sensitive commands. The up-arrow key might produce ESC-A, and to go to the beginning of the sentence you have to enter ESC-a (lowercase A). The only problem with this is that some people like to edit whith CAPS-LOCK on, and this makes it difficult. Another solution is to use timing hacks. It has been pointed out that this doesn't work through MUXes and networks as they only guarantee that characters will be received in the right order (and sometimes not even that!) but guarantee nothing about timing. But this is an excellent solution on microcomputers and other single user machines. Thus ESC-A would mean one thing while ESC (pause) A means another. Of course these principles do not apply only to Emacs. This is important for any utility which uses arrow keys and/or function keys and which also allows ESC commands. ...Keith