From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: have dired always refresh on changed disk Date: Sat, 27 Sep 2014 16:01:04 -0700 Message-ID: References: <87d2ai6ulj.fsf@debian.uxu> <87oau1iwcd.fsf@debian.uxu> <87eguxtcx5.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1411858912 25901 80.91.229.3 (27 Sep 2014 23:01:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Sep 2014 23:01:52 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 28 01:01:46 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XY0zp-0002xU-7X for geh-help-gnu-emacs@m.gmane.org; Sun, 28 Sep 2014 01:01:45 +0200 Original-Received: from localhost ([::1]:57710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XY0zo-00028V-Tg for geh-help-gnu-emacs@m.gmane.org; Sat, 27 Sep 2014 19:01:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XY0zd-00028C-T8 for help-gnu-emacs@gnu.org; Sat, 27 Sep 2014 19:01:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XY0za-0001Pz-NJ for help-gnu-emacs@gnu.org; Sat, 27 Sep 2014 19:01:33 -0400 Original-Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:44899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XY0za-0001PA-IW for help-gnu-emacs@gnu.org; Sat, 27 Sep 2014 19:01:30 -0400 Original-Received: by mail-oi0-f45.google.com with SMTP id i138so3161112oig.4 for ; Sat, 27 Sep 2014 16:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=m/ENciUyRf8Pgxn23D/ggyqzmUjAphDlEQD4mEi5Fmg=; b=iBKKDHU6RFdgoTd7Uc9iRcGmVBPK3RVG20qhs4sc0bOe4PNtxfQn/qy+z+K/Mot+z/ DBHrAogj6aKrv4PpEJJCj6dRThW/uxr/CUv7Z0MMqV0ttvY6CLxcuZhMP16mzkYi3dll HtP3sp5uYur/sLGzHpYfqJQc8pmgtFi69bRSAFqlnDQyQ61efDs4Vk/yuLn1v+FPp68E H54KhhpVKkOozJQ2nPEEJFAAk49DkMGUKA8oXFCPCwB446VDeC1dALqy5FzL+fmIl2TC MfuDgQ04yB+2G+EAfXxqJ9mTPgXglxjlyNSLgKdKKSZFJy7AhZa+I7zrO1ReYqCjsB3K 4WiQ== X-Received: by 10.60.46.167 with SMTP id w7mr30714727oem.50.1411858884350; Sat, 27 Sep 2014 16:01:24 -0700 (PDT) Original-Received: by 10.76.125.194 with HTTP; Sat, 27 Sep 2014 16:01:04 -0700 (PDT) In-Reply-To: <87eguxtcx5.fsf@debian.uxu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22d X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100170 Archived-At: Emanuel Berg 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