From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: emacs-28 56026242e4: Explain how to bind keys to non-ASCII sequences Date: Mon, 14 Nov 2022 19:40:35 -0800 Message-ID: References: <166844275725.4187.2343107623845911514@vcs2.savannah.gnu.org> <20221114161917.7FC8AC00AB5@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22063"; mail-complaints-to="usenet@ciao.gmane.io" To: Robert Pluim , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 15 04:41:12 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oumoy-0005cL-L0 for ged-emacs-devel@m.gmane-mx.org; Tue, 15 Nov 2022 04:41:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oumoT-000699-HF; Mon, 14 Nov 2022 22:40:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oumoS-000690-3v for emacs-devel@gnu.org; Mon, 14 Nov 2022 22:40:40 -0500 Original-Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oumoP-0007VS-P0 for emacs-devel@gnu.org; Mon, 14 Nov 2022 22:40:39 -0500 Original-Received: by mail-oo1-xc2c.google.com with SMTP id o140-20020a4a2c92000000b0049effb01130so1873065ooo.9 for ; Mon, 14 Nov 2022 19:40:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:from:to:cc:subject:date:message-id :reply-to; bh=TXeWk3Unk6aci1EjybEBbf5dBiOAtbm5SFFEA5jJ2rE=; b=nfVZLTo4E1ck41sf2DYjLlzGKmUijvaz4v+eDgX+JV52mPOvMYmQvAClPUKQQT3KMp GojLCCjlR2uUPQmkfNPsooYimVggdfyam6rpiLy8bzEoPe/KZSu/y66fqWZegq9MH2ks 2B89uRhUTuGkTVsVngKdJe/zeC0YFkGmMV95GJR7IQ3ksyAkhoN9CAHGRLyxeIj36lIA slVf9FVN+DUzoRnmcjS6lxvZGYmaqQjq7sVTTvUPaVrTNqgrie6r3pvwAlsjk22pRudT H8kJ6RmwAHwpgxK+j34lPFNRrgK8b0v9WoU7eWOdaWYUt6CUSrIiFP2tI6Ct871cXsQB bQHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=TXeWk3Unk6aci1EjybEBbf5dBiOAtbm5SFFEA5jJ2rE=; b=IkIXvn+8DYHVZUqxOjeo9N2pM00bqYmwE2YysqA0ikibysoRXy9Rmde4KY8rbNWjtD x3rslwfXHaNJ2cMgkzIMw+8wg2l6BbpCmvwMZO3LlDxePa8HyYAn6HRgcTRG4Qgr6Z1M Icb9f8qC0i133j9aRqVGqnNZwfBocdbKIy8A1gOABbSu3cbXnBuj4xuoKUk00DbnxZGU raPGMk4pNJI06swZJjFUvTZeP7Wxozx1lwasN/rrc0g0SxwmCTBALfDhOFuKvEV4+XAb JdJQcOOnbGWHT1nju9XoqlEEow3wgXGUbRPSPpxmUDgcDjbzZH1wp5Zr0SbOEcyDWsi8 QcPA== X-Gm-Message-State: ANoB5pm/HbyN/Hkz3YrFXiXYakB0X6elXravHYUWQ93/6pYCkmY9xq4l PbSOPxHW+sdJcJz1GZPCatXjhN+VoeJHAyobIx8= X-Google-Smtp-Source: AA0mqf6KGhCUAJAy67qa9elfMhjrnrV08CZjLuZ/lIPGSy0t2ivRtsqk+2AiER7l/h1gvNJ3dLLbUyDrnTDkEfBAn1s= X-Received: by 2002:a4a:e1c6:0:b0:49a:6eb0:735a with SMTP id n6-20020a4ae1c6000000b0049a6eb0735amr6815959oot.34.1668483636382; Mon, 14 Nov 2022 19:40:36 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 14 Nov 2022 19:40:35 -0800 In-Reply-To: <20221114161917.7FC8AC00AB5@vcs2.savannah.gnu.org> X-Hashcash: 1:20:221115:emacs-devel@gnu.org::JKcbi1nP/bQFSc2x:8A+X Received-SPF: pass client-ip=2607:f8b0:4864:20::c2c; envelope-from=stefankangas@gmail.com; helo=mail-oo1-xc2c.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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299826 Archived-At: Robert Pluim writes: > branch: emacs-28 > commit 56026242e462e8834337f118baaa9c49e2411f7d > Author: Robert Pluim > Commit: Robert Pluim > > Explain how to bind keys to non-ASCII sequences > > * doc/emacs/custom.texi (Init Rebinding): Explain how to use `kbd' > when binding keys to non-ASCII sequences. > --- > doc/emacs/custom.texi | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi > index 2bc1d3820d..65970ce412 100644 > --- a/doc/emacs/custom.texi > +++ b/doc/emacs/custom.texi > @@ -1868,6 +1868,22 @@ characters. For example, here's how to bind @kbd{= C-x M-l} to > > @example > (global-set-key "\C-x\M-l" 'make-symbolic-link) > +@end example > + > + Similarly, a key sequence can be bound to a Lisp string or a vector > +instead of a command. A vector is only required if the intended > +result contains non-@acronym{ASCII} characters, and @code{kbd} can > +again be used to create that vector. For example, to bind @kbd{C-c h} > +to the string @samp{hello}: > + > +@example > +(global-set-key (kbd "C-c h") "hello") > +@end example > + > + But to bind it to the string @samp{ol=C3=A1} instead: > + > +@example > +(global-set-key (kbd "C-c h") (kbd "ol=C3=A1")) > @end example > > To bind a key sequence including @key{TAB}, @key{RET}, @key{ESC}, or This section has changed quite a bit on master, including using `keymap-global-set' instead. Unfortunately, I'm not sure what if anything needs adding to the text already on master. Could you please look into it, or even help merge it? Thanks in advance.