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.

Dan
  • 32,980
  • 7
  • 102
  • 169
imalison
  • 211
  • 1
  • 5

3 Answers3

7

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.

Michael Albinus
  • 7,027
  • 15
  • 20
  • 1
    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 07: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.

offby1
  • 310
  • 2
  • 5
Nsukami _
  • 6,521
  • 2
  • 23
  • 35
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.

legoscia
  • 6,072
  • 30
  • 54