You can clone with
;; Show a notification when a push has been completed
(defun notify-push (result)
:title "Push complete"
:body (format "Org-mobile-push: %s" result)
;; Fork the work of pushing to mobile
(defun fork-org-push-mobile ()
;; What to do in the child process
; What to do when it finishes
;; Define a timer variable
(defvar org-mobile-push-timer nil
"Timer that `org-mobile-push-timer' used to reschedule itself, or nil.")
;; Push to mobile when the idle timer runs out
(defun org-mobile-push-with-delay (secs)
(* 1 secs) nil 'fork-org-push-mobile)))
;; After saving files, start a 30 seconds idle timer after which we
;; are going to push
(when (eq major-mode 'org-mode)
(dolist (file (org-mobile-files-alist))
(if (string= (expand-file-name (car file)) (buffer-file-name))
;; At least run it once a day, but no need for a delay this time
(run-at-time "00:05" 86400 '(lambda () (org-mobile-push-with-delay 1)))
This is great! Thanks for sharing. I'm running into an issue with the after save hook, I'm getting the error "Symbol's function definition is void: org-mobile-files-alist". Do you have any suggestions?
Nice work--up and running like a charm!