On Mon, 3 Mar 2014 15:41:43 -0500 Noam Postavsky <[email protected]> wrote:
NP> On Mon, Mar 3, 2014 at 3:06 PM, Ted Zlatanov <[email protected]> wrote: NP> Looks like the relevant commit was b6c80f5 (2 months ago). >> >> I think it's more recent but haven't bisected it exactly. NP> That commit contains: NP> +(defun magit-maybe-turn-on-auto-revert-mode () NP> + "Turn on Auto-Revert mode if file is inside a Git repository. NP> +This function is intended as a hook for `find-file-hook'. It NP> +turns on `auto-revert-mode' if `magit-turn-on-auto-revert-mode' NP> +is non-nil, the buffer is visiting a file in a Git repository, NP> +and no variation of the Auto-Revert mode is already active." NP> + (when (and magit-turn-on-auto-revert-mode NP> + (not auto-revert-mode) NP> + (not auto-revert-tail-mode) NP> + (not global-auto-revert-mode) NP> + (magit-get-top-dir)) NP> + (auto-revert-mode 1))) NP> + NP> +(add-hook 'find-file-hook 'magit-maybe-turn-on-auto-revert-mode) NP> Which would implement exactly the behaviour you're describing, so 99% NP> it's that one. Yup. Thanks. On Wed, 5 Mar 2014 06:01:05 -0800 (PST) Jonas Bernoulli <[email protected]> wrote: JB> Magit should only turn on auto-revert-mode for files tracked by Git. It did always automatically revert these files, but used its own code to do so. JB> Anyway, I agree this needs some fine tuning and could be improved. Doing so might take some time though. The main problem is that Magit does this upon loading, without even being used. I think that's a bug and needs to be fixed. The `add-hook' call cited by Noam above should probably be in the `magit' function, not at the top level, but I don't know the right way. Ted -- You received this message because you are subscribed to the Google Groups "magit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
