From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Clarification about auto-revert-mode and inotify Date: Tue, 21 Oct 2014 21:34:40 +0300 Message-ID: <83k33t9sqn.fsf@gnu.org> References: <87vbnd9aab.fsf@secretsauce.net> <878uk9s3mh.fsf@secretsauce.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1413916520 9505 80.91.229.3 (21 Oct 2014 18:35:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2014 18:35:20 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Dima Kogan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 21 20:35:13 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XgeH2-0003Tb-QF for ged-emacs-devel@m.gmane.org; Tue, 21 Oct 2014 20:35:12 +0200 Original-Received: from localhost ([::1]:52980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgeH2-0001e7-C7 for ged-emacs-devel@m.gmane.org; Tue, 21 Oct 2014 14:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgeGi-0001bg-QM for emacs-devel@gnu.org; Tue, 21 Oct 2014 14:34:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgeGd-0003mH-FK for emacs-devel@gnu.org; Tue, 21 Oct 2014 14:34:52 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:44491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgeGd-0003mD-7J for emacs-devel@gnu.org; Tue, 21 Oct 2014 14:34:47 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NDT00E004D15E00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Tue, 21 Oct 2014 21:34:45 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDT00ESL4XX1SA0@a-mtaout21.012.net.il>; Tue, 21 Oct 2014 21:34:45 +0300 (IDT) In-reply-to: <878uk9s3mh.fsf@secretsauce.net> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175662 Archived-At: > From: Dima Kogan > Date: Tue, 21 Oct 2014 10:59:29 -0700 > Cc: emacs-devel@gnu.org > > > Indeed, IIUC the current auto-revert-mode implementation only uses the > > file-notification code to reduce the amount of polling, but the revert > > itself is still only performed from the 5s timer. > > > > I don't think there's a strong technical reason for that, > > OK. > > I'm attaching a prototype patch to fix this. It updates the buffer > immediately when a change is detected, unless the previous such update > happened very recently. If it DID happen very recently, the normal > timer-based update kicks in later. > > Is such a patch reasonable? If so, I'll add the proper comments and > docstrings, and resubmit it. I'm sorry, but I still don't understand what's wrong with customizing auto-revert-interval. It seems to allow what you want, and also what others might want. So where's the problem that requires another time, and the rest of the complexity you are suggesting?