[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Invoking Magit
From: |
Stefan Monnier |
Subject: |
Re: Invoking Magit |
Date: |
Tue, 02 Feb 2021 14:59:26 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> * `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
RE: [External] : Concern about new binding., Drew Adams, 2021/02/02
Re: Concern about new binding., Karl Fogel, 2021/02/02
Re: Concern about new binding., Thibaut Verron, 2021/02/02
Re: Concern about new binding., Karl Fogel, 2021/02/02
Re: Concern about new binding., Thibaut Verron, 2021/02/02
Re: Concern about new binding., Basil L. Contovounesios, 2021/02/02
Re: Concern about new binding., Richard Stallman, 2021/02/05
Re: Concern about new binding., Gregory Heytings, 2021/02/02