From 7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 21 Jan 2016 12:51:22 +0100 Subject: Emacs: Check for file-notify support --- tag-emacs/emacs.d/init.org | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'tag-emacs') 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 -- cgit 1.4.1