From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] autorevert.el -- revert fix for Windows platform Date: Sun, 25 Mar 2007 03:09:10 +0200 Message-ID: References: <7it9frhi.fsf@cante.net> <87slbx9vcf.fsf@stupidchicken.com> <46040576.9090505@gnu.org> <200703250024.l2P0OTZ9027237@jane.dms.auburn.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174784974 8801 80.91.229.12 (25 Mar 2007 01:09:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Mar 2007 01:09:34 +0000 (UTC) Cc: jari.aalto@cante.net, eliz@gnu.org, jasonr@gnu.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Luc Teirlinck Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 25 03:09:27 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HVHEa-0004Il-Np for ged-emacs-devel@m.gmane.org; Sun, 25 Mar 2007 03:09:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HVHGf-0004kl-4E for ged-emacs-devel@m.gmane.org; Sat, 24 Mar 2007 20:11:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HVHGb-0004kg-GU for emacs-devel@gnu.org; Sat, 24 Mar 2007 21:11:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HVHGa-0004kS-7j for emacs-devel@gnu.org; Sat, 24 Mar 2007 21:11:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HVHGa-0004kP-0w for emacs-devel@gnu.org; Sat, 24 Mar 2007 20:11:28 -0500 Original-Received: from pfepa.post.tele.dk ([195.41.46.235]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HVHES-00040K-Tp; Sat, 24 Mar 2007 21:09:17 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx19.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id D828CFAC023; Sun, 25 Mar 2007 03:09:13 +0200 (CEST) In-Reply-To: <200703250024.l2P0OTZ9027237@jane.dms.auburn.edu> (Luc Teirlinck's message of "Sat\, 24 Mar 2007 19\:24\:29 -0500 \(CDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68513 Archived-At: Luc Teirlinck writes: > Kim Storm wrote: > > I didn't think deeply about the implications of using (buffer-size) > directly, but what about using (position-bytes (buffer-size)) instead? > > Just as wrong, and again, I have actually files for which > (position-bytes (buffer-size)) is very different from the size of the > file on disk. The internal contents of an Emacs buffer are _not_ the > same as the contents of the file on disk, unless `find-file-literally' > was used (see for instance `(elisp)Coding Systems'). I see, thanks! Still, I don't see why auto-revert-mode cannot just track changes to the file size, just like auto-revert-tail-mode does (i.e. store the previous file size in buffer-local var auto-revert-tail-pos). -- Kim F. Storm http://www.cua.dk