From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Invoking Magit Date: Tue, 02 Feb 2021 14:59:26 -0500 Message-ID: References: <20210202134950.vybbpf3iewbymfjo.ref@Ergus> <20210202134950.vybbpf3iewbymfjo@Ergus> <878s86tnv6.fsf@red-bean.com> <87r1lynx0i.fsf@red-bean.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30498"; 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: Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 02 21:00:17 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 1l71qT-0007pt-Dl for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Feb 2021 21:00:17 +0100 Original-Received: from localhost ([::1]:43598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l71qS-0004Ta-FQ for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Feb 2021 15:00:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l71pm-0003yz-R5 for emacs-devel@gnu.org; Tue, 02 Feb 2021 14:59:35 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42980) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l71pj-0005Bn-Or for emacs-devel@gnu.org; Tue, 02 Feb 2021 14:59:33 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2410E80C19; Tue, 2 Feb 2021 14:59:30 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 730E08070D; Tue, 2 Feb 2021 14:59:28 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1612295968; bh=qa5Y+CFuwOqPqu3rDQUqxPqvfufYoT9QUvErosYGDkI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=c6YGIY9MVL1A4/GtQqCffWWlC+y6Vnb23NFKJenrTSBboNVaR5a9xemxSGpxikvDf Tzp72xapKTAgURlFn4RsF+jWrDIMd4zL7jEqh7dlzRmy+S6RyLSQxRS/RbTBfWx4dH wiHcQ/VTPxw/9nKo17xeEoMVcc9r9+cGaHN5HdyfxDape2+rYG6v+cSlE2Zsn7HStj 0dpN9MpvM3jExJVdSWV79cHe+g9EhKHbNRE+Wd/oLazsWJyRqXnWgYTKzZNQ0gxxvJ 7qR1dAUDkZnEB1drr+WvidUEkohz7tEGq+a6UQCnINfPntczmaFQLm5vcbWDsz77bA fDgnAUrPCh+jw== Original-Received: from alfajor (76-10-182-85.dsl.teksavvy.com [76.10.182.85]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 39942120672; Tue, 2 Feb 2021 14:59:28 -0500 (EST) In-Reply-To: <87r1lynx0i.fsf@red-bean.com> (Karl Fogel's message of "Tue, 02 Feb 2021 12:29:49 -0600") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:263748 Archived-At: > * `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. Those are for use *within* the major/minor mode. The keybinding under discussion is a global one to make it easier to enter Magit. It doesn't have much choice but to collide with something :-( But sometimes the better answer is not to use a keybinding at all. >> 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). Neither/both. I meant for Magit to do that. >> 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'. I've never been super happy with that trick in PCL-CVS either, but in practice it worked great, IME. Of course, you sometimes do want to look at the CVS/.git/younameit dir or file, but that's what the C-u prefix was for. I do feel that Emacs would gain by developing some way to specify interactively *how* a given file should be viewed. In most cases there's only one reasonable choice, admittedly, but I find more and more cases where this is not so (e.g. ps-as-image vs ps-as-text, djvu-with-djvu-mode vs djvu-with-doc-view, odt-with-doc-view vs odt-as-zip-archive, html-as-text vs html-via-shr, ...). Stefan