Is Notifications on File Changes supported on Mac OS X? I can't seem to find any documentation about how to do this anywhere.
3 Answers
For the records, support of kqueue has been added to the file notification libraries in the upcoming Emacs 25.1. This means, that you could use file notifications in Emacs under *BSD and OSX.
For OSX, FSEvents might be better suited. But nobody has taken the ball, and offered an implementation for Emacs.
-
1Yay! Tried it on OS X (compiled from the git repository), and it works (using
file-notify-add-watch
). At least, in my superficial testing, it does. Mar 11, 2016 at 7:07
The short answer is: no.
From gnu.org:
** Emacs can now be compiled with file notification support. This happens by default if a suitable system library is found at build time. To prevent this, use the configure option `--without-file-notification'. See below for file-notify features. This feature is not available for the Nextstep port.
Note that "Nextstep", in this context, means "OS X". There's a lengthy explanation of this confusing terminology here.
From Wikipedia:
[...] Apple's OS X and iOS are direct descendants of NeXTSTEP, through the OPENSTEP lineage.
Quote 1 + quote 2 = Notification on file changes is not supported on Mac OSX.
-
-
This answer is missing an actual answer. Why does this quote answer the question? Is "Nexstep" a codename for OSX? Or is it just a case that OSX has no "suitable system library"? Nov 25, 2014 at 12:52
-
-
@Nsukami_ Yes, that's how I inferred my second question. The answer can still use clarification. :-) Nov 25, 2014 at 12:58
-
No, file notifications are not yet supported on Mac OS X, as detailed in the other answer.
I'd guess that one reason for that is that on earlier OS X versions, notifications were limited to telling you that something had changed in a certain directory; it wouldn't tell you what in that directory had changed. Given that limitation, the API on the Emacs Lisp level would be rather inconsistent.
File-level notifications were introduced in 10.7 (Lion). This question contains more details. As I understand it, it should now be possible to implement this functionality for Emacs on OS X.