summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2016-01-21 12:51:22 +0100
committerAlan Pearce2016-01-21 12:51:22 +0100
commit7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff (patch)
tree9561b0d46334f4c1b6061c8c05ac5e227e4bb32a /tag-emacs
parent8e365f86d6b58d02496d556b97b75f1440ef63ff (diff)
downloaddotfiles-7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff.tar.lz
dotfiles-7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff.tar.zst
dotfiles-7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff.zip
Emacs: Check for file-notify support
Diffstat (limited to 'tag-emacs')
-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 eb432cf..193796a 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