From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.help Subject: Re: not good proposal: "C-z " reserved for users Date: Sun, 14 Feb 2021 01:47:28 +0200 Message-ID: <763e1864-b66b-be16-c6e5-d6a9bc3f0bbe@yandex.ru> References: <877dnc4dwf.fsf@robertthorpeconsulting.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3566"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: joostkremers@fastmail.fm, help-gnu-emacs@gnu.org To: Robert Thorpe Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 14 00:48:07 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 1lB4dy-0000q9-L8 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 14 Feb 2021 00:48:06 +0100 Original-Received: from localhost ([::1]:45764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lB4dx-0006bM-Ka for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 18:48:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lB4dS-0006b2-Lw for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 18:47:34 -0500 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:39283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lB4dQ-0004vC-Tj for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 18:47:34 -0500 Original-Received: by mail-wm1-x32f.google.com with SMTP id u14so3936045wmq.4 for ; Sat, 13 Feb 2021 15:47:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Q/VV+ybOGHQf7AdiV2wXMZt076zNcEqwOeDIbeLL2bs=; b=dz7pl7fb0ZC6dy36/sbf3RlX31s89zhQaM1L1JOhrd+6zSX3IN5FG73BA2z4RkqAB+ CZDfZAmG4SeGhIXq5ATIPftug+nzmJCNhbVnZSYQCc+5DmyV2zOatAa3P8OYJ1NpKg+3 m69RwT1ImfF06Skm2Z6yaLJQKpU0jAVeZveO0LKz5etbiv/awZBlslJ1kdiUaJIMPytq liCB45I6WtF1T+Yoj/BDgARd+qstghJMi1ip+fx/ZATa35adVpy/wSH/uBBGHjEV5PCE d10jxmjCXYgnMvTMxJ4PHAk2luQQpU405E6PSuueOcHpYhr+F9S9irIpXyFFfjPN0F// dd7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Q/VV+ybOGHQf7AdiV2wXMZt076zNcEqwOeDIbeLL2bs=; b=arjrzpQt+8daT3ic4azotJI+l3pV33yIvY94C5RGRAJN2nRua0A3e1YpJEI7SCqd/f dVKus57CFBQNUdjigG5tbszcv2JVaWMfFwdkqYd0MuMN9X/moli7vU6l9OXV5ofoWHpQ fFEPacrBQMg1BN9u4CwyTpsKWq/xCdzmtqsuarR8Kd+cce5wpwmKB50LtADUpUsC6bmG mDLwdxquLOtz/VFAfXA1a6IG+JFWusNQQ2Wz9SlIvAbgS/Wy3hu+nXT5lwtdy0d1GYWY YO1ej5N8pW6A/fHrvxegYg24Q20rLYHeLuO8MZ385n00OC00yMX7dMHmCMMIJ6VaZEQ8 uYeA== X-Gm-Message-State: AOAM533LY0Ayg8jrU0M776B8LMrOCRkPznpXxPFE1R4i1Sm+6YbJfVHl V3RlgtQB+CU1mXH9vq8WDlVGOg0982c= X-Google-Smtp-Source: ABdhPJw2zA+Ur4c1iGa+gtJVs53FNf0Wb2tpNLd7hqnNuPR7YyW1NtK1LwwV6w1WttuhAH5at+XDFg== X-Received: by 2002:a1c:5686:: with SMTP id k128mr8216010wmb.189.1613260051305; Sat, 13 Feb 2021 15:47:31 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id 101sm6836820wrk.4.2021.02.13.15.47.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 13 Feb 2021 15:47:30 -0800 (PST) In-Reply-To: <877dnc4dwf.fsf@robertthorpeconsulting.com> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:127986 Archived-At: On 13.02.2021 09:37, Robert Thorpe wrote: > Dmitry Gutov writes: > >> On 12.02.2021 10:10, Robert Thorpe wrote: >>> I think that user-friendliness is beneficial. It would help with >>> that if packages could bind some keys by default. >> >> The current tradition is that a package provides a major or minor mode >> (or several), puts one of them in their init file, and *those* install >> some default keymaps. >> >> auto-mode-alist entries, however, can be added through autoloads. > > Yes. But I don't think that solves the problems that Gregory Heyting > and Drew Adams are talking about. > > Firstly, it can't do anything about changes in keybindings in future > Emacs versions. Drew tells us that Emacs has recently mapped "C-x x", > "C-x p" and "C-x /". I'm using Emacs 27.1, so all of those must have > been mapped for Emacs 28 (or perhaps the version after that). Is that a problem? When such package finds out about a change like this, they can change the default binding, or they might keep it as it was. After all, the changes like the ones you have mentioned are additive, both the project keymap and the later addition of buffer-related commands on 'C-x x'. They haven't been there before, and a fair number of users might not miss them if xyz-mode (which they do use) takes up either of the sequences. > The author of a third party package can't easily deal with that. What if > their minor mode used "C-x x"? In that case it will remove the keymaps > of a core feature (or the core feature will remove it's keymap). Minor mode keymaps generally override the global keymap. > As Gregory Heyting has pointed out, what about packages that are not > modes? Not every package is a minor mode or major mode. So, how should > other types of package behave? Depends on how their setup is documented. Minor or major modes are the majority, though. > Lastly, the usability issue is still there. I think beginners find this > kind of thing difficult. Having a key sequence overridden by a minor mode? Considering beginners don't usually read the manual, they might not even know they are missing anything. Which might be a loss, of course, in certain cases. But not a difficulty. > These days there are lots of Emacs "starter > kits" that claim to make Emacs simpler. A lot of what they do is > configuring third-party packages. > > Philip Kaludercic suggested some code for prompting users before mapping > keys. I think that's a good idea. Some infrastructure for suggesting custom key bindings might work, but I feel the current third-party tradition has held up pretty well.