emacs-devel
[Top][All Lists]
Advanced

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

FW: GNU Emacs raison d'etre


From: Drew Adams
Subject: FW: GNU Emacs raison d'etre
Date: Thu, 28 May 2020 09:41:17 -0700 (PDT)

[For some reason, when I used Reply All to excalamus's
message, emacs-devel got dropped from the cc list.

So I'm forwarding the message I sent a few minutes
ago.  Dunno how many other messages might have gotten
dropped from the list this way.  I believe the same
thing happened to me once before, perhaps when I
replied to another excalamus message.]

-----Original Message-----
From: Drew Adams <drew.adams@oracle.com> 
Sent: Thursday, May 28, 2020 9:33 AM
To: 'excalamus@tutanota.com' <excalamus@tutanota.com>
Cc: 'Karl Fogel' <kfogel@red-bean.com>; 'Richard Stallman' <rms@gnu.org>; 
'Andreas Roehler' <andreas.roehler@online.de>
Subject: RE: GNU Emacs raison d'etre

> What does C-g mean? 

It should mean what `C-h k C-g' or `C-h c C-g' tells
you - like other key sequences.  Unfortunately, that
doesn't work.

Maybe/probably by design, but maybe worth revisiting?

How important is being able to easily ask Emacs about
this key, versus being able to use it to quit a help
command that asks about it?  Dunno.  Maybe there's a
third way?

If you somehow can find out that `C-g' is generally
bound to command `keyboard-quit', then `C-h f' gives
you a page of helpful description/explanation.  But
if you don't know that command name then it's not so
easy to find out what `C-g' is all about.  (Yes, the
manual.)

> Why the sequence C-g specifically? I think the
> disconnect may be that C-g appears outwardly meaningless.

(What disconnect?)

Yes, I realize that that's your real question:
what's the mnemonic, or other relation, here?

Well, there is none.  None that's readily useful to
most people nowadays.  For those who might really be
interested, the answer is "hysterical raisins".

The ASCII control character Control G is described
as follows:

 Key       Dec    Hex   Abbr.  Name
 [Ctrl] G       7       07       BEL    Bell

 Description in C0 of ISO 646:

 A control character that is used when there is a
 need to call for attention; it may control alarm
 or attention devices.

http://ascii-table.com/control-chars.php

That info is actually useful, as is the general
info that some Emacs control keys are associated
by default with ASCII control characters.  That
info is interesting, if somewhat quaint.

But it's not important to understanding what `C-g'
does in Emacs.

How long does it take someone to learn what `C-g'
does in Emacs?  Especially if we cover that at
outset in a tutorial?

> For contrast, <escape> clearly means to retreat

Escape doesn't mean retreat.  But OK.

> and is often used in other applications to
> cancel (e.g. vi).  

And `ESC ESC ESC' is used similarly in Emacs.

https://www.gnu.org/software/emacs/manual/html_node/emacs/Quitting.html

But `ESC' has additional meanings, starting,
again, with its meaning as an ASCII control
char:

 Key       Dec    Hex   Abbr.  Name
 [Ctrl] [       27      1B       ESC    Escape          

 Description in C0 of ISO 646:

 A control character which is used to provide
 additional control functions.
 It alters the meaning of a limited number of
 contiguously following bit combinations.
 The use of this character is specified in
 International Standard ISO 2022.

Well, whaddya know?  It can alter the meaning
of some chars that follow it.  And in Emacs
it's used just that way - for Meta chars.

This is actually a useful thing for users to
learn, and it's one that they don't learn so
much nowadays.

That you can generally use `ESC <key>' in
place of `M-<key>' is handy in some contexts.

Recently I posted messages about my library
`keysee.el', which provides help on keys by
providing key completion.  In that UI, you
can find a key such as `C-M-q' under that
name, but you can also follow `ESC' as a
prefix key and find it as (ESC) `C-q'.

And more generally, Emacs help commands that
list keys show you that `ESC' is a prefix key.
So knowing about this relation between `ESC'
and Meta chars can help.  It can help you ask
Emacs.

> C-h is related to help via the 'h', which
> makes it easy to learn/remember.

Well, yes.  But `h' isn't just associated
with help.  It can be associated with
"highlight", "here", "header", and more.

It's just that you've _learned_ the h=help
association, and it's become second nature.
Another char that's "naturally" associated
with help is `?'.

> So why 'g'?

Why not?  Here's a mnemonic for you: "_G_et
me outta here now!"



reply via email to

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