all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Auto revert mode but only for git projects
@ 2010-06-06 15:52 Andrea Crotti
  2010-06-07 20:27 ` Andrea Crotti
  0 siblings, 1 reply; 2+ messages in thread
From: Andrea Crotti @ 2010-06-06 15:52 UTC (permalink / raw)
  To: help-gnu-emacs

When using branches with emacs reverting the buffers can be quite
tedious.

But also activating auto-revert-mode everywhere is not such a good idea.

So I thought that I could automatically activate auto-revert-mode BUT
only when
1. I'm in a git repo
2. I have at least 2 branches

What could be the cleaner way to do it?
Textmate.el has already something to look if it's a git repo, then I can
check for more branches with
--8<---------------cut here---------------start------------->8---
git branch | wc -l
--8<---------------cut here---------------end--------------->8---
for example and maybe add a hook in find-file-hooks?

Could that work?




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-07 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-06 15:52 Auto revert mode but only for git projects Andrea Crotti
2010-06-07 20:27 ` Andrea Crotti

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.