[Top][All Lists]

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

RE: automatic dired update

From: Drew Adams
Subject: RE: automatic dired update
Date: Mon, 5 Jan 2009 07:43:36 -0800

> >> Does anyone know how to make dired auto-refresh? For 
> example, i have
> >> a dired buffer of dir xyz buried somewhere. Then, i renamed some
> >> files in OS's Desktop. Then, when i switch to dir xyz in emacs,
> >> i wish to see the updated list without me having to type g to
> >> refresh. originally i thought just some hook... something like
> >> (add-hook 'dired-load-hook 'revert-buffer)
> >> 
> >> but when actually trying to do it, apparently not that simple.
> >> I thought it must be some function or variable that tells me when
> >> buffer display is switched or updated... can't locate it.
> Drew> Good question. To use a hook to call `dired-revert', you need to
> Drew> find a hook that represents the "change" in interaction 
> Drew> state that you make when you "switch" to the dired buffer.
> Drew> I'm not sure what hook that might be.
> That would only work if the dired buffer is not currently 
> displayed when the change happen.

That's why I put "switch" in quotes. It wasn't clear what the OP meant by
"switch to dir". I include the possibility that he includes the possibility of
changing focus to an existing Dired window.

My point was that, depending on what is meant by "switch", it's not obvious what
hook might help.

reply via email to

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