emacs-devel
[Top][All Lists]
Advanced

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

Re: What're the proper names for the backspace and delete keys in files.


From: Alan Mackenzie
Subject: Re: What're the proper names for the backspace and delete keys in files.texi?
Date: Thu, 12 Jan 2006 13:16:59 +0000 (GMT)

Hi, Richard and Emacs!

On Tue, 20 Dec 2005, Richard M. Stallman wrote:

>    In the Emacs manual, the <backspace> key (the one that deletes backwards)
>    seems sometimes to be called @key{BS}, and at other times @key{BACKSPACE}
>    or @key{DEL}.

>Those are not synonymous.  The chapter on Killing explains the difference.

The Killing chapter leaves me confused (see below).

>We worked for a long time to get this consistent and (more or less)
>clear.  Now I want to leave it alone.

OK.  But what are the standard names for these two keys?  I think they're
@key{DEL} for the big rectangular backspace key and @key{DELETE} (or
should it be @key{Delete}?) for the little key below <insert> and to the
left of <end>.  The Killing chapter leaves this unclear.

>    The names recommended by the Texinfo manual (on page "key") are @key{BS}
>    for backspace and (I think) @key{DEL} for _FORWARD_ delete.

>I will talk with the Texinfo maintainer about that.

OK, here are the problems I have with @node Killing in the Emacs manual:

       Every keyboard has a large key, labeled <DEL>, <BACKSPACE>, <BS> or
    <DELETE>, which is a short distance above the <RET> or <ENTER> key and
    is normally used for erasing what you have typed.  Regardless of the
    actual name on the key, in Emacs it is equivalent to <DEL>--or it
    should be.

