help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: have dired always refresh on changed disk


From: John Mastro
Subject: Re: have dired always refresh on changed disk
Date: Sat, 27 Sep 2014 16:01:04 -0700

Emanuel Berg <address@hidden> wrote:
> I have found that
>
>     (setq dired-auto-revert-buffer 'dired-directory-changed-p)
>
> does partly what I want. It reverts when a dired buffer
> is reselected (e.g., find-file and then a dir that
> already has a buffer) and the dir has changed on disk.

Interesting, I wasn't aware of `dired-auto-revert-buffer'.

By default, `auto-revert-mode' checks the underlying file (based on time
stamps) every 5 seconds (see `auto-revert-interval'). That's worked well
in my experience but obviously YMMV.

I'm still not sure what caused the problem you mentioned earlier - your
cursor jumping around in a buffer you were editing. That would indeed be
a deal breaker, but `auto-revert-mode' "shouldn't" cause it. The only
time when `auto-revert-mode' modifies the buffer is when the file has
changed on disk. So if the file isn't being changed (apart from your own
saves) that shouldn't happen. Actually, I haven't noticed cursor jumping
even when the underlying file /is/ being modified, though I can see how
it could happen (or be perceived that way).

-- 
John


reply via email to

[Prev in Thread] Current Thread [Next in Thread]