From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#60101: 29.0.60; help-quick should use C-/ for undo Date: Sat, 17 Dec 2022 19:16:06 +0200 Organization: LINKOV.NET Message-ID: <86cz8i11a9.fsf@mail.linkov.net> References: <87sfhgtqv5.fsf@posteo.net> <86tu1w31hq.fsf@mail.linkov.net> <87tu1v2m4f.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40842"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 60101@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 17 18:28:39 2022 Return-path: Envelope-to: geb-bug-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 1p6azH-000ANN-5w for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Dec 2022 18:28:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6ayl-00019z-6e; Sat, 17 Dec 2022 12:28:07 -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 1p6ayi-00018h-48 for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 12:28:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6ayh-0001x0-SM for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 12:28:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6ayh-0005eb-NW for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 12:28:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 17:28:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60101 X-GNU-PR-Package: emacs Original-Received: via spool by 60101-submit@debbugs.gnu.org id=B60101.167129807121678 (code B ref 60101); Sat, 17 Dec 2022 17:28:03 +0000 Original-Received: (at 60101) by debbugs.gnu.org; 17 Dec 2022 17:27:51 +0000 Original-Received: from localhost ([127.0.0.1]:57033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6ayU-0005da-SV for submit@debbugs.gnu.org; Sat, 17 Dec 2022 12:27:51 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:35955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6ayT-0005dA-GO for 60101@debbugs.gnu.org; Sat, 17 Dec 2022 12:27:49 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 8BA55240006; Sat, 17 Dec 2022 17:27:40 +0000 (UTC) In-Reply-To: <87tu1v2m4f.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 16 Dec 2022 19:18:24 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:251296 Archived-At: >> In lisp/bindings.el its preferred binding is defined by this line: >> >> (put 'undo :advertised-binding [?\C-x ?u]) > > That is good, but it only solves the problem by providing the means. > The other issue is figuring out how the advertised binding can > automatically be set to whatever is preferred on the current system. Is > there a way to find out what keyboard layout is being used, or at least > what modifiers have to be pressed for a key to be input? If a key would be unbound on a tty, this could help to exclude it from the preferred keybindings. For example, if C-/ was unbound depending on a tty type, then this would fall back to 'C-x u': (put 'undo :advertised-binding '([?\C-/] [?\C-x ?u])) But otherwise, could you formulate a clear criteria for excluding some keys from the set of preferred keys? Do you know how to query the current keyboard layout, or to find the preferred modifiers?