From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.bugs Subject: bug#8371: auto-revert-mode check Date: Mon, 28 Mar 2011 18:22:04 -0400 Message-ID: <52890479-F457-4A90-AD49-E3B65444AF24@raeburn.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1301351857 7942 80.91.229.12 (28 Mar 2011 22:37:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Mar 2011 22:37:37 +0000 (UTC) To: 8371@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 29 00:37:33 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4L40-0003D9-KD for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2011 00:37:32 +0200 Original-Received: from localhost ([127.0.0.1]:49554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4L40-0007FK-0q for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Mar 2011 18:37:32 -0400 Original-Received: from [140.186.70.92] (port=47657 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4L3l-0007AO-Qn for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2011 18:37:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4L3g-0003tu-SG for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2011 18:37:17 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4L3g-0003tp-PT for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2011 18:37:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q4Kpy-00020e-Bo; Mon, 28 Mar 2011 18:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Raeburn Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Mar 2011 22:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8371 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13013509417672 (code B ref -1); Mon, 28 Mar 2011 22:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Mar 2011 22:22:21 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4KpI-0001zh-Rc for submit@debbugs.gnu.org; Mon, 28 Mar 2011 18:22:21 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4KpG-0001zV-Sk for submit@debbugs.gnu.org; Mon, 28 Mar 2011 18:22:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4KpA-000223-Uo for submit@debbugs.gnu.org; Mon, 28 Mar 2011 18:22:13 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:45504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4KpA-00021z-Sh for submit@debbugs.gnu.org; Mon, 28 Mar 2011 18:22:12 -0400 Original-Received: from [140.186.70.92] (port=60939 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4Kp9-000792-UQ for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2011 18:22:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4Kp4-00021U-R0 for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2011 18:22:11 -0400 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:39077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4Kp4-00021Q-MH for bug-gnu-emacs@gnu.org; Mon, 28 Mar 2011 18:22:06 -0400 Original-Received: by vxk20 with SMTP id 20so2920558vxk.0 for ; Mon, 28 Mar 2011 15:22:05 -0700 (PDT) Original-Received: by 10.52.0.107 with SMTP id 11mr6117330vdd.236.1301350925744; Mon, 28 Mar 2011 15:22:05 -0700 (PDT) Original-Received: from [10.1.12.6] (vpn.permabit.com [204.246.225.2]) by mx.google.com with ESMTPS id c4sm852279vcc.6.2011.03.28.15.22.04 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Mar 2011 15:22:05 -0700 (PDT) X-Mailer: Apple Mail (2.1082) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 28 Mar 2011 18:23:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45441 Archived-At: It looks like auto-revert-mode in 23.2 checks the file timestamp to see = when the file is updated. But I often see the file as having an extra = line or two that Emacs doesn't pick up for a long time, until something = else is added to the file. I don't have time to look into it right now = at work, but my guess is either/both (1) Emacs records the "changed" = timestamp after reading the updated content, so the timestamp could = correspond to an updated version relative to the buffer content; (2) = Emacs isn't recording/checking the timestamp with enough granularity = (which on this NFS file server and Linux NFS client, appears to be a = millisecond, though file-attributes appears to return no sub-second = component), so updates within the space of a second after Emacs rereads = the file aren't detected. Checking file size too would help, at least for files updated by = appending. I think file-attributes needs to be able to return sub-second = granularity timestamps for modern operating systems, though it may = require using non-standard interfaces, like GNU libc's = stat.st_atim.tv_nsec or stat.st_atimensec field. I'll see if I have time to look into this later this week. Ken=