6

Is Notifications on File Changes supported on Mac OS X? I can't seem to find any documentation about how to do this anywhere.

6

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.

  • Yay! 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. – Harald Hanche-Olsen Mar 11 '16 at 7:07
5

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.

  • okay; so basically, the answer is no. – imalison Nov 25 '14 at 4:22
  • 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"? – Malabarba Nov 25 '14 at 12:52
  • @Malabarba en.wikipedia.org/wiki/NeXTSTEP – Nsukami _ Nov 25 '14 at 12:56
  • @Nsukami_ Yes, that's how I inferred my second question. The answer can still use clarification. :-) – Malabarba Nov 25 '14 at 12:58
  • @Malabarba Ok, let me please edit my answer :) – Nsukami _ Nov 25 '14 at 12:59
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.