From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: The correspondence of the command-name and its key-sequence. Date: Sat, 9 Jan 2021 15:16:13 +0800 Message-ID: References: <62acbe7b-18f5-4b76-9f05-265218a58db7@default> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29688"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 09 08:16:49 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ky8UT-0007c7-2Y for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 09 Jan 2021 08:16:49 +0100 Original-Received: from localhost ([::1]:52492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ky8US-0006Vr-09 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 09 Jan 2021 02:16:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ky8U8-0006VW-RV for help-gnu-emacs@gnu.org; Sat, 09 Jan 2021 02:16:28 -0500 Original-Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:39322) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ky8U6-0004tB-FL for help-gnu-emacs@gnu.org; Sat, 09 Jan 2021 02:16:28 -0500 Original-Received: by mail-lf1-x12e.google.com with SMTP id a12so28460025lfl.6 for ; Fri, 08 Jan 2021 23:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Hc8CkrdVjIJlOH0Mz6AN3jI4B5E3S6l5eLMyAQl2qgE=; b=OWwHvMjM5KBG6VPZpMDlBfII/ll0V9ZTXX9lfytvqcPLuhvhXATsB2XX3u3FMsTh81 mdHrNP/qQRYZG6gvrmKLXM20kaf+cDIegFiYk4ZmShhZ3WwJAdLZUZJUK40EWC8DnFsR CmVxNuVCKBnxLQVJufcDIejxTIZUzzG1R00haOjx2KpVbsjfqg5uBzePJURfGroSkjFa vRAquno5SQ/JHeoGiC4en8nztClmHKVjyP5fuc7R7JeLebuMwkz0mww0+Ffi9JsTpM5h JeWeMA+F01qXHv7TIYvh5x9Tz5WtSmc+F+tnwayPEie1kgaGhswoWX2UOmF1QdLDKFNH duRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Hc8CkrdVjIJlOH0Mz6AN3jI4B5E3S6l5eLMyAQl2qgE=; b=LmbFYlCkuV1lvZ86lCDWv4LnSe1RKaLcO6c5qgX2BITQe7JIS8KH/m0ht4lGfkxHMI yDTaY/rA2cffZpsYe+nCIoaxU4/oHsk+Q6DXOSL0FQrQy7HCSDWUp/mgm5Q5P84ygEQd iLmH3LFv+o5v1046cnlzKFk8Wny1Ab/UGNErA+E/DDL8hzp6PJgxtJ39sFopl3ocSTG3 cLcLnxxaMUUS4yqAWw5XdaDblUgUF4faoPfFaaQB2i4l5wWt+txN5yKsVTf1Y1mgXaxV pCTDI4KUF8cdTRdrxCaXoACKekjDy7ENxS9LvgcKylQJldzOtQol/urVLSmHCijhbVbp B27w== X-Gm-Message-State: AOAM531j9UMyuF+NibPJedjwFehDTOrA6GrTnzUEZ2L1hVmLGW4Bz82o V4IqJBnTXIjE7yTItDDEPSzy0qxcoq+YRNdtFF8= X-Google-Smtp-Source: ABdhPJy2qTnjAkjS9QQlSLWAs4wAxXNK2woYGYTEB/P9wUSzc0ZHSmhEExJq8wN/lGxEm3C36SQQygQOpVD6wnJnqn4= X-Received: by 2002:a19:23c8:: with SMTP id j191mr2970634lfj.484.1610176584488; Fri, 08 Jan 2021 23:16:24 -0800 (PST) In-Reply-To: <62acbe7b-18f5-4b76-9f05-265218a58db7@default> Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127116 Archived-At: On Sat, Jan 9, 2021 at 2:34 PM Drew Adams wrote: > > > 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"). That's exactly what I mean. > > 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." I find another may be far-fetched relation based on your above notes/hints/comments: werner@X10DAi:~$ printf "%d %x\n" "'q" "'q" 113 71 werner@X10DAi:~$ printf "%d %x\n" "'G" "'G" 71 47 As you can see, the hexadecimal point code of "q" is the same as the decimal point code of "G" in form. BR, -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China