On Thu, Aug 16, 2012 at 2:54 PM, Ken Mankoff <mank...@gmail.com> wrote: > Hi Marcel, > > On Wed, Aug 15, 2012 at 12:33 AM, Marcel van der Boom <mar...@hsdev.com> > wrote: >> Perhaps you will find https://gist.github.com/3111823 interesting. It >> contains a bit of code to do the org-mobile-push asynchronously (and >> notify me about it when done). This makes the push work in the >> background, in my case it can take quite a while, and not interfere >> with normal usage. >> > > That is a very useful snippet. Thank you for sharing. > > -k.
It took a bit of work to get that snippet working on my system, but it works well now. On the flip side, the following watches for incoming changes and automagically calls org-mobile-pull when needed... ;; http://stackoverflow.com/questions/3456782/emacs-lisp-how-to-monitor-ch$ (defun install-monitor (file secs) (run-with-timer 0 secs (lambda (f p) (unless (< p (second (time-since (elt (file-attributes f) 5)))) ;(message "File %s changed!" f))) (org-mobile-pull))) file secs)) (defvar monitor-timer (install-monitor "~/Dropbox/MobileOrg/mobileorg.org"$ "Check if file changed every 30 s.") -k.