Created
February 10, 2013 11:59
-
-
Save markhepburn/4749358 to your computer and use it in GitHub Desktop.
Revisions
-
markhepburn renamed this gist
Feb 10, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
markhepburn created this gist
Feb 10, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ (defvar org-mobile-push-timer nil "Timer that `org-mobile-push-timer' used to reschedule itself, or nil.") (defun org-mobile-push-with-delay (secs) (when org-mobile-push-timer (cancel-timer org-mobile-push-timer)) (setq org-mobile-push-timer (run-with-idle-timer (* 1 secs) nil 'org-mobile-push))) (add-hook 'after-save-hook (lambda () (when (eq major-mode 'org-mode) (dolist (file (org-mobile-files-alist)) (if (string= (expand-file-name (car file)) (buffer-file-name)) (org-mobile-push-with-delay 30))) ))) (run-at-time "00:05" 86400 '(lambda () (org-mobile-push-with-delay 1))) ;; refreshes agenda file each day