From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#40725: 27.0.91; Tutorial reports false positive key rebindings Date: Wed, 22 Apr 2020 23:26:53 +0100 Message-ID: <875zdrgnrm.fsf@tcd.ie> References: <87eesj59yq.fsf@tcd.ie> <83wo6agrju.fsf@gnu.org> <87d0817qbh.fsf@tcd.ie> <83pnc1ez51.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2805"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 40725@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 23 00:28:16 2020 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 1jRNqq-0000dF-Gd for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Apr 2020 00:28:16 +0200 Original-Received: from localhost ([::1]:58928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNqp-0006j9-8k for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 22 Apr 2020 18:28:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39468) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jRNqc-0006iv-PC for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 18:28:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jRNqc-0005Er-97 for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 18:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jRNqb-0005Ds-T7 for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 18:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jRNqb-00027P-PI for bug-gnu-emacs@gnu.org; Wed, 22 Apr 2020 18:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Apr 2020 22:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40725 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 40725-submit@debbugs.gnu.org id=B40725.15875944248075 (code B ref 40725); Wed, 22 Apr 2020 22:28:01 +0000 Original-Received: (at 40725) by debbugs.gnu.org; 22 Apr 2020 22:27:04 +0000 Original-Received: from localhost ([127.0.0.1]:53546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRNpf-00026B-Ov for submit@debbugs.gnu.org; Wed, 22 Apr 2020 18:27:04 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:37175) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jRNpd-00025h-Ul for 40725@debbugs.gnu.org; Wed, 22 Apr 2020 18:27:02 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id k1so4536274wrx.4 for <40725@debbugs.gnu.org>; Wed, 22 Apr 2020 15:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=52OUxLzZwRkWQtphh9cAQBJ08x+KEWnnl43h6J8kc0U=; b=o9uIszC1sgXXP6jp+Xh31cXnXwlpwrT/a0dvgbwLlSafUFdcMgr7GeHeyAMBCKPevD jtIOkMPxJDVarPynmIlj69/x7/chVxhML6QQBn9xWg02c71+W/SBIhpeMCRT/COeD15t g708ks3yA0igsg//t0gAd7imh7PrHgCYm59OQLfZuVC2PpDUonT1zzensf1ZyFpPYva4 PDmh8ktHoDyT8tlAGif9zapd3veSffYSdws4Cws/Y4mEWJETdGTwqJrZjbyXszZfFjl9 nPw863ecKHl7+5pP8ACtfbLd9tanK1A1JLh3CMdUUlLfvoR40k7s5AWkfKb8oLZnm27U +HOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=52OUxLzZwRkWQtphh9cAQBJ08x+KEWnnl43h6J8kc0U=; b=ReYdGolmvtFm4xllLeF3zyvp15oENXHIOfucFeYdJlh+ifbbYCmAGq0nxvFRSU5Wlo 2HRZ6vAphaUE7nCOVwZAdufJPObRlp9vtVAhchkxCJTCeK8EZa0/fBHgCI+LVOYcpZPJ GHjmfsHn6uooJu5DwMRvg8ciWJEwsuwL1ftUsGGhwVXHsUFnVAGMHOryBw3f8RFwzWKT 6P1WPE3iYv8qghP9Hyx09gaRWtz5pp1rSy1f3Frq+56NrS9n63ROxHttG1C2vjDqNzQg ma4xo9aAjHngi5jIUEuOs2BZYIQ72sojKyAqf0eFqUAH5Nj7FHy1psVPGBE66/vYMy9A TStw== X-Gm-Message-State: AGi0PuYsMVfqTANLojuQEbre2p7Q5RNjilKC/2/fqCewMzxSTL6yAQLH Kgy5xo+AcdvmJg1fmAXolsctvtsLNmM= X-Google-Smtp-Source: APiQypKaaq/bLfvz73QnRQ4Lq6Gk8G7fLgtKiBdxgB7l7BnJSDvGj7A5lCBt261cmFOSMTMMM6EgkQ== X-Received: by 2002:adf:f750:: with SMTP id z16mr1401937wrp.115.1587594415843; Wed, 22 Apr 2020 15:26:55 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id q143sm989732wme.31.2020.04.22.15.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 15:26:55 -0700 (PDT) In-Reply-To: <83pnc1ez51.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 21 Apr 2020 16:39:38 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 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" Xref: news.gmane.io gmane.emacs.bugs:178835 Archived-At: Eli Zaretskii writes: >> From: "Basil L. Contovounesios" >> Cc: 40725@debbugs.gnu.org >> Date: Mon, 20 Apr 2020 23:19:46 +0100 >> >> The function in question, tutorial--find-changed-keys, is only ever >> passed the defconst tutorial--default-keys as argument. > > Yes, and one of the aspects I thought about was whether this change > could make use less future-proof, if more keys are added. I don't think the proposed patch makes the code any less future-proof, but then my crystal ball isn't the best, and tutorial.el could use some love regardless, as this bug has shown. >> In fact, the tutorial doesn't mention C-c at all, but apparently >> it's included in tutorial--default-keys just because it's an >> otherwise common prefix. > > AFAIU from the code, the main consideration with C-c is when the user > turns on the CUA mode, not because it's a common prefix. So maybe we > should narrow the test to only make sure CUA rebindings get caught? Good point. I hadn't thought of that and I'll look into it. >> > How do we distinguish the case where _all_ of the subcommands were >> > rebound, for example? >> >> I don't think the current logic tries to handle that either, does it? > > Well, we are trying to improve the current logic, aren't we? You drive a hard bargain. ;) I thought I'd suggest the current small patch before attacking tutorial.el wholesale, but I can do both in one go after the end of April when I'll have more free time. While we're on the topic of improving the manual - it's on my todo to eventually help with a Greek and possibly even Hungarian translation. Is there anything more to it than posting a patch to bug-gnu-emacs/emacs-devel for review, such as getting a GNU translation team involved or anything like that? >> > Also, don't we have some prefixes that for the purposes of the >> > tutorial must not have _any_ of its subcommands rebound? >> >> Hm, I don't know. Did you have any examples in mind? The only prefixes >> I see used in the tutorial are C-x, C-h, and Meta/ESC. >> >> AFAICT if a command-binding pair isn't listed in tutorial--default-keys, >> then C-h t won't complain about it being rebound. For example, you can >> rebind C-x k (which IS mentioned in the tutorial) and C-h t won't notice >> at all. > > So maybe we should add that, to make the test more thorough? Sure. >> I can open another bug report for extending tutorial--default-keys to >> detect changes to all default key bindings used in the tutorial, but for >> now I think the proposed patch fixes the issue at hand without making >> things worse. > > I just want to make sure we don't do anything that could cause subtle > problems. Bugs while reading the tutorial are the worst kind, for > obvious reasons. Agreed. -- Basil