all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: zhang cc <ccsmile2008@outlook.com>
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: Tue, 02 Jan 2018 14:23:53 +0100	[thread overview]
Message-ID: <87vagkjswm.fsf@gmx.de> (raw)
In-Reply-To: <SG2PR0601MB140554B8E95DDDE450C9324BA8050@SG2PR0601MB1405.apcprd06.prod.outlook.com> (zhang cc's message of "Fri, 29 Dec 2017 15:45:35 +0000")

zhang cc <ccsmile2008@outlook.com> writes:

Hi,

> What about the following logic:
> When the auto-revert module known the file is renamed or deleted,
> delete the watch 
> and start a one shot short timer(about 100ms) to check the visiting
> file of the buffer. On timeout, 
> if the file exists, revert the file and add a new watch, otherwise,
> tell user the file doesn’t exist 
> and fallback to the default polling(5s). 
> Once the visiting file of the buffer can be accessed, go back to use
> file-notify again.

Sounds possible. However, I would make it optional. Some people might
dislike this feature, invisible under the hood. And the timeout of 100ms
might vary depending on the filesystem the supervised file is located
on. In case of remote files, this will be too short I fear.

I will put it in my TODO. If time permits, I'll work on this, if nobody
beats me. Saying this, it might be better if you send this proposal via
"M-x report-emacs-bug". I will convert this into a wishlist item, and it
is much more likely to be found by other people than on my private TODO
list.

Best regards, Michael.



  reply	other threads:[~2018-01-02 13:23 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 [this message]
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
     [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=87vagkjswm.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=ccsmile2008@outlook.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.