all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Hongyi Zhao <hongyi.zhao@gmail.com>,
	help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: RE: The correspondence of the command-name and its key-sequence.
Date: Sat, 9 Jan 2021 06:32:45 +0000 (UTC)	[thread overview]
Message-ID: <62acbe7b-18f5-4b76-9f05-265218a58db7@default> (raw)
In-Reply-To: <CAGP6PO+F-G_xiyZirDR4EGMhqkVcg-pRm=rCY6yReUUqrmAoTw@mail.gmail.com>

> But, it's still very hard for me to understand the correspondence of
> the command-name and its key-sequence. To summarize, why use C-g to
> represent the command keyboard-quit, instead of other more directly
> related forms, say, C-q.

I think you're asking why `C-g' is used for quitting/canceling an action, instead of, for example `C-q' (since `q' is mnemonic for "quit").

Somewhere there's a good history of `C-g', including for Emacs, but I can't recall where I saw it.  I'm sure someone on this list will point you to it.

I'll at least point to this Wikipedia page:

https://en.wikipedia.org/wiki/Bell_character

That tells you that `C-g' was assigned to a bell code, i.e., as an alert.  And before `C-g', a bell code rang a bell on a teletype or tickertape, to alert a human operator.  Bell codes apparently go back to 1870.

In Emacs, using `C-g' typically also produces a bell sound. (Function `ding' does that as well.)

See also:

https://en.wikipedia.org/wiki/Control_character

"The bell character (BEL), which rang a bell to alert operators, was also an early teletype control character."

"7 (bell, BEL, \a, ^G), which may cause the device to emit a warning such as a bell or beep sound or the screen flashing."

and

https://en.wikipedia.org/wiki/Control_key

"For example, the character or "G", whose ASCII code is 71 in base 10, or 100 0111 in binary, would be transformed into the binary code 000 0111 (7 in decimal), which is assigned to the bell character."



  reply	other threads:[~2021-01-09  6:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-09  6:05 The correspondence of the command-name and its key-sequence Hongyi Zhao
2021-01-09  6:32 ` Drew Adams [this message]
2021-01-09  7:16   ` Hongyi Zhao
2021-01-09  8:23     ` Omar Polo
2021-01-09  9:33       ` Hongyi Zhao
2021-01-09 10:00         ` Omar Polo
2021-01-11  8:04           ` Hongyi Zhao
2021-01-11  8:20             ` Omar Polo
2021-01-11  9:51               ` tomas
2021-01-09 17:20         ` Francis Belliveau
2021-01-14 22:21           ` ASCII - Why...? -- as promised Francis Belliveau
2021-01-09 21:21     ` The correspondence of the command-name and its key-sequence Drew Adams
2021-01-09 17:39 ` Kévin Le Gouguec
2021-01-09 18:47   ` Eduardo Ochs
2021-01-09 22:29     ` Kévin Le Gouguec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62acbe7b-18f5-4b76-9f05-265218a58db7@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=hongyi.zhao@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.