all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Paul R'" <paul.r.ml@gmail.com>, <help-gnu-emacs@gnu.org>
Subject: RE: automatic dired update
Date: Mon, 5 Jan 2009 07:43:36 -0800	[thread overview]
Message-ID: <000801c96f4c$60de5170$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <87zli6gkf7.fsf@gmail.com>

> >> 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	other threads:[~2009-01-05 15:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <91299a37-5cd2-4b3e-a7c3-381bdf7f69a5@q30g2000prq.googlegroups.com>
     [not found] ` <90548140-00a8-44f8-b8f0-6b4530f49933@v39g2000pro.googlegroups.com>
     [not found]   ` <ddd5bee8-c0ca-4cf6-8234-72ae447a362d@s1g2000prg.googlegroups.com>
2009-01-04 21:05     ` automatic dired update Xah Lee
2009-01-05  1:56       ` Drew Adams
2009-01-05  9:40         ` Paul R
2009-01-05 15:43           ` Drew Adams [this message]
     [not found]         ` <mailman.3996.1231148453.26697.help-gnu-emacs@gnu.org>
2009-01-05 10:15           ` Andreas Politz
2009-01-06 16:47             ` Andreas Politz
2009-01-06 22:27               ` Peter Dyballa
     [not found]               ` <mailman.4171.1231280855.26697.help-gnu-emacs@gnu.org>
2009-01-07  8:47                 ` Andreas Politz
2009-01-05 12:53       ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000801c96f4c$60de5170$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=paul.r.ml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.