2 ms·
Ibuffer-git: See your files' git status in Ibuffer
There was an HN article a few days ago complaining about this not existing. Now it exists.
- st3fan 17y agoThis is very nice. Does anyone know of a similar emacs extension for mercurial?
- jrockway 17y agoShould be a matter of changing 2 lines of code; one to run the status command, one to parse the output.
- jrockway 17y agoAn article posted here a few days ago suggested that it would be a good idea to integrate things like open files, project, version control status, etc., so here is one more piece of that puzzle. (For project support in emacs, try eproject; http://github.com/jrockway/eproject http://github.com/jrockway/eproject)
- avar 17y agoThat's very useful. I've got it installed already. Here's a small patch to it to make it work without your dotemacs: http://github.com/avar/ibuffer-git/commit/59674f http://github.com/avar/ibuffer-git/commit/59674f And here's what I had to do to get it working with my dotemacs which uses autoloads instead of loading everything at startup: http://github.com/avar/dotemacs/commit/9bd611 http://github.com/avar/dotemacs/commit/9bd611 One day I'll figure out how eproject works, and customize-variable, and everything else I haven't looked at in Emacs yet :)
- jrockway 17y agoNice. Just FYI, eproject shouldn't be required for this; the functionalities are orthogonal. And BTW, I just start my emacs when I login with "emacs --daemon". A few seconds of latency at startup is better than the latency whenever I first use something. And it's easier to program for :)
- tumult 17y agoI use magit right now, but one thing about using emacs and the commandline that bugged me when I tried it was that when changing branches, I would be prompted for what to do with each open file that had changed. Is there a good workflow solution for this?
- avar 17y agoYes. You create a stash with your changes, or commit them before switching branches.
- tumult 17y agoWell, I mean with files that are open and unmodified. If I change to a different branch to work on something else, emacs will prompt me for what to do with each open file that is different between branches.
- avar 17y agoAh, I don't know if magit has that feature. It's relatively easy conceptually though. You'd write a hook for magit that on branch change would check what buffers were open to files within the repository and refresh their contents. Maybe something like that exists already. I just press "r" to refresh the file from the filesystem when editing the individual files in this case.
- tumult 17y agomagit does have that feature (automatically reload files etc after changing branches.) What I want is that feature outside of magit (or other VCS integration) somehow.
- shabble 17y agotry enabling the auto-revert-mode minor mode. http://www.gnu.org/software/emacs/manual/html_node/emacs/Reverting.html http://www.gnu.org/software/emacs/manual/html_node/emacs/Rev...
- almost 17y agoWhat this really needs is a way of performing git operations on the files in the iBuffer, then it would be a nice replacement for the various git modes for emacs.