The above paragraph appears to be an old, unreworked version of the next
paragraph.

       Many keyboards (including standard PC keyboards) have a <BACKSPACE>
    key a short ways above <RET> or <ENTER>, and a <DELETE> key elsewhere.
    In that case, the <BACKSPACE> key is <DEL>, and the <DELETE> key is
    equivalent to `C-d'--or it should be.

Again, what is the meaning of "is" in the phrase "the <BACKSPACE> key is
<DEL>"?  What does "<DEL>" mean here?  I think it means "the key which
produces the ASCII DEL character (0x7F)".  Or it could be "the key which
deletes backwards", which seems in danger of making some definitions
circular.  What is the meaning of "equivalent" in "the <DELETE> key is
equivalent to `C-d'"?  It surely must mean "is bound to the same function
as `C-d'", since it produces a different key code.

Incidentally, is "a short WAYS above" intentionally so (some dialect of
English I don't know), or should it read "a short WAY above"?

Incidentally[2], there are (at least) three ways of capitalising
@key{DELETE} throughout the Emacs manual and friends:

# grep -c "@key{DELETE}" *.texi | gawk '$0 !~ ":0$"'
  gives
basic.texi:6
frames.texi:2
glossary.texi:1
killing.texi:3
mh-e.texi:1
msdog.texi:1
trouble.texi:8

# grep -c "@key{Delete}" *.texi | gawk '$0 !~ ":0$"'
  gives
cc-mode.texi:10
faq.texi:7
killing.texi:2

# grep -c "@key{delete}" *.texi | gawk '$0 !~ ":0$"'
  gives
programs.texi:1

The all-caps version, @key{DELETE} is surely correct, isn't it?

Anyhow, here's a first attempt at a patch to sort this out.  It's main
point is a @address@hidden as "the usual erasure key".  I've tidied up a
few Whoopses too.


2006-01-12  Alan Mackenzie  <address@hidden>

        * killing.texi (Deletion): Define @key{DEL}.  Tidied up a bit and
        clarified some things.

Index: killing.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/man/killing.texi,v
retrieving revision 1.46
diff -c -r1.46 killing.texi
*** killing.texi        16 Dec 2005 12:02:51 -0000      1.46
--- killing.texi        12 Jan 2006 13:03:14 -0000
***************
*** 100,145 ****
  
  @kindex DEL
  @kindex C-d
!   The most basic delete commands are @kbd{C-d} (@code{delete-char}) and
! @key{DEL} (@code{delete-backward-char}).  @kbd{C-d} deletes the
! character after point, the one the cursor is ``on top of.''  This
! doesn't move point.  @key{DEL} deletes the character before the cursor,
! and moves point back.  You can delete newlines like any other characters
! in the buffer; deleting a newline joins two lines.  Actually, @kbd{C-d}
! and @key{DEL} aren't always delete commands; when given arguments, they
! kill instead, since they can erase more than one character this way.
  
  @kindex BACKSPACE
  @kindex BS
  @kindex DELETE
-   Every keyboard has a large key, labeled @key{DEL}, @key{BACKSPACE},
- @key{BS} or @key{DELETE}, which is a short distance above the
- @key{RET} or @key{ENTER} key and is normally used for erasing what you
- have typed.  Regardless of the actual name on the key, in Emacs it is
- equivalent to @key{DEL}---or it should be.
- 
    Many keyboards (including standard PC keyboards) have a
! @key{BACKSPACE} key a short ways above @key{RET} or @key{ENTER}, and a
! @key{DELETE} key elsewhere.  In that case, the @key{BACKSPACE} key is
! @key{DEL}, and the @key{DELETE} key is equivalent to @kbd{C-d}---or it
! should be.
  
!   Why do we say ``or it should be''?  When Emacs starts up using a
  window system, it determines automatically which key or keys should be
! equivalent to @key{DEL}.  As a result, @key{BACKSPACE} and/or @key{DELETE}
! keys normally do the right things.  But in some unusual cases Emacs
! gets the wrong information from the system.  If these keys don't do
! what they ought to do, you need to tell Emacs which key to use for
  @key{DEL}.  @xref{DEL Does Not Delete}, for how to do this.
  
- @findex normal-erase-is-backspace-mode
    On most text-only terminals, Emacs cannot tell which keys the
  keyboard really has, so it follows a uniform plan which may or may not
! fit your keyboard.  The uniform plan is that the @acronym{ASCII} @key{DEL}
! character deletes, and the @acronym{ASCII} @key{BS} (backspace) character asks
! for help (it is the same as @kbd{C-h}).  If this is not right for your
! keyboard, such as if you find that the key which ought to delete backwards
! enters Help instead, see @ref{DEL Does Not Delete}.
  
  @kindex M-\
  @findex delete-horizontal-space
--- 100,142 ----
  
  @kindex DEL
  @kindex C-d
!   The most basic delete commands are @kbd{C-d} (@code{delete-char})
! and @address@hidden (@code{delete-backward-char}).  @kbd{C-d} deletes
! the character after point, the one the cursor is ``on top of.''  This
! doesn't move point.  @key{DEL} deletes the character before the
! cursor, and moves point back.  You can delete newlines like any other
! characters in the buffer; deleting a newline joins two lines.
! Actually, @kbd{C-d} and @key{DEL} aren't always delete commands; when
! given arguments, they kill instead, since they can erase more than one
! character this way.
  
+ @cindex @key{DEL} key
  @kindex BACKSPACE
  @kindex BS
  @kindex DELETE
    Many keyboards (including standard PC keyboards) have a
! @key{BACKSPACE} key a short way above @key{RET} or @key{ENTER}, and a
! @key{DELETE} key elsewhere.  The @key{BACKSPACE} key, the ``usual
! erasure key'' which deletes the previous character, is called
! @address@hidden throughout this manual.  The @key{DELETE} key, like
! @kbd{C-d}, deletes the following character---or it should do.
  
!   Why do we say ``or it should do''?  When Emacs starts up using a
  window system, it determines automatically which key or keys should be
! @key{DEL}.  As a result, the @key{BACKSPACE} and @key{DELETE} keys
! normally do the right things.  But in some unusual cases Emacs gets
! the wrong information from the system.  If these keys don't do what
! they ought to do, you need to tell Emacs which key to use for
  @key{DEL}.  @xref{DEL Does Not Delete}, for how to do this.
  
    On most text-only terminals, Emacs cannot tell which keys the
  keyboard really has, so it follows a uniform plan which may or may not
! fit your keyboard.  The uniform plan is that the @acronym{ASCII}
! @key{DEL} character deletes backwards, and the @acronym{ASCII}
! @key{BS} (backspace) character asks for help (it is the same as
! @kbd{C-h}).  If this is not right for your keyboard, such as if you
! find that the key which ought to delete backwards enters Help instead,
! see @ref{DEL Does Not Delete}.
  
  @kindex M-\
  @findex delete-horizontal-space

#########################################################################

-- 
Alan Mackenzie (Munich, Germany)






reply via email to

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