4 ms·
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
by tumult 17y ago
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.
- 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...
- jrockway 17y agoJust 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.