From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.help Subject: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages Date: Fri, 12 Feb 2021 19:16:50 +0100 Message-ID: <877dndgnhp.fsf@posteo.net> References: <7ef75c33936136eb3a20@heytings.org> <87tuqk6d9d.fsf@posteo.net> <3966473cc1ab9f104724@heytings.org> <87o8gr1oom.fsf@posteo.net> <87lfbubthl.fsf@posteo.net> <87tuqia845.fsf@posteo.net> <87pn16a1xn.fsf@posteo.net> <87lfbu9q5x.fsf@posteo.net> <329d68a5ed6d1194f3c0@heytings.org> <87czx5a947.fsf@posteo.net> <329d68a5ed1656b4427e@heytings.org> <87zh098lo4.fsf@posteo.net> <329d68a5ed26ba41356b@heytings.org> <87h7mhgyxj.fsf@posteo.net> <329d68a5ed0dcd10a78a@heytings.org> <87czx5gpuj.fsf@posteo.net> <329d68a5ed4f4c7e84fb@heytings.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17768"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Gregory Heytings Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 12 19:20:04 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 1lAd2w-0004TX-IZ for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 19:20:02 +0100 Original-Received: from localhost ([::1]:40800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAd2v-0007r2-I3 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 13:20:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAczy-00060o-5v for help-gnu-emacs@gnu.org; Fri, 12 Feb 2021 13:16:58 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:59604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAczv-0002YX-H3 for help-gnu-emacs@gnu.org; Fri, 12 Feb 2021 13:16:57 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 2F4D916005F for ; Fri, 12 Feb 2021 19:16:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1613153812; bh=fsEFuQNUeBzpjtzm4rgmL++Sr2nRoQ92Plnf4wSljQw=; h=From:To:Cc:Subject:Date:From; b=kRqIYXPC5OZeVSlsjWCflxHdWOmzOykUvzrBR3Zj1iZNnhZis0+O/Jz9XWqUovnrm Dz6MDH0FVs0WFly44vKdjwWguCD4W2HRAPOcY38G6mmqaSxujOomYuZ8NTuIHUWXyZ 3/qxMtlGQ0OcQNa4lexqb/bjkzry+AhqvCh01dUGTgfBD0UqlxZ9JmvXmPpUNnSPEf lJLvIaispIXJxRtZAvbmXHzK9FS1FfeJkZxts8+q2T19LmdzMPst5hToIHx/yyXQ+c n4dsr9VuJcktxBYd10F6HMpnnZy3KgUcFXQqCRUNsUQyZ/wQkDCPbPsrK/61k57Uam tbdw9L2VVSByQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DchXg488dz9rxM; Fri, 12 Feb 2021 19:16:51 +0100 (CET) In-Reply-To: <329d68a5ed4f4c7e84fb@heytings.org> (Gregory Heytings's message of "Fri, 12 Feb 2021 17:54:52 +0000") Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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:127861 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Gregory Heytings writes: >> My suggestion is based on the introduction of two variables: One for >> packages to formally specify their suggestions for what keys to >> bind, what hooks to modify, what options to set, etc. and one for >> users to declare if they are interested or not. >> >> The patch I added to a message proposed that eg. Magit wouldn't >> write something like >> >> ;;;###autoload >> (global-set-key (kbd "C-x g") #'magit-status) >> >> (I'm oversimplifying, their code is more complex), but instead they >> add a line like >> >> ;;;###autoload >> (add-to-list 'pacakge-configuration-suggestions >> '(magit ; package name >> (key ; what type of suggestion >> "C-x g" ; what key to bind the following to >> magit-status ; what command to bind >> ))) >> > > I'm fine with this in principle, but it doesn't answer the question. > In the above example Magit would suggest "C-x g". It can do this > because at the moment that key isn't used by Emacs. There is no > guarantee that that key will not at some point be reclaimed by Emacs. > It cannot suggest a "C-c LETTER" key, these are AFAIU strictly > reserved for users in their configuration files, and there are not > enough available keys there so this cannot be a long term solution > anyway. So what keys can it suggest? This, and only this, is what the > proposal is about. My reading of the guideline on "C-c LETTER" is that a major/minor mode shouldn't bind C-c LETTER to a command, so that it overshadows whatever is bound globally to C-c LETTER. But a system like what I propose just generates to configuration *for* the user, in a user file in which case the guideline doesn't apply. That's what I mean by avoiding the need for an extra key-space. Of course, if some way could be found to reserve a prefix for third-party packages, pacakge-configuration-suggestions could always use this too -- my suggestion just anticipates that this will probably not happen and tries to solve the problem in a different way. =2D-=20 Philip K. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCAAdFiEEbW+YL3e0aNnYosjIGB9bla4wszYFAmAmxhIACgkQGB9bla4w szbIVAv/alz91CdvvfOZnI/5ubxTgXD+eW20h3ckZG/YCOY4TR9LWedIyFrqE8Ba QvcTSdpYl0iPcy+2DpQiHAZIfnmkEL8m8Cjtijft0bzcfm5nmZOibGVLSkxN5cgk sUqJrvLMRQgva80wRo8owP01eiSfrLLJZjT/X2nGWmrVx5ilyJTJznDpY6Ux2msl us1gsMITUS0nZCgrCrwOZsVa8PPcXvKkBKlo9mAFWxDYvp+HVUjBpzFF+Hwp8iX/ ejuR6iGrF7Bq1A3m0SLf3Yl8c1W3lAH8+5nJAr23se0/RZyHe4GokNl0WcCCU/MH uCOtPx9KRIXSF7hmtEJQzJj2cyZnLehQ5OSRUOqclnoG5xDKSZDXzRE2ZiN1EcZZ z0irkbYqYn43b6RkXWrVfd9c9QPcaUm8xWmLBq0YDO9V/Ek4vGcEwWRf63AhXYLN 77rz4Q+SIXRqAo9VYFyxUWguchtuEF0eFSMXzLJ61VuVLoSTMnf7XnwfbeKgjq2l aupuGR5C =CNOT -----END PGP SIGNATURE----- --=-=-=--