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: Sat, 13 Feb 2021 08:33:39 +0000 Message-ID: References: <7ef75c33936136eb3a20@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> <877dndgnhp.fsf@posteo.net> <329d68a5edfafadfe7cd@heytings.org> <87y2fsg5ve.fsf@posteo.net> 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="9689"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Philip Kaludercic Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 13 09:34:11 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 1lAqNW-0002OX-Hf for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 09:34:10 +0100 Original-Received: from localhost ([::1]:41098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAqNV-0006Y3-Jx for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Feb 2021 03:34:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAqN5-0006Xq-U6 for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 03:33:44 -0500 Original-Received: from heytings.org ([95.142.160.155]:49400) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAqN4-0006G0-9i for help-gnu-emacs@gnu.org; Sat, 13 Feb 2021 03:33:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1613205220; bh=Wb0oBcwldLSE25oDKvewLvPK4QoD8aDeBhWXSowGIcY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=oo3dRm9MThqyD9mWIpsAd/Cq0vlCTVFwPK8zlLLjYm7zeWsMezmUVL99JW1IhzvJ2 GmbA+dPZBywqhhfCX8wMisdV6kh+IREL1r/OOoZ8macCsBsrv0SKpt8/mpIRCpy9qO 3ypfefogjL7s/GLHwOVw3tVpShzpRzok1fITrUFKg1BdtX0V2NVUfVknAqzEG0ICmg 8/4tvsjHlPM8wWhombI89Ub3KLCeZl/o2zDs3IDaRM+uhs8rVQjuAy/vTTjhPQ8KBC JISYLw7CmUn4eVR1B15UfjOFTy3sIFIT804DMLB4kj+P4hM8rGri2r8IRm7Sv/OjMl a9ELIKtFN++RQ== In-Reply-To: <87y2fsg5ve.fsf@posteo.net> 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:127916 Archived-At: >> To me what you propose looks pretty close to using customize to set a >> foobar-set-global-binding variable that would be used in a call to >> global-set-key. > > Yes, that could also be done, the precise code that is generated is an > open question > But that would be forbidden by the guideline "Don't define 'C-c LETTER' as a key in Lisp programs", wouldn't it? (defcustom foobar-global-key "" "Foobar global key in C-c") ... (if (length foobar-global-key) (global-set-key (kbd (concat "C-c " foobar-global-key) 'foobar-foo-command))) If that's allowed, then why not this? (defcustom foobar-global-key "z" "Foobar global key in C-c") ... (if (length foobar-global-key) (global-set-key (kbd (concat "C-c " foobar-global-key) 'foobar-foo-command))) This is not very different from the first one, and does what the guideline forbids, but it could be argued that it does not because it does so only conditionally... > > But even considering that, what do you think that the long-term issue > is? Do you think that with time, people will be using more and more > packages that need global keys? > I do not think, I see. Just have a look at the starter kits, or at the init files of those who make them public. You'll see that there are many packages that need global keys.