From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: File watch support in autorevert.el Date: Fri, 11 Jan 2013 11:39:28 -0500 Message-ID: References: <878v819kok.fsf@gmx.de> <83fw28uj9c.fsf@gnu.org> <8338y7vkyx.fsf@gnu.org> <87libzn4qt.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1357922382 15434 80.91.229.3 (11 Jan 2013 16:39:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Jan 2013 16:39:42 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 11 17:40:00 2013 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 1Tthe9-0000zQ-Pu for ged-emacs-devel@m.gmane.org; Fri, 11 Jan 2013 17:39:57 +0100 Original-Received: from localhost ([::1]:45790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tthdt-0001Y6-TJ for ged-emacs-devel@m.gmane.org; Fri, 11 Jan 2013 11:39:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tthdr-0001WU-32 for emacs-devel@gnu.org; Fri, 11 Jan 2013 11:39:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tthdp-0002DY-8I for emacs-devel@gnu.org; Fri, 11 Jan 2013 11:39:39 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:4708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tthdi-00028N-QH; Fri, 11 Jan 2013 11:39:30 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkGAG6Zu09MCpYP/2dsb2JhbABEgXuyFoEIghUBAQQBJy8jBQsLNBIUGA0kiBwFugmQRAOIQppxgViDBw X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="212307938" Original-Received: from 76-10-150-15.dsl.teksavvy.com (HELO pastel.home) ([76.10.150.15]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Jan 2013 11:39:29 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 0542559441; Fri, 11 Jan 2013 11:39:28 -0500 (EST) In-Reply-To: <87libzn4qt.fsf@gmx.de> (Michael Albinus's message of "Fri, 11 Jan 2013 16:01:14 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:156230 Archived-At: > I can speak only for the inotify case. According to my tests, > IN_CLOSE_WRITE will always happen once a file has been written on the > filesystem. See for example (commands have been applied in different shells): > --8<---------------cut here---------------start------------->8--- > ~$ echo xxx >>~/tmp/123 > ~$ inotifywait -mq ~/tmp/123 > /home/albinmic/tmp/123 OPEN > /home/albinmic/tmp/123 MODIFY > /home/albinmic/tmp/123 CLOSE_WRITE,CLOSE > --8<---------------cut here---------------end--------------->8--- > Do you (Stefan?) have a use case where just IN_MODIFY has been fired, > w/o a corresponding IN_CLOSE_WRITE? Try: while sleep 60; do echo hello; done >> ~/tmp/123 Look ma, no close! But you don't need a script: just try auto-revert-mode on a log written by syslogd. Admittedly, these cases are presumably clients of auto-revert-tail-mode, but auto-revert-mode should handle them correctly. Stefan