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.
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 :)
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?
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.
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.
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.
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.
17 comments
[ 2.7 ms ] story [ 47.0 ms ] thread(For project support in emacs, try eproject; http://github.com/jrockway/eproject)
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 :)
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 :)
I should probably learn to use eproject anyway.
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.
http://www.gnu.org/software/emacs/manual/html_node/emacs/Rev...
Also... I think "(defalias 'yes-or-no-p 'y-or-n-p)" is the most useful line of code I have ever written.