diff options
author | Alan Pearce | 2016-01-21 12:51:22 +0100 |
---|---|---|
committer | Alan Pearce | 2016-01-21 12:51:22 +0100 |
commit | 7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff (patch) | |
tree | 9561b0d46334f4c1b6061c8c05ac5e227e4bb32a | |
parent | 8e365f86d6b58d02496d556b97b75f1440ef63ff (diff) | |
download | nixfiles-7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff.tar.lz nixfiles-7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff.tar.zst nixfiles-7d194e3da6e9c9121c09ebd96c3b83f2ac12a8ff.zip |
Emacs: Check for file-notify support
-rw-r--r-- | tag-emacs/emacs.d/init.org | 17 |
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 |