From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.help Subject: Re: PROPOSAL: Repurpose one key and reserve it for third-party packages Date: Tue, 09 Feb 2021 09:13:08 +0000 Message-ID: <8ed9b43502bad8cafcf1@heytings.org> References: <7e12c1c3c1aae58993e2@heytings.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16166"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 09 10:18:08 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 1l9P9s-00045v-1w for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 10:18:08 +0100 Original-Received: from localhost ([::1]:58386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9P9q-0004TO-RB for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 09 Feb 2021 04:18:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9P58-0000me-LO for help-gnu-emacs@gnu.org; Tue, 09 Feb 2021 04:13:14 -0500 Original-Received: from heytings.org ([95.142.160.155]:43104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9P55-0004jN-Si for help-gnu-emacs@gnu.org; Tue, 09 Feb 2021 04:13:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1612861989; bh=htMw1mX19V+30Omy80srBxXDzx/zw2BBCiOXlGjJ9LA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=aL4reEmg8/2VQ2JeHqQAxgglJU/xV5GW96nE1J8ORLiUv5RN2p4WhDHkqwRn3VZSz J38Ltv9aE5uFo4YYIG5TNLsjwnLEcci53Fy74KrSk7I2RYtlGiRqiFXs4mYnlBvAUl pKTACwIzrFToI8b3h66QFDNHgewz4s9HcCPTGlyj4oI+hqsZKrR471t9s2yRVDansd KJASmu7V6Ayy5oRuNB0LbqjxEccFTiWpoGMxnBYvJyz6ohOKkUb8/tpm9N61GPN646 KMeOZ7Gm6iOc/uouuPzPdRtpayfCVaLq/ocFxxmTuYhfv69NobC0pzWH7umYe6WBYs lM0OXWmlrWdvA== In-Reply-To: Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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:127686 Archived-At: >> The current key binding conventions (see `(elisp) Key Binding >> Conventions') reserve keys for users, for major modes and for minor >> modes, but not for third-party packages [1]. > > In my understanding those third party packages usually define major or > minor modes so the reservation of keys for third party packages is thus > already supported that way. > That's not correct, many packages (not all of them, but many) implement commands that are intended to be globally bound. The "org-capture" command is an example. A package implementing advance bookmark commands is another one, a packages implementing a dictionary search command is yet another one. > > There are more than one keys reserved already in the manner you > described such as those reserved for users can be proposed and used by > third party packages, including those for minor and major modes, they > can be used by third party packages. > Third-party packages cannot do that, and they do not do that. A third-party package cannot bind a key C-c LETTER key, it can at best advise its users to do so. It's what Org-mode does. > > Maybe one could make a package that changes the prefix key or various > packages or the package that could "see" which packages are used and > which of them need positioning of their prefix keys. Then such package > could ask user with proposal: > > - C-c bind prefix key for Org functions > > - C-, bind prefix for Magit functions > > Approve or change above y/n? > The first question is not an allowed one, C-c can only be used by users. The second question is not a good one, C-, cannot be used in terminals.