info-gnus-english
[Top][All Lists]
Advanced

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

Re: `del' key not working out of x environment


From: gdt
Subject: Re: `del' key not working out of x environment
Date: Tue, 25 Apr 2006 08:27:37 -0400
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.3 (berkeley-unix)

Rodolfo Medina <rodolfo.medina@gmail.com> writes:

> If I start Emacs and Gnus out of graphical environment,
> when trying to delete a message with `B del', Gnus complains that
> `B <deletechar> is undefined'; and if I want to get back one page
> within a message, with `del', Gnus complains that the buffer is read only.
> Instead, within graphical environment all works fine.
> How come, and how to fix that?

Your message leaves out many important details, such as what sort of
computer you are using, what operating system, and whether you are
running emacs on a console of some sort or via ssh, and if so, what
sort of keyboard/console you are using.  It works fine with my VT52
and Vax running 4.3BSD :-)

There is a longstanding issue about the labeling and coding of keys on
keyboards.  Originally (in the non-IBM world), the key in the upper
right was marked DEL or Delete, and sent the ASCII DEL symbol (0177).
This was used as the byte that caused a previous input symbol to be removed.

The IBM PC labeled the key backspace, but made it work as DEL.  A
'Delete' key was added that usually deletes forward.  Unix came from
"real computers" and thus generally followed the DEC delete key
scheme.  At some point XFree86 changed the default key mappings to
make the key-which-should-be-DEL-but-is-Backspace be backspace instead
of delete.

emacs seems to work around this brokenness by treating the X11 keysym
BackSpace as DEL.

The following comments and Xresources fragments, intended for those
with PC keyboards, explain how to fix xterm so that the Backspace key
generates DEL and to avoid making xterm set BS as the erase character.

You seem to be having a different problem, which is that whatever
system you are using to type on is not generating an ASCII DEL (0177)
when you push the backspace key.  Or perhaps you are pushing the
'Delete' key.

On on of my computers, which is an i386 with a Dell PS/2 keybaord,
running NetBSD-current, both the 'Backspace' key and the 'Delete' key
send DEL, or at least ^H^K followed by either says that.


/*
 * The following comments are for those that believe the key that is
 * where the delete (DEL) key belongs (from a VT52 or VT100) should
 * send DEL (0177) and that the terminal erase character should also
 * be DEL (0177).
 * 
 * On a PC keyboard, the BackSpace key generates
 * keycode 22 (keysym 0xff08, BackSpace).
 * The "Delete" key is a function key near Insert, not a DEL key, and it
 * generates keycode 107 (keysym 0xffff, Delete).
 * XXX Figure out what happens under X with a keyboard with a real DEL key.
 */

/*
 * Don't mess with the pty's notion of erase (which defaults to DEL in
 * NetBSD).  This should be set on all computers, regardless of the
 * type of keyboard.
 */
*ptyInitialErase: true

/*
 * Make the backarrow key send DEL (without control), rather than BS.
 * This should be set for any display whose keyboard has a key labeled
 * BackSpace where the delete (DEL) key should be.
 */
*backarrowKey: false

/*
 * Alternatively, one could set backarrowKeyIsErase to true, which the
 * man page says would set the backarrowKey state according to whether
 * stty erase character is DEL or BS.
 */

/*
 * It appears that ssh propagates the local stty erase character
 * setting to the remote machine, at least when both ends are NetBSD
 * 1.6.2ish.  Thus, fixing the key that should be delete locally
 * (above) is sufficient to cause the correct behavior on remote
 * systems (i.e., ssh sends 0177 when the key-where-DEL-should-be is
 * pressed, the remote stty erase setting is 0177, in emacs both
 * DEL and M-DEL work correctly, and one can invoke help by sending 010
 * (by typing C-DEL or C-H).  (With the standard behavior of DEL
 * sending BS and stty erase set to BS, one cannot easily invoke help
 * in emacs.)
 */


PS: Back when I was young, we had to shout all the time because our
VT05s only had upper case letters.  But seriously, I hope this helps.

-- 
        Greg Troxel <gdt@work.lexort.com>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]