summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2016-01-21 12:51:22 +0100
committerAlan Pearce2016-01-21 12:51:22 +0100
commit7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff (patch)
tree9561b0d46334f4c1b6061c8c05ac5e227e4bb32a
parent8e365f86d6b58d02496d556b97b75f1440ef63ff (diff)
downloadnixfiles-7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff.tar.lz
nixfiles-7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff.tar.zst
nixfiles-7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff.zip
Emacs: Check for file-notify support
-rw-r--r--tag-emacs/emacs.d/init.org17
1 files changed, 9 insertions, 8 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index eb432cf9..193796a1 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -1687,14 +1687,15 @@ I can use this to keep a journal.  I should use it.
               (org-mobile-pull) ;; run org-mobile-pull at startup
 
               (defvar org-mobile-watcher nil)
-              (let ((org-file (expand-file-name
-                               (concat
-                                (file-name-as-directory org-mobile-directory)
-                                org-mobile-capture-file))))
-                (defun ap/org-mobile-pull ()
-                  (org-mobile-pull))
-                (setq org-mobile-watcher
-                      (file-notify-add-watch org-file '(change) #'ap/org-mobile-pull)))))))
+              (when file-notify--library
+                (let ((org-file (expand-file-name
+                                 (concat
+                                  (file-name-as-directory org-mobile-directory)
+                                  org-mobile-capture-file))))
+                  (defun ap/org-mobile-pull ()
+                    (org-mobile-pull))
+                  (setq org-mobile-watcher
+                        (file-notify-add-watch org-file '(change) #'ap/org-mobile-pull))))))))
 #+END_SRC
 
 * Programming