LWN: Comments on "Emacs and Magit" https://lwn.net/Articles/727550/ This is a special feed containing comments posted to the individual LWN article titled "Emacs and Magit". en-us Wed, 17 Sep 2025 11:43:19 +0000 Wed, 17 Sep 2025 11:43:19 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Emacs and Magit https://lwn.net/Articles/783099/ https://lwn.net/Articles/783099/ bb010g <div class="FormattedComment"> I'd also highly recommend checking out gina.vim. <a rel="nofollow" href="https://github.com/lambdalisue/gina.vim">https://github.com/lambdalisue/gina.vim</a><br> </div> Fri, 15 Mar 2019 02:00:54 +0000 Emacs and Magit https://lwn.net/Articles/747065/ https://lwn.net/Articles/747065/ ceplm <div class="FormattedComment"> Of course, vim users should use fugitive, a Git wrapper so awesome, it should be illegal :) <a href="https://github.com/tpope/vim-fugitive">https://github.com/tpope/vim-fugitive</a><br> </div> Sun, 11 Feb 2018 22:09:15 +0000 Emacs and Magit https://lwn.net/Articles/729190/ https://lwn.net/Articles/729190/ mgalgs <div class="FormattedComment"> <font class="QuotedText">&gt; There are some complaints to be made about the system, even if the highly modal interface sits well. If a Git command puts out a strange error message (not an unusual occurrence with Git), Magit tends to throw up its hands and say "go look in that other buffer for the error message".</font><br> <p> Worth noting that there's a keybinding (`$' by default) to open the error buffer. I prefer having my error messages in an actual buffer anyways, but it would be nice to temporarily flash the error message in the minibuffer as well.<br> <p> <font class="QuotedText">&gt; Some operations can take a long time — measured in minutes for some logging commands your editor tried — and there is no visual indication that Magit is working or what progress it is making.</font><br> <p> Yes, Magit is really slow at logging in the kernel repo... I wrote submitted a patch a while back [1] that made it super fast but had some other graph-clobbering side-effects that the maintainer didn't like, and the patch died. There was also some talk about fixing this issue (the slowness of --graph) in git itself [2, 3] but nothing ever came of that either. I ended up relying more on status "sections", only going to the log buffer when I really really needed to because it could be so slow, a trade-off I was happy to make given the other benefits of Magit.<br> <p> [1] <a href="https://github.com/magit/magit/pull/1990">https://github.com/magit/magit/pull/1990</a><br> [2] <a href="http://www.spinics.net/lists/git/msg232226.html">http://www.spinics.net/lists/git/msg232226.html</a><br> [3] <a href="http://www.spinics.net/lists/git/msg232230.html">http://www.spinics.net/lists/git/msg232230.html</a><br> </div> Sat, 29 Jul 2017 03:51:30 +0000 Emacs and Magit https://lwn.net/Articles/728579/ https://lwn.net/Articles/728579/ debacle <div class="FormattedComment"> On Debian it is just: &lt;tt&gt;$ sudo apt install elpa-magit&lt;/tt&gt;.<br> </div> Sat, 22 Jul 2017 20:52:28 +0000 Emacs and Magit https://lwn.net/Articles/728558/ https://lwn.net/Articles/728558/ sebboh <div class="FormattedComment"> Ack, I mean: ELPA is the *GNU* repository for emacs packages.<br> </div> Fri, 21 Jul 2017 21:47:48 +0000 Emacs and Magit https://lwn.net/Articles/728557/ https://lwn.net/Articles/728557/ sebboh <div class="FormattedComment"> <font class="QuotedText">&gt; MELPA should not be allowed for GNU Emacs unless [...]</font><br> <p> I think you mean ELPA.<br> <p> ELPA is the FSF repository for emacs packages.<br> <p> MELPA is third party. They should (and are) allowed to host whatever they want.<br> </div> Fri, 21 Jul 2017 21:45:08 +0000 Emacs and Magit https://lwn.net/Articles/728532/ https://lwn.net/Articles/728532/ tvaughan <div class="FormattedComment"> This. I'm a 20+ year user of Emacs and I absolutely love magit. The two are totally indispensable to the work I do and yet I see no need to bundle magit with Emacs. I've also done a sizable amount of Python development and having python.el bundled with Emacs has been problematic, especially when trying out something else, like elpy or anaconda-mode. I also do a lot of Clojure development and it has never occurred to me that cider should be bundled with Emacs. But yes, if you aren't using Emacs magit could be reason enough to check it out and you're definitely missing out if you're using Emacs without magit.<br> </div> Fri, 21 Jul 2017 14:57:10 +0000 Emacs and Magit https://lwn.net/Articles/728471/ https://lwn.net/Articles/728471/ jreybert <p> Actually, there is! It is called <a rel="nofollow" href="https://github.com/jreybert/vimagit">vimagit</a></p> <p> For the moment, it is mainly focused on the stage/commit feature, with a lot of actions possible (e.g. stage by file/hunk/line/word). And it is very stable. </p> <p> It does not as much as magit because: <li>fugitive does an awesome job for Gblame, Gdiff, Gread...</li> <li>There are features like interactive rebase, push, stash (by file/hunk/line/word) I'd like to add, when I can find some time :)</li> </p> Thu, 20 Jul 2017 21:46:38 +0000 Emacs and Magit https://lwn.net/Articles/728397/ https://lwn.net/Articles/728397/ njs <div class="FormattedComment"> If you use tramp-mode to open remote files, then emacs will maintain an ssh connection to the remote server and use it to run git commands there. This may or may not provide a better experience on net, but it might be worth checking out.<br> </div> Thu, 20 Jul 2017 10:27:31 +0000 Emacs and Magit https://lwn.net/Articles/727981/ https://lwn.net/Articles/727981/ giraffedata Sorry for being vague. <p> The idea of copyleft is that you give someone code in exchange for him giving code to the world. Though he might have wanted to develop an entire software package and keep it to himself, he is enticed by the offer of a bunch of otherwise free-beer code to use that code as a base, add his own, and give his part to the world as free software. <p> That copyleft works a lot better if the copyright owner actually enforces it, and doesn't change his mind about using it for that purpose. <p> The FSF is more likely than pretty much anyone else to enforce copyright on its free software. <p> And many people trust that the FSF will always use its copyright this way, whereas some other random group of developers might decide later to license the code without the contribute-back condition. <p> So that's why some people might think having something like Magit part of Emacs (ergo owned and distributed by FSF) would be better than having it distributed by someone else. Fri, 14 Jul 2017 22:37:41 +0000 Emacs and Magit https://lwn.net/Articles/727979/ https://lwn.net/Articles/727979/ sfeam I totally do not follow your logic here. Why would the co-opting of already free software by requiring copyright assignment to FSF "entice other people to distribute free software"? If anything it would seem like a cautionary example in the other direction. Fri, 14 Jul 2017 22:17:24 +0000 Emacs and Magit https://lwn.net/Articles/727969/ https://lwn.net/Articles/727969/ giraffedata You almost, but not quite, said another reason for preferring that something be bundled in Emacs, copyright FSF, to having something distributed separately with copyright owned by others: The code has more power that way to entice other people to distribute free software. <p> That is as much a goal for FSF as is providing useful software itself. Fri, 14 Jul 2017 20:30:24 +0000 magit installation https://lwn.net/Articles/727903/ https://lwn.net/Articles/727903/ spwhitton <div class="FormattedComment"> <font class="QuotedText">&gt; available from the MELPA package archive or directly from GitHub</font><br> <p> It's also available in Debian and derivatives: apt-get install elpa-magit<br> </div> Fri, 14 Jul 2017 14:59:15 +0000 Emacs and Magit https://lwn.net/Articles/727751/ https://lwn.net/Articles/727751/ UnwashedMeme <div class="FormattedComment"> When I use git on the cmdline I always `git add -p` so that I can review hunks being added to ensure what's going in is what I think it is. Frequently I see some tweak, stylistic fixup, malformed-whitespace or something that would be good to fix. I could pop back and forth between emacs and shell, or if I'm in magit i can tap enter on it takes me to the file with my cursor at that point. Aside from that magit also gives better hunk to hunk navigation and manipulation--like stage only selection from hunk.<br> <p> I highly recommend you give it a try. I didn't think I had any problems with the git cmdline before, but magit does offer a slick experience above and beyond that.<br> </div> Thu, 13 Jul 2017 22:52:27 +0000 Emacs and Magit https://lwn.net/Articles/727854/ https://lwn.net/Articles/727854/ bfields I seem to recall git gaining the ability to stat files in parallel at some point, and that making git status over NFS better, but my memory could be wrong. Thu, 13 Jul 2017 21:08:16 +0000 Emacs and Magit https://lwn.net/Articles/727818/ https://lwn.net/Articles/727818/ smitty_one_each <div class="FormattedComment"> <a href="http://spacemacs.org/">http://spacemacs.org/</a> could be worth your attention.<br> </div> Thu, 13 Jul 2017 15:26:47 +0000 Emacs and Magit https://lwn.net/Articles/727762/ https://lwn.net/Articles/727762/ knuto <div class="FormattedComment"> An issue with git is that it is very file access intensive. I often find myself having a local<br> emacs while running towards a remote file server. The first I have to disable is the default git support in emacs, otherwise the latency to the remote file system becomes prohibitive. As much as I'd like to have git integration in emacs or use another gui tool for complex rebases etc, it simply does not work well enough with that type of setup. <br> <p> Try running 'git status' on a clean kernel repository on a remote file system with eg.70 ms latency (I gave up after some 30 mins)<br> <p> On the other hand just saving files now and then even works acceptable with &gt; 200 ms latency as long as <br> the bandwidth is good enough.<br> </div> Thu, 13 Jul 2017 06:07:54 +0000 Emacs and Magit https://lwn.net/Articles/727756/ https://lwn.net/Articles/727756/ pj <div class="FormattedComment"> Does the FSF publish numbers on how often it's actually tried to enforce copyright for any given package?<br> </div> Thu, 13 Jul 2017 03:55:24 +0000 Emacs and Magit https://lwn.net/Articles/727752/ https://lwn.net/Articles/727752/ Abrahams <div class="FormattedComment"> It simplifies copyright enforcement.<br> </div> Thu, 13 Jul 2017 02:23:34 +0000 Emacs and Magit https://lwn.net/Articles/727721/ https://lwn.net/Articles/727721/ madscientist <div class="FormattedComment"> <font class="QuotedText">&gt; Emacs detects that you're in a git working directory and does a bit of VCS stuff because of that, and offers git-specific features if you interact with the VCS stuff</font><br> <p> Not saying you're wrong about discoverability in general, but Magit works a bit differently than standard VC mode in Emacs: it uses one separate buffer to control the entire repository. That buffer displays the status of the repo, and it's where you add files, see changes to files, create commits, push, pull, merge, etc.: you don't do those things inside the individual file buffers. That is, like Git itself Magit is repository-based not file-based, which makes it very intuitive to use.<br> <p> You generally bind a key to the single magit-status command (I bound it to C-c g) and that's almost the only Emacs command you use: other commands are modal commands from within the Magit status buffer (e.g., push "s" to stage (git add) a file).<br> <p> There are a few per-file commands such as magit-blame, but 99% of the time you'll be interacting with the separate Magit buffer, rather than invoking commands in individual file buffers. So, it's not so important that there be per-buffer Git commands registered.<br> </div> Wed, 12 Jul 2017 21:29:52 +0000 Emacs and Magit https://lwn.net/Articles/727735/ https://lwn.net/Articles/727735/ dottedmag <div class="FormattedComment"> GNU began as a project to replace proprietary software with free one, and now lives on as a project to replace free software with free software.<br> <p> </div> Wed, 12 Jul 2017 21:06:25 +0000 Emacs and Magit https://lwn.net/Articles/727732/ https://lwn.net/Articles/727732/ clemensg <div class="FormattedComment"> Magit is licensed under GPLv3, which should be more than sufficient to include it. Why on earth does the FSF/rms need to hold the copyright?<br> </div> Wed, 12 Jul 2017 21:05:18 +0000 Emacs and Magit https://lwn.net/Articles/727734/ https://lwn.net/Articles/727734/ dottedmag <div class="FormattedComment"> The probability that copyright enforcement, cited as a primary reason for copyright assignment, will be necessary for GNU Emacs is, to put it mildly, slim.<br> <p> One can argue that other GNU packages might need it, but, seriously, GNU Emacs copyright enforcement in 2017+?<br> <p> </div> Wed, 12 Jul 2017 21:05:17 +0000 Emacs and Magit https://lwn.net/Articles/727699/ https://lwn.net/Articles/727699/ pizza <div class="FormattedComment"> <font class="QuotedText">&gt; GNU Emacs helping users to use non-FSF software is wrong.</font><br> <p> What makes non-FSF software "wrong"? <br> <p> Now, if you'd said "Non-Free" software, I might agree with you. but there is plenty of software the FSF promotes use of that they do not own or control -- The Linux kernel being a notable example. I should also point out that assigning copyrights to the FSF is explicitly *not* a requirement to a project being under the "GNU" umbrella.<br> </div> Wed, 12 Jul 2017 19:06:53 +0000 Why? https://lwn.net/Articles/727700/ https://lwn.net/Articles/727700/ corbet I still don't get <i>why</i> it is wrong to help users run non-FSF software. It is still free software, after all... Wed, 12 Jul 2017 19:03:07 +0000 Emacs and Magit https://lwn.net/Articles/727695/ https://lwn.net/Articles/727695/ dbaker <div class="FormattedComment"> vim-fugitive (<a href="https://github.com/tpope/vim-fugitive">https://github.com/tpope/vim-fugitive</a>) is the closest I've found, but it doesn't have nearly the depth of feature as magit, but with fugitive + tig I haven't found myself wanting for more features.<br> </div> Wed, 12 Jul 2017 18:54:12 +0000 Emacs and Magit https://lwn.net/Articles/727694/ https://lwn.net/Articles/727694/ cyperpunks <div class="FormattedComment"> MELPA should not be allowed for GNU Emacs unless all authors of packages there have done the paperwork and assigned their copyrights for the work to the Free Software Foundation. <br> <p> GNU Emacs helping users to use non-FSF software is wrong.<br> <br> </div> Wed, 12 Jul 2017 18:44:57 +0000 Emacs and Magit https://lwn.net/Articles/727687/ https://lwn.net/Articles/727687/ iabervon <div class="FormattedComment"> It seems to me that the real reason to want to include it is for discoverability. Emacs detects that you're in a git working directory and does a bit of VCS stuff because of that, and offers git-specific features if you interact with the VCS stuff, and it would be nice if this naturally led users to all the functionality that magit has.<br> <p> I think the ideal thing would be for Emacs to know about magit as an external package with certain commands and applicability in certain situations, but only actually include a stub that will get it for you if you try to use it (if you say yes when asked if you want to install the external package). Similarly, the Emacs manual could tell you about magit and point you at the magit manual without actually including the magit manual.<br> </div> Wed, 12 Jul 2017 18:10:49 +0000 Emacs and Magit https://lwn.net/Articles/727688/ https://lwn.net/Articles/727688/ josh <div class="FormattedComment"> fugitive (<a href="https://github.com/tpope/vim-fugitive">https://github.com/tpope/vim-fugitive</a>) is exceptional; I highly recommend it.<br> <p> I use :Gdiff, :Gblame, :Gcommit, and many other commands regularly. I love that I can do the equivalent of "git add -p" by using vimdiff commands, or browse backwards through blame and jump to commits.<br> </div> Wed, 12 Jul 2017 17:56:10 +0000 Emacs and Magit https://lwn.net/Articles/727679/ https://lwn.net/Articles/727679/ walkerlala <div class="FormattedComment"> I really hope that there is something similar out there for vim.<br> </div> Wed, 12 Jul 2017 17:09:07 +0000 Winning strategies https://lwn.net/Articles/727678/ https://lwn.net/Articles/727678/ corbet That's part of it, but the part about going into competition with an established and successful project because you feel the need to own the copyrights is even less of a winning strategy. Wed, 12 Jul 2017 16:53:57 +0000 Emacs and Magit https://lwn.net/Articles/727676/ https://lwn.net/Articles/727676/ ikm <div class="FormattedComment"> I guess what the article tried to point out is that requiring paperwork to incorporate something to Emacs is "not a winning strategy" for the project, without implying that installing that one specific package in question separately is hard.<br> </div> Wed, 12 Jul 2017 16:46:34 +0000 Emacs and Magit https://lwn.net/Articles/727666/ https://lwn.net/Articles/727666/ NAR <div class="FormattedComment"> This seems to be similar problem to the one with applications and bundled libraries. The user might want to use different (combination) of libraries or extensions than the distributor expects (and supports). What if there's a (big scary) security hole in magit?<br> </div> Wed, 12 Jul 2017 15:44:35 +0000 Emacs and Magit https://lwn.net/Articles/727612/ https://lwn.net/Articles/727612/ rahulsundaram <div class="FormattedComment"> Not sure how that makes sense? They created the GPL and have explained their rationale in detail for copyright assignment<br> <p> <a href="https://www.gnu.org/licenses/why-assign.en.html">https://www.gnu.org/licenses/why-assign.en.html</a><br> <p> Agree or disagree, fear isn't a factor here<br> </div> Wed, 12 Jul 2017 14:27:20 +0000 Emacs and Magit https://lwn.net/Articles/727609/ https://lwn.net/Articles/727609/ amarao <div class="FormattedComment"> It looks like FSF is afraid of GPL license and want to own copyright instead.<br> </div> Wed, 12 Jul 2017 14:02:14 +0000 Emacs and Magit https://lwn.net/Articles/727605/ https://lwn.net/Articles/727605/ drag <div class="FormattedComment"> <font class="QuotedText">&gt; It makes it easy to get python support for a language</font><br> <p> I guess I am not fully awake yet. I meant to say 'It makes it easy to get Emacs support for a language'<br> </div> Wed, 12 Jul 2017 13:06:41 +0000 Emacs and Magit https://lwn.net/Articles/727602/ https://lwn.net/Articles/727602/ drag <div class="FormattedComment"> <font class="QuotedText">&gt; providing some kind of meta-bundle or tagging facilities where users could select "Git user", "C++ Programmer", "Python Programmer", etc.</font><br> <p> Spacemacs does this with their 'Layers' Feature. <br> <p> <a href="http://spacemacs.org/layers/LAYERS.html">http://spacemacs.org/layers/LAYERS.html</a><br> <p> It provides a collection of packages and configs that are community-sourced. It makes it easy to get python support for a language that you are not familiar with, but still allow you to apply your own packages and configurations on top of it if you like. This really cuts down the time it takes to setup things like python support. <br> <p> Spacemacs is based originally around Evil mode, but there isn't any reason why you can't use it in Holy mode. <br> <p> When it comes to updates/copying the config around the important thing is your .spacemacs config. So when you setup a new workstation, you copy over the .spacemacs config, install emacs, pull down spacemacs git repo and then it will take care of the work of pulling down the packages from epel, melpa, etc. The spacemacs default page also has links for updating spacemacs and packages as well as diffing your .spacemacs file with the latest version. <br> </div> Wed, 12 Jul 2017 13:04:10 +0000 Emacs and Magit https://lwn.net/Articles/727604/ https://lwn.net/Articles/727604/ epa <div class="FormattedComment"> I think it does make a difference if the package is included and maintained as part of Emacs. It will be covered in the Emacs manual, and kept up to date with future Emacs changes. More importantly, by being part of standard Emacs it becomes somehow perceived as standard, and this in itself encourages people to use it. This is a social rather than technical consideration.<br> <p> But don't forget RMS's underlying reason: in order to enforce the GPL on GNU software it helps to be the sole copyright holder. That also helps if you want to relicense it later. This is an ultra-cautious approach and more than is necessary for most users or authors of free software, but I can see why the FSF does it.<br> </div> Wed, 12 Jul 2017 12:56:54 +0000 Emacs and Magit https://lwn.net/Articles/727603/ https://lwn.net/Articles/727603/ kushal <div class="FormattedComment"> <font class="QuotedText">&gt;I'm a lifelong Vim user, but I hope they resolve this without fuss. Everyone wins; Emacs gets to bundle it, the users can obtain it with less hassle, the authors gain the FSF's clout to enforce their license if it's ever needed, and the rest of the world maybe gets to see a few less people using CVS. </font><br> <p> 16 years Vim user this side, converted to Emacs and magit just over a week. Finding the whole thing amazing. <a href="https://kushaldas.in/posts/switching-to-emacs-land.html">https://kushaldas.in/posts/switching-to-emacs-land.html</a> is what I experienced in the first one week. <br> </div> Wed, 12 Jul 2017 12:53:24 +0000 Emacs and Magit https://lwn.net/Articles/727600/ https://lwn.net/Articles/727600/ madscientist <div class="FormattedComment"> Definitely agree. In fact like nix I would prefer more packages be unbundled! For example as a C++ programmer primarily these days, I find the version of cc-mode that comes with Emacs woefully outdated.<br> <p> Whenever I restart Emacs (once every few weeks, when I have to reboot due to a new kernel update) I take a few minutes to run M-x package-list-packages and update to the latest versions of the external packages I use such as magit, irony, etc. I also pull the upstream version of cc-mode directly (using mercurial) to get the latest updates.<br> <p> I've long wished that cc-mode was available via ELPA/MELPA rather than (or at least in addition to) being bundled with Emacs so that it would be simpler to get newer versions. I really have zero interest in tying a critical (and hotly developed!) tool like Magit into the Emacs release cycle.<br> <p> I understand wanting to ship some version of Magit with Emacs, so that people have a great tool available "out of the box". But I agree with Stefan, this is all on Emacs to figure out.<br> <p> Maybe instead of doing all that work to bundle or rewrite Magit, they could instead work on beefing up the packaging facilities even more: providing some kind of meta-bundle or tagging facilities where users could select "Git user", "C++ Programmer", "Python Programmer", etc. and have a coherent set of packages supporting those workflows show up as recommended, then tie that into the Emacs intro pages somehow so it's easy and obvious for new users to get started.<br> </div> Wed, 12 Jul 2017 12:22:50 +0000