Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ibuffer-git: See your files' git status in Ibuffer (jrockway.github.com)
34 points by jrockway on March 28, 2010 | hide | past | favorite | 17 comments


That'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

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

One day I'll figure out how eproject works, and customize-variable, and everything else I haven't looked at in Emacs yet :)


Nice. 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 :)


It's required for using your ibuffer-format which references eproject. I couldn't be bothered to customize it to something different.

I should probably learn to use eproject anyway.


Fair enough. I also agree on the second point :)


An 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)


What 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.


I think Magit works pretty well for this. I will think about it some more; Ibuffer is probably not the right place for everything, but something more coherent could be good.


Magit is pretty good, but it's quite nice to have things based on common bits.


I 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?


Yes. You create a stash with your changes, or commit them before switching branches.


Well, 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.


Just FYI, space counts as "yes" at all y-or-n-p prompts. Emacs does do what you say, but it is kind of nice to have the warning -- "oh, something unusual is going on". With a push of the spacebar to dismiss the warning, it's something barely worth thinking about.

Also... I think "(defalias 'yes-or-no-p 'y-or-n-p)" is the most useful line of code I have ever written.


Ah, 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.


magit 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.


try enabling the auto-revert-mode minor mode.

http://www.gnu.org/software/emacs/manual/html_node/emacs/Rev...


This is very nice. Does anyone know of a similar emacs extension for mercurial?


Should be a matter of changing 2 lines of code; one to run the status command, one to parse the output.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: