[comp.emacs] missing DEL key

dms@condor.UUCP (Daniel M. Solis) (08/25/88)

     I'm using Gnu emacs on a VT-220 terminal, which has no DEL key.
(I.e., VT-220s have no DEL key; it's not that my particular terminal
is missing the key.)  Therefore, when I try to use query-replace I
can't skip over an instance of the string.  I have to quit the
query-replace and invoke it again.  Is there some elegant way of
taking care of this problem.

     I also notice that global keymap bindings are not valid when
executing a function.  For example, I have the arrow keys bound to the
appropriate lisp functions (previous-line, next-line,...) and they
work just fine when I'm moving around the file.  When I'm executing a
function, however, their bindings are not in force.  For example, when
executing incremental-search I can stop the search with ^N, which is
the standard binding for next-line, but my down-arrow key, which is
also bound to next-line, is not recognized.

     Is there anything I can do about these things?  If someone could
point me in the right direction I'd really appreciate it.  Please send
mail to:
               dms@condor.genrad.com

(The GenRad mailer apparently does not put the right return address
in the header, so you can't just "reply" to this note.)

                                         Thanks,
                                         Dan Solis
                                         (508) 369-4400 x3307

                                         GenRad, Inc.
                                         Concord, Massachusetts

mayer@hplabsz.HPL.HP.COM (Niels Mayer) (08/27/88)

In article <8079@condor.UUCP> dms@condor.UUCP (Daniel M. Solis) writes:
>
>     I'm using Gnu emacs on a VT-220 terminal, which has no DEL key.
>(I.e., VT-220s have no DEL key; it's not that my particular terminal
>is missing the key.)  Therefore, when I try to use query-replace I
>can't skip over an instance of the string.  I have to quit the
>query-replace and invoke it again.  Is there some elegant way of
>taking care of this problem.

Try putting "(load "term/bobcat") in your ~/.emacs

Even though "term/bobcat.el" is meant to correct for the HP bobcat
keyboard's funky placement of the <Del> key, i find it useful to use on all
terminals.  "term/bobcat.el" simply swaps the bindings of <del> to
<backspace> thus allowing the easy-to-hit backspace key to do backwards
paging in mh-e, query-replace skipping, in addition to real
honest-to-goodness backspacing; the <del> key, which is often in hard to
reach places even on the most common keyboards now becomes a <help> key.
Beware that the online gnu documentation on modes will still mention ^H as
the help key.

I think Stallman's battle for free software is a fine thing, however, his
crusade to help the poor downtrodden <del> key achieve superiority over the
bourgeois <backspace> key is full of hooey. By making ^H be the battle cry
of the teeming masses of neophyte gnuemacs users seeking help, he is being
duped by the conspiracy of doctrinaire seekers key-mnemonics at the expense
of common sense. Help stamp out this sillyness now!

-------------------------------------------------------------------------------
	    Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com
		       Hewlett-Packard Laboratories
			      Palo Alto, CA.
				   *

robert@pvab.UUCP (Robert Claeson) (08/29/88)

In article <8079@condor.UUCP>, dms@condor.UUCP (Daniel M. Solis) writes:

>      I'm using Gnu emacs on a VT-220 terminal, which has no DEL key.
> (I.e., VT-220s have no DEL key; it's not that my particular terminal
> is missing the key.)

VT220's has a DEL key (the <X key above the Return key), but no BS key.
This conforms to the ISO standard, which specifies the DEL key as a
destructive backspace, and BS as a non-destructive backspace. Therefore,
the VT220 terminals are using the right control character to erase the
last entered character.

But UNIX has since ancient times been using the BS character for this
purpose, and the DEL key as an "interrupt" character, so many VT220
clones has the ability to change the character the DEL key sends via
a set-up option.

ellis@ultra.dec.com (David Ellis) (08/29/88)

Dan Solis (dms@condor.genrad.com) writes:

>     I'm using Gnu emacs on a VT-220 terminal, which has no DEL key.
> (I.e., VT-220s have no DEL key; it's not that my particular terminal
> is missing the key.)  Therefore, when I try to use query-replace I
> can't skip over an instance of the string....

>     I also notice that global keymap bindings are not valid when
> executing a function.  For example, I have the arrow keys bound to the
> appropriate lisp functions (previous-line, next-line,...) and they
> work just fine when I'm moving around the file.  When I'm executing a
> function, however, their bindings are not in force.  For example, when
> executing incremental-search I can stop the search with ^N, which is
> the standard binding for next-line, but my down-arrow key, which is
> also bound to next-line, is not recognized.

First, there *is* a DEL key on the VT-220 keyboard.  It's the key just
above RETURN, with the left-pointing hollow arrow containing an "x"
(looks like "<x]").  This key generates ASCII code 177.

The second problem is not quite as easy.  First, check what keycodes are being
used by your arrow keys (e.g. HELP-c-DOWNARROW should yield ESC-[-B).
Second, check the variable search-exit-char, which GNU Emacs should be
setting in the file /usr/local/emacs/lisp/loaddefs.el.  My definition there is:

(defconst search-exit-char ?\e "\
Character to exit incremental search.")

This allows any key whose code begins with ESC to terminate the incremental
search and run its usual function immediately.

I hope this helps.

----
David Ellis
Digital Equipment Corporation -- BXB1-1/D03 
85 Swanson Road, Boxboro MA 01719 -- (617) 264-5073
Usenet:  {ucbvax,allegra,decvax}!decwrl!ultra.dec.com!ellis
ARPA:    ellis%ultra.dec@decwrl.dec.com