Skip to content

Instantly share code, notes, and snippets.

@markhepburn
Created February 10, 2013 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markhepburn/4749363 to your computer and use it in GitHub Desktop.
Save markhepburn/4749363 to your computer and use it in GitHub Desktop.
(org-mobile-pull) ;; run org-mobile-pull at startup
(defun install-monitor (file secs)
(run-with-timer
0 secs
(lambda (f p)
(unless (< p (second (time-since (elt (file-attributes f) 5))))
(org-mobile-pull)))
file secs))
(install-monitor (file-truename
(concat
(file-name-as-directory org-mobile-directory)
org-mobile-capture-file))
5)
;; Do a pull every 5 minutes to circumvent problems with timestamping
;; (ie. dropbox bugs)
(run-with-timer 0 (* 5 60) 'org-mobile-pull)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment