Please save from tearing out what little hair I have left!
I'm trying to make a Debian (woody) installation let me delete the previous word in an xterm (using tcsh) by typing meta-backspace, i.e. just like the Emacs keystroke. But it's not playing ball. It's actually pretty weird as I've never had this trouble under RedHat or SuSE (or SunOS, come to that).
Relevant information:
o xrdb -query reports (among other things)
xterm.eightBitInput: true
o I have no bindkey commands in my .cshrc and no ~/.tcshrc file
o A short Tk script shows that backspace generates keycode 22
I thought I'd just need to say
bindkey "M-^H" backward-delete-word
in my .cshrc but that doesn't work. Any suggestions?
..Adrian
On Fri, 26 Jul 2002 15:47:12 Adrian F. Clark wrote:
Please save from tearing out what little hair I have left!
I'm trying to make a Debian (woody) installation let me delete the previous word in an xterm (using tcsh) by typing meta-backspace, i.e. just like the Emacs keystroke. But it's not playing ball. It's actually pretty weird as I've never had this trouble under RedHat or SuSE (or SunOS, come to that).
There are actually two different schemes that emacs can use for handling meta characters. In the eight bit scheme emacs expects to receive the character with the eight bit set when the Meta key was held down and in the 7 bit scheme it expect to reveive an Escape character just before the character concerned.
Relevant information:
o xrdb -query reports (among other things)
xterm.eightBitInput: true
From my reading of the xterm manual entry this is selecting the 8 bit scheme for meta characters. So far so good.
o A short Tk script shows that backspace generates keycode 22
This isn't actually that relavent because tcsh is not an X application. Xterm will translate the keystroke 22 into an ASCII code which will be either the ASCII BS character (^H) or the ASCII DEL character (^?) depending on how it is set up. With xterm.eightBitInput it will set the eight bit on either of the BS or DEL character when meta is held down.
I thought I'd just need to say
bindkey "M-^H" backward-delete-word
in my .cshrc but that doesn't work. Any suggestions?
Have you checked the tcsh documentation to see which Meta convention it is expecting, the eighth bit one or the ESC one?
The pseudo tty device that sits between xterm and tsch may have been configure to strip the eighth bit - run stty -a in the xterm concerned and cross reference to the man entry for stty.
Xterm may be generating ASCII DEL when you expect it to generate BS.
X may be configured with a different Meta key than the one you are used to. Does it work in other applications? If not check the XFree86 config file.
Hope this helps, Steve.