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

Re: Bug#6014: emacs shouldn't use C-h for "help"

Vadim Vygonets:
> On 19 Dec 1996, Sudish Joseph wrote:
> > Also, Linux has it better than many other systems when it comes to
> > Emacs: it DTRT on the Linux console!  As such, it'd be kinda ironic to
> > change the default behaviour for the case that occurs the least often:
> > running inside an xterm.  The C-h problem is most acute outside of X.

How about:
 - telneting to Debian from an xterm on some other system
 - using a real hardware terminal where the BS key sends ^H
   (ansi, vt100, vt220, wy120, ...)

Sometimes I have to use the SCO console which is a pretty standard
"ansi" terminal - the BS key sends ^H.

> > Your average Debian user will _never_ encounter it.

Well, maybe I'm not an average Debian user then :).

> Joseph, you are completely right.  Most people don't use emacs inside 
> xterm, only on Linux console or in X (where it doesn't matter wether 
> Backspace is mapped to Backspace or Delete).

Most people don't use anything but xterm and Linux console.  It does not
mean that we shouln't support other terminal types well.  We have a nice
thing called terminfo, and applications should use that - not assume
hardcoded key bindings.  Can we have this in the policy manual?

> ! Make VT100 Backspace send ^?, and Meta<Key>Backspace send ^[^?.
> *VT100.Translations: #override ~Meta<Key>BackSpace: string(0x7F)\n\
>                            Meta<Key>BackSpace: string(0x1B) string(0x7F)

Problem: the terminfo entry for xterm says kbs=^H.  On every unix system -
not just on Debian.  So it would fix emacs running in an xterm on Debian,
but not if running from some other terminal type where BS sends ^H, and it
would break other applications that correctly use terminfo.  So, unless
the only application you ever use is emacs (yes, I know, emacs can do
everything, there is no need to use any other applications...), I don't
recommend making this change.  It really should be fixed in emacs.

> Don't you all understand that this is what you're supposed to do?  Don't
> you understand that Unix uses Delete to erase previous character?  Don't

s/Unix/Emacs.  That's unfortunate...  Unix uses whatever character was set
by "stty erase" (usually DEL or ^H, depending on terminal type - see the
"kbs" terminfo capability).  The "tset" command can be used to set the
correct erase character for the current terminal type.

> you understand that people don't always work on Linux boxen from the

Yes, I understand that very well.  They sometimes use terminals that send
^H when backspace is pressed.

> console?  Don't you understand that this so-called "bug" is not
> emacs-specific?  And isn't it easier just to add those damn lines to that

It _is_ emacs-specific - are there any other applications that use ^H
for "help" no matter what terminfo says?  (Oops, I forgot GNU Info...)

> > Um, and who'll answer questions like "the manual says I can hit C-x r
> > C-h and get a list of all keyseqs that start with the prefix C-x r,
> > but it doesn't work on my machine".  Typical responses start with
> > "which OS are you running?".  Answer?  "Linux".

Changes like this should be documented, of course.  I just checked that
the f1 key works instead of C-h (not all terminals have f1, but most do,
so it would still be an improvement over the current situation).  C-x r
f1 works as expected.  Also, I have no problem with C-h recognized as
"help" in this context - but it should do the right thing when in the
normal text editing mode.

> This is a very good point.  I don't think that we must make a 
> Debian-specific fix, so people on networks of Suns and Linux boxen will 
> think carefully what machine to choose to run emacs on.

Good point - it would be better if it was fixed in the upstream version.
Now, if we can convince the upstream maintainers to fix it...

> Right.  You may also say things like "Home key don't work in emacs under 
> xterm"...  After all, you have ~/.emacs, /etc/X11/Xmodmap and 
> /usr/doc/HOWTO/mini/Key-Setup.gz, use those three to remap everything 

You also have terminfo, and applications should make use of that,
instead of forcing every user to remap everything everywhere...  If
Home doesn't work, that's a bug - emacs should use tigetstr("khome")
and recognize this string (if present) as the Home key.  Home can send
different sequences depending on terminal type, for example:

ansi	\E[H
wy120	^^
xterm	\EO\200

Assuming that Home always sends \E[1~ (just because it does so on
the vt220 and the Linux console) is simply broken.
(BTW, elvis and nvi aren't perfect either - Home works, End doesn't.
vim handles both these keys correctly.)

Sorry for continuing this thread - I am still hoping that we will have
a good solution to this problem, and that the upstream maintainers
will use it too.  We do cooperate with them, right?


TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com

Reply to: