How can I wrap that to only run when the active buffer is in Org Mode?

(run-at-time "00:10" 10 (lambda () (if (eq major-mode 'org-mode) (org-mobile-push))))

That works well. After reading run-at-time documentation, the "00:10" isn't ideal. I now use the following, which syncs files every 60 seconds starting 1 minute after launching emacs:

(run-at-time "1 min" 60 (lambda () (if (eq major-mode 
'org-mode)(org-mobile-push))))

Thanks,

  -k.

Reply via email to