all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zhang cc <ccsmile2008@outlook.com>
To: Michael Albinus <michael.albinus@gmx.de>, Alan Third <alan@idiocy.org>
Cc: Eli Zaretskii <eliz@gnu.org>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: auto-revert error on macOS when auto-revert-use-notify is t
Date: Sun, 11 Mar 2018 04:26:21 +0000	[thread overview]
Message-ID: <SG2PR0601MB14058AB05D0731E613251D63A8DC0@SG2PR0601MB1405.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <20180122230510.GA63391@breton.holly.idiocy.org>

[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]

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.

There is a big delay before auto-reverting, not every one, about every two or three.
You can modify the test file with the following bash script:

#!/bin/bash

for (( i = 0; i < 100; i++ ));
do
        echo $i >> 1.c
        sleep 2
done



[-- Attachment #2: Type: text/html, Size: 10999 bytes --]

  reply	other threads:[~2018-03-11  4:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-29  5:08 auto-revert error on macOS when auto-revert-use-notify is t zhang cc
2017-12-29 10:02 ` Michael Albinus
2017-12-29 10:13   ` Eli Zaretskii
2017-12-29 15:45     ` zhang cc
2018-01-02 13:23       ` Michael Albinus
2018-01-05 14:47         ` zhang cc
2018-01-20 15:34           ` Michael Albinus
2018-01-21 11:01             ` zhang cc
2018-01-21 20:16             ` Alan Third
2018-01-22  8:17               ` Michael Albinus
2018-01-22 23:05                 ` Alan Third
2018-03-11  4:26                   ` zhang cc [this message]
     [not found]                   ` <18101cae-50ff-44a2-af65-f77b9039f461@Spark>
2018-03-11  4:29                     ` zhang cc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SG2PR0601MB14058AB05D0731E613251D63A8DC0@SG2PR0601MB1405.apcprd06.prod.outlook.com \
    --to=ccsmile2008@outlook.com \
    --cc=alan@idiocy.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.