From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: automatic dired update Date: Mon, 5 Jan 2009 07:43:36 -0800 Message-ID: <000801c96f4c$60de5170$0200a8c0@us.oracle.com> References: <91299a37-5cd2-4b3e-a7c3-381bdf7f69a5@q30g2000prq.googlegroups.com><90548140-00a8-44f8-b8f0-6b4530f49933@v39g2000pro.googlegroups.com><001c01c96ed8$d69107b0$0200a8c0@us.oracle.com> <87zli6gkf7.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1231170257 4832 80.91.229.12 (5 Jan 2009 15:44:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2009 15:44:17 +0000 (UTC) To: "'Paul R'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 05 16:45:27 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LJrdv-0000qO-4l for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Jan 2009 16:45:27 +0100 Original-Received: from localhost ([127.0.0.1]:44035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJrcf-0000dP-QJ for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Jan 2009 10:44:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LJrc4-0000U6-BA for help-gnu-emacs@gnu.org; Mon, 05 Jan 2009 10:43:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LJrc2-0000St-Kn for help-gnu-emacs@gnu.org; Mon, 05 Jan 2009 10:43:31 -0500 Original-Received: from [199.232.76.173] (port=49851 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJrc2-0000Sl-6l for help-gnu-emacs@gnu.org; Mon, 05 Jan 2009 10:43:30 -0500 Original-Received: from rcsinet13.oracle.com ([148.87.113.125]:57687 helo=rgminet13.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LJrc1-0007kj-PB for help-gnu-emacs@gnu.org; Mon, 05 Jan 2009 10:43:30 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n05Fi4CM025929 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 5 Jan 2009 15:44:05 GMT Original-Received: from acsmt707.oracle.com (acsmt707.oracle.com [141.146.40.85]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n05FhvAK009841; Mon, 5 Jan 2009 15:43:58 GMT Original-Received: from dradamslap1 (/141.144.168.142) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Jan 2009 15:43:19 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87zli6gkf7.fsf@gmail.com> Thread-Index: AclvGbsP8LDhlkNvQJeKNi6LJ4UPkwAMTVRQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt707.oracle.com [141.146.40.85] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.49622A9A.000E:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61089 Archived-At: > >> 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.