William H. Magill on 9 Jun 2005 18:06:27 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] OS X, terminal, screen, mutt, emacs


On 09 Jun, 2005, at 08:41, Jeff Abrahamson wrote:
also under window settings, keyboard, check off
"Delete key sends Backspace"

Yeah, this is an old thing with emacs. There's a difference between C-h and backspace, even though the ascii character code is the same. I don't understand how emacs can tell the difference in terminal mode (although it's easy under X). But it certainly can. And that check box causes a C-h to be sent rather than a backspace, which is its own brand of annoyance.

Do you mean "backspace" or "Delete" here? -- backspace is backspace is ctl-h is the same ASCII code; but "Delete" should be "del" not "backspace." (People love to call them "forward del" and "reverse del," refering to which character -- to the left or right of the cursor is removed from the input buffer, just to make matters more confusing.)

Emacs doesn't differentiate between ctl-h and backspace, but it does
between ctl-h and del.

By default, Emacs does not (and as far as I know, never has) use
Ctl-h as "delete character," but rather as a call to "help." It uses
"del" for delete character, which is what "del" is defined as.

The "backspace" as delete character is a convention from DOS days as
I recall ... related to cursor positioning. In days of yore, (nee APL)
we used to fight about "destructive" and "non-destructive" backspace
issues. Emacs has always worked the same way that APL did --
"backspace (ctl-h)" moved the cursor back one character but DID not
purge that character from the input buffer! However, lots of word
processors used this technique to allow "underscore" characters.

Put another way, emacs never worked the same way the old BSD
keyboard buffer controls worked; where ctl-h deleted a character
from the input buffer. (System V used a different set of keyboard
buffer controls.)

In Terminal, under Window Settings / Keyboard;

There is an entire mapping of what keys send what codes.

You will note that most send the double escape sequence...

  \033[<xx> or \033O<xx>

(I use the VT100 encodings)

You can change them to match whatever termtype setting you have
configured on your linux box, and or modified by your login's
 .profile (.login, etc.)

The issue with emacs is not that it is not getting the codes, but
rather that it is not getting the codes it is configured to use.

I have used emacs on Tru64, Solaris and AIX from MacOS and OSX
terminal windows for years, and the trick is simply getting a
consistent set of definitions between the terminal app and the
target host. The one I had the most trouble with was AIX because
their termcap/terminfo definition of VT100 was broken -- had to
create my own tic file to fix the problem.


T.T.F.N. William H. Magill # Beige G3 [Rev A motherboard - 300 MHz 768 Meg] OS X 10.2.8 # Flat-panel iMac (2.1) [800MHz - Super Drive - 768 Meg] OS X 10.3.8 # PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg] Tru64 5.1a # XP1000 [Alpha 21264-3 (EV6) - 256 meg] FreeBSD 5.3 # XP1000 [Alpha 21264-A (EV 6.7) - 384 meg] FreeBSD 5.3 magill@mcgillsociety.org magill@acm.org magill@mac.com whmagill@gmail.com


___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug