emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File watch support in autorevert.el


From: Stefan Monnier
Subject: Re: File watch support in autorevert.el
Date: Fri, 11 Jan 2013 11:39:28 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]