From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: autorevert.el Date: Mon, 22 Mar 2004 13:39:08 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200403221939.i2MJd8116508@raven.dms.auburn.edu> References: <200403022319.i22NJbG01259@raven.dms.auburn.edu> <200403040508.i2458W811551@raven.dms.auburn.edu> <200403050400.i2540VQ21715@raven.dms.auburn.edu> <200403130310.i2D3A8w28676@raven.dms.auburn.edu> <200403150008.i2F083x04382@raven.dms.auburn.edu> <200403160456.i2G4uVL14097@raven.dms.auburn.edu> <2427-Tue16Mar2004214034+0200-eliz@elta.co.il> <8011-Fri19Mar2004164602+0200-eliz@elta.co.il> <200403210326.i2L3QpF29260@raven.dms.auburn.edu> <200403220244.i2M2ikR07506@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1079985299 24296 80.91.224.253 (22 Mar 2004 19:54:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Mar 2004 19:54:59 +0000 (UTC) Cc: emacs-devel@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Mar 22 20:54:53 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B5VVc-0006Ig-00 for ; Mon, 22 Mar 2004 20:54:52 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B5VVc-0005jU-00 for ; Mon, 22 Mar 2004 20:54:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B5VJn-0003aQ-CV for emacs-devel@quimby.gnus.org; Mon, 22 Mar 2004 14:42:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B5VJM-0003ZU-90 for emacs-devel@gnu.org; Mon, 22 Mar 2004 14:42:12 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B5VIq-0003UK-8M for emacs-devel@gnu.org; Mon, 22 Mar 2004 14:42:11 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B5VIJ-0003K2-Nc; Mon, 22 Mar 2004 14:41:07 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i2MJetKt022280; Mon, 22 Mar 2004 13:40:56 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i2MJd8116508; Mon, 22 Mar 2004 13:39:08 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: eliz@gnu.org In-reply-to: (message from Eli Zaretskii on 22 Mar 2004 08:51:47 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20742 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20742 Eli Zaretskii wrote: I'm at a loss how you arrived at that conclusion, especially since I suggested looking at the size for the benefit of systems that cannot use the time stamp. Isn't this better than not knowing the directory changed at all? But the probability of finding it out this way is close to zero. Stefan Monnier wrote: He ment to check it additionally to the mod-time. I.e. if either the mod-time or the size has changed, then the dir has changed. Yes, but the size only seems to change after adding or deleting approximately 200 files. Many (probably most) of my directories do not even contain that many files and never will. They have size 4096 and always will. What would seem to happen on MS Windows if we did that would be that, normally, directories do not autorevert, so the user believes that they never autorevert. Once in a very blue moon, one huge directory suddenly starts autoreverting all the time. The user wonders what is going on. All of a sudden it stops autoreverting and never autoreverts again. Note that this system is very much biased toward autoreverting large directories. Small directories, that would be very cheap to autorevert, never will be autoreverted. It would seem to be relatively better never to autorevert. Or automatically revert directories whose size is _below_ a certain threshold every auto-revert-interval seconds, on systems for which we have no better method. Note that to check whether the size has changed, dired needs to store the old size. I did not check whether it currently does that. What if I just go ahead and install my patches to autorevert and dired? (Additional changes can always be made later.) Then maybe somebody volunteers to solve the portability problem in the only really correct way. The problem affects dired proper and ido-mode as much as it affects auto-revert. Do the maintainers of the various ports routinely read emacs-devel? None appear to be Cc-ed. Otherwise people using non-POSIX systems can try to set buffer-stale-function to various values in dired-mode using dired-mode-hook and see what works best. Sincerely, Luc.