From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.devel Subject: Re: Concern about new binding. Date: Fri, 5 Feb 2021 11:51:36 +0100 Message-ID: References: <87zh0mmr54.fsf@gmail.com> <87y2g5smya.fsf@gmail.com> <4FF55FBF-573D-4A70-B3FC-682CA25B7ECB@gnu.org> <83lfc53whk.fsf@gnu.org> <20210203180142.seu6o3i6u7jhkyrh@Ergus> <83eehx3to5.fsf@gnu.org> <20210203221628.xgvvxjvh56gyswba@Ergus> <20210204070033.pm4ido4hq7a6twif@Ergus> <83sg6brhyg.fsf@gnu.org> <5588fb25805d486be704@heytings.org> <878s82esdi.fsf@fastmail.fm> Reply-To: thibaut.verron@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25909"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Joost Kremers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 05 11:52:46 2021 Return-path: Envelope-to: ged-emacs-devel@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 1l7yjG-0006bE-0W for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Feb 2021 11:52:46 +0100 Original-Received: from localhost ([::1]:33644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7yjE-0003ph-OC for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Feb 2021 05:52:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7yiD-0003LR-IO for emacs-devel@gnu.org; Fri, 05 Feb 2021 05:51:43 -0500 Original-Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]:40869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7yiB-0007VI-24 for emacs-devel@gnu.org; Fri, 05 Feb 2021 05:51:41 -0500 Original-Received: by mail-yb1-xb30.google.com with SMTP id i71so6302029ybg.7 for ; Fri, 05 Feb 2021 02:51:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hgsqMi3oTdoXZQ+SXe3ELhG2KXOfbXTGEQ4LJsJmaPE=; b=R2Z4Kh6m+lsokpE3wZ+DhqrWaVu0q9KfJKsW4pEnuL8jkedwQ8VH/e0dugweRiIx96 UWp5CBMAOGshrcTlsi85Bhmguez+R5OLknwTr/DlBCJWxMitNE/awa1WaM1MsKwK/yrk PST0ZRpiSdBrT7EoAjoQCRig+8ns0Lg5ysdgpv8llog4KQ1ZtfmnjlPNI/uepp2vyapJ HBWdyqU0OdgPUkal20eK+fvGjutY+m1lckREZkqPZKW+3Te+63dK0wnRdE6oW7k0fAgI DuX2pX3kpcGDELCfFen+iLO5DrokLHdbIJS64VUmicvWmHe7qybHP3EBUU8PfXhjlBU7 tglA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=hgsqMi3oTdoXZQ+SXe3ELhG2KXOfbXTGEQ4LJsJmaPE=; b=VC+bQEFrJCUkoW2SMpyGbt2YGVMZf2VcZqkL39GJaJTy0b3mNkbv/qDTNGBpCe3vi5 BzHGbNSQg76BGiFD62/KhnOyX+/rMzIBSzdXyW0k029sF/SFZQtc+dtg/V0qgpiJ0vXt KOQCyYo1ptx2WkcQGgjeB5h0WOd62sh5j3+emonOYCr7VOqSfPf2yd7ZAXvs2rhIrKKz yMc8LJM+MBGRF47GfuRNGHkmD6ymdmwUaADBWhhYM6EU9obrLBYgBWcjsG+Zf98vtQ3O 6PYdNduqZaGSyPb4cvseV99XeNSwt0CJuUHzdrwynEvTCr79wuARTsr0q1gLYHCPEWQz f70g== X-Gm-Message-State: AOAM530Q35CoPRqpqiCmnELvLvP+lcmbWf6uXi0yO6tIsH3W+/IBJ02C mKupTsGekjY+zzpd5qSKEvLQYL0z6qP8Q1pHo/I= X-Google-Smtp-Source: ABdhPJxIjGQHqH/GWR6Umq6L2M4SaE1qbkE4kPPo6kBgvTckc2WISOvFdf3VbHT3SSUurwWg7JBFy+XAJfgZLxsYXiQ= X-Received: by 2002:a25:48c8:: with SMTP id v191mr5102163yba.311.1612522297300; Fri, 05 Feb 2021 02:51:37 -0800 (PST) Original-Received: by 2002:a05:7110:6187:b029:31:9798:b166 with HTTP; Fri, 5 Feb 2021 02:51:36 -0800 (PST) In-Reply-To: <878s82esdi.fsf@fastmail.fm> Received-SPF: pass client-ip=2607:f8b0:4864:20::b30; envelope-from=thibaut.verron@gmail.com; helo=mail-yb1-xb30.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263969 Archived-At: 2021-02-05 10:38 UTC+01:00, Joost Kremers : > > On Fri, Feb 05 2021, Gregory Heytings wrote: >> It seems to me that the root problem of this thread, and similar ones in >> the past months, is the lack of a convention for external packages in >> `(elisp) Key Binding Conventions'. There is a convention for users, there >> >> are conventions for major and minor modes, but there is no convention for >> >> external packages such as Magit, Drew's packages, and so forth. >> Consequently, the only solution for such packages is to use the currently >> >> empty slots, > > Actually, there is another option, which AFAIK has been the unspoken "rule" > for > such cases: leave the binding up to the user. +1 (as long as we are speaking both about emacs and packages) But there seems to be technical reasons for a package wanting to set its binding. > What we're talking about here are basically applications that run inside > Emacs. > They have an entry point, i.e., a function that the user can run to start > the > application (some may have multiple entry points, but that doesn't change > the > argument), which users can bind as they see fit. That's what the `C-c > ` > keys are for. I mean, even applications that come with Emacs (Gnus, Rmail, > Ediff > come to mind), don't have standard key bindings. How do you define "applications"? Magit is very similar in its intent to vc-mode, which does have a global binding. A cursory look through global-map shows global bindings for functions from abbrev, dabbrev, calc, eww, xref, 2C, vc. Are those applications? > Perhaps a better way to update the documented key binding conventions is to > add > the rule that packages should generally not create global key bindings. I personally find it useful when packages recommend key bindings. It helps me understand what the package is for and how it can be used. And if sufficiently many users follow the recommendation, I don't know if the key should be considered free. The only practical difference for the issue at hand is that Emacs rebinding a recommended binding will not break configurations, instead the new binding will be shadowed by the users' init files. > Reserving keys for external packages won't solve the fundamental problem > here: > two external packages may still decide to use the same key bindings, > causing > similar conflicts for users that install both. As far as I know there has never been any serious conflict of this kind. Examples of popular packages which come to mind with global keys are: magit recommending/setting "C-x g" expand-region recommending "C-," ace-jump recommending "C-;" multi-cursors recommending the keys around "C-." (with the exception of "C-,", which might be explained by the fact that it's the same author as expand-region) org-roam hijacking "C-x n" Basically, it's been first-come-first-served in the community for a while, and small packages not complaining when their binding was taken by someone who became bigger. It seems to work, and it doesn't seem to make a difference whether a key is recommended or bound for that.