[Top][All Lists]

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

Re: OSX FSEvents file watching support

From: Eli Zaretskii
Subject: Re: OSX FSEvents file watching support
Date: Thu, 18 Jul 2019 12:35:49 +0300

> Date: Tue, 16 Jul 2019 21:18:29 -0700
> From: "Muir Manders" <address@hidden>
> I am interested in adding support in Emacs for Mac OS "FSEvents" file 
> watching. FSEvents allows for
> efficient recursive directory watching, which would be a boon for packages 
> like lsp-mode.
> I seem to have three options:
> 1. Write a new backend for filenotify.el. The existing backends explicitly 
> don't support recursive watching, so
> I'm not sure if it makes sense to have one special backend that does support 
> recursive watching.

What do you mean by "recursive watching"?  w32notify.c supports
watching changes in all the subdirectories, recursively, of a
specified directory.  Is that what you mean?

> 2. Publish a dynamic module that wraps the FSEvents API. It seems like most 
> OSX distributions of Emacs
> have module support enabled, but I'm afraid there might be other challenges 
> with this approach I don't know
> yet.

I don't think modules can currently inject events into the Emacs event

> 3. Publish an elisp package that calls out to an existing program that 
> supports FSEvents like "fswatch". This
> approach probably has the least friction, but doesn't allow for tweaking 
> FSEvents settings, and might have
> performance disadvantages.

How would that work, implementation-wise?  Filesystem events are
supposed to be eventually injected into the input queue; how would you
go about doing that when an external porgram does the watching?

reply via email to

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