From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: Invoking Magit Date: Tue, 02 Feb 2021 12:29:49 -0600 Message-ID: <87r1lynx0i.fsf@red-bean.com> References: <20210202134950.vybbpf3iewbymfjo.ref@Ergus> <20210202134950.vybbpf3iewbymfjo@Ergus> <878s86tnv6.fsf@red-bean.com> Reply-To: Karl Fogel Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21625"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Ergus , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 02 19:32:44 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 1l70Tj-0005TD-EA for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Feb 2021 19:32:43 +0100 Original-Received: from localhost ([::1]:42484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70Ti-00042d-GG for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Feb 2021 13:32:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l70R0-00023i-6U for emacs-devel@gnu.org; Tue, 02 Feb 2021 13:29:54 -0500 Original-Received: from sanpietro.red-bean.com ([45.79.25.59]:33326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l70Qy-0005a9-02 for emacs-devel@gnu.org; Tue, 02 Feb 2021 13:29:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=red-bean.com; s=202005newsp; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:Reply-To:References:Subject:Cc:To:From:Sender: Content-Transfer-Encoding:Content-ID:Content-Description; bh=DBNqRNaZ2Eg1/euF7l73VOBycXsS1psaQJZ+LC4nI94=; t=1612290591; x=1613500191; b=F7Hv1lNmCEZMDyOmN6C42cJY/mNxY6scjUF78fvtHoUz44sqswQ5Z2qFOQnvYi0XLX9OB3rQBd gAYaZmchH2wBRiLe1vNEJl1mDRU09569ChMfHHaHgV7w/hHuDF9v+U5+fmjOgjNH/7Nqc0pzZeRJT 3GySIIDVeCF/VMiE1CPKAkTqLIuivBtC0S7r8Szl98RNSE5a0bLQEnGVENu26I0L/ZvMcgyHgBpkf AlNsxj3BfEsVSdoy0xJuYOhD7fSv5BeEoLUeef8XtQsAklh58HI70d/qo7tFbDAceDQD2p0UJKpCl Rfz+2yQ4IgDHzolLfct+ycVJaQCL3uqaHN4hw==; Original-Received: from 99-112-125-163.lightspeed.cicril.sbcglobal.net ([99.112.125.163]:37520 helo=floss) by sanpietro.red-bean.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l70Qw-0000Fi-80; Tue, 02 Feb 2021 18:29:50 +0000 In-Reply-To: (Stefan Monnier's message of "Tue, 02 Feb 2021 12:33:11 -0500") Received-SPF: pass client-ip=45.79.25.59; envelope-from=kfogel@red-bean.com; helo=sanpietro.red-bean.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, SPF_HELO_PASS=-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:263735 Archived-At: On 02 Feb 2021, Stefan Monnier wrote: >> Magit should instead suggest `C-c g' as an entry point for >> `magit-status', though a user can bind it however they want of >> course. I doubt there are any Magit users who would be daunted >> by the need to set up a keybinding for Magit's entry point. > I think it'd make more sense to use a keybinding under the `C-x >v` prefix. Well, sure, if Emacs wants to deliberately give some keybinding space to a popular 3rd-party package like Magit, that's fine (personally I think I'd be in favor in this case, given Magit's popularity). But Emacs makes that decision, not Magit. In other words, the crucial question is: who exactly is the subject of the verb "use" in your last sentence above? Is it Emacs, or the user? Emacs already has conventions [1] about keyspaces reserved for users versus those reserved for packages (well, modes, and this entry point to Magit is not exactly a mode). According to those conventions: * `C-c LETTER' is for users to do with as they like -- neither Emacs nor third-party packages should ever bind anything here. * `C-c C-LETTER' and `C-c DIGIT' and `C-c {}<>:;' are all reserved for major modes. In this case it doesn't matter whether the mode ships with GNU Emacs or is a 3rd-party mode, since only one major mode is active at a given time. If a user has chosen the mode, then they accept that part of the keybinding space (sure, they might customize it further, but that's up to them -- they understand that they may overwrite default bindings of the mode when they do that). * `C-c OTHER_STUFF' is for minor modes; I'll skip the details here. So Emacs is free to reserve space under `C-x v' for Magit entry points if it wants to. That would be an unusual decision, but there's no reason not to consider it. However, when you wrote this... >I think it'd make more sense to use a keybinding under the `C-x >v` prefix. ...I couldn't tell whether you meant it would make more sense for *users* to do that (i.e., by their choice), or for *Emacs* to do that (i.e., we reserve that slot for Magit). IMHO we shouldn't recommend the former, because we already recommend to users that `C-c LETTER' is where they should do such custom bindings, and we should encourage use of that convention. But if you meant the latter, then that's a different discussion and one worth having. >Another option would be to hijack `find-file` like PCL-CVS did, >i.e. make it so `C-x C-f .../.git` opens up Magit. (Oh my gosh, it's been *years* since I used PCL-CVS... you are bringing back memories... :-) ) I hope we wouldn't do that here. There are many reasons why someone might open up a .git directory in Dired Mode (I do it all the time) by doing `C-x C-f .../.git'. Best regards, -Karl [1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html