On 20 Jan 2018, 11:34 PM +0800, Michael Albinus <michael.albinus@gmx.de>, wrote:

I've pushed a patch to the master branch. It recreates a file
notification in autorevert, if a file was deleted and recreated
afterwards. 

Yes. this seems OK. But there is a delay before auto-revert every 2 appending to the test file.

echo aaa >> test.c   (auto-revert ok)
echo aaa >> test.c   (delay about 4s, then auto-revert ok)
echo aaa >> test.c   (auto-revert ok)
echo aaa >> test.c   (delay about 4s, then auto-revert ok)


I added some debug log to two method (name in []):
[file-notify-callback]: (9 (extend write) /Users/jun/test/1.c)
[auto-revert-notify-handler]: (9 changed /Users/jun/test/1.c)
Reverting buffer ‘1.c’.
[file-notify-callback]: (9 (extend write) /Users/jun/test/1.c)
[auto-revert-notify-handler]: (9 changed /Users/jun/test/1.c)
[file-notify-callback]: (9 (extend write) /Users/jun/test/1.c)
[auto-revert-notify-handler]: (9 changed /Users/jun/test/1.c)
[file-notify-callback]: (9 (extend write) /Users/jun/test/1.c)
[auto-revert-notify-handler]: (9 changed /Users/jun/test/1.c)
Reverting buffer ‘1.c’.

3 write events but only one auto-revert.