From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: not good proposal: "C-z " reserved for users Date: Sat, 13 Feb 2021 11:50:05 +0300 Message-ID: References: <7eccb0b5-8371-e34a-3371-09b75e1a385a@yandex.ru> <877dnc4dwf.fsf@robertthorpeconsulting.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10201"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Cc: joostkremers@fastmail.fm, help-gnu-emacs@gnu.org, Dmitry Gutov To: Robert Thorpe Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 13 09:53:34 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 1lAqgH-0002Xp-CR for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 09:53:33 +0100 Original-Received: from localhost ([::1]:46140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAqgG-0001m0-Fb for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 03:53:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAqfu-0001lg-1z for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 03:53:10 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:38015) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAqfs-0005EJ-6E for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 03:53:09 -0500 Original-Received: from localhost ([::ffff:41.202.241.3]) (AUTH: PLAIN securesender, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000001DFF5.0000000060279370.00005E9F; Sat, 13 Feb 2021 01:53:04 -0700 Mail-Followup-To: Robert Thorpe , Dmitry Gutov , joostkremers@fastmail.fm, help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <877dnc4dwf.fsf@robertthorpeconsulting.com> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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:127919 Archived-At: * Robert Thorpe [2021-02-13 10:38]: > 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). > > 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). Instead of solving hypothetical problems, let us list third party packages and any complaints practically and specifically and suggest possible solutions to those specific problem. I have my personal packages and I never had problem of key reservation. The prefix key is on `s-p' and recently I have placed it also on `C-c p' and also on F5. I would not bind it globally and automatically for users, rather ecommend that users decide where to bind the prefix key. Helm package does it this way: (defcustom helm-command-prefix-key "C-x c" so users could change that prefix to anything they wish and want while Helm has already provided a default. Helm has no problem how I see it. Which packages have the problem with Emacs and need reservation? > Lastly, the usability issue is still there. I think beginners find this > kind of thing difficult. That will always be the case for beginners within or without Emacs subject. They are beginners. We were all beginners and may find this or that difficult when beginning new things. > 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. One group of users will find that simpler one group will not. Variety of users find this or that simpler, we can see from our conversations here. What may be simple for you may be complex for me and so on. > Philip Kaludercic suggested some code for prompting users before mapping > keys. I think that's a good idea. That would be good idea. It would be good if packages would be advised how to bind keys and to provide alternatives if some of the keys are already bound by users. One can use the below function. key-binding is a built-in function in ‘C source code’. (key-binding KEY &optional ACCEPT-DEFAULT NO-REMAP POSITION) Then the function (key-binding (kbd "s-p p")) yields at my side with `cf-tabulated-people'. It could be used to detect which key is already bound and then the configuration wizard could ask or suggest to user how otherwise to bind the keys. It could say that prefix key for the package could be placed on {C-c j} or {C-c k} and could ask user to accept it, it would be then entered into the configuration file. Jean