Created
October 28, 2015 16:08
-
-
Save lislon/c8fa07209de17d08da64 to your computer and use it in GitHub Desktop.
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 characters
| (defvar my-org-mobile-sync-timer nil) | |
| (defvar my-org-mobile-sync-secs (* 60 20)) | |
| (defun my-org-mobile-sync-pull-and-push () | |
| (require 'org) | |
| (org-mobile-pull) | |
| (org-mobile-push) | |
| (when (fboundp 'sauron-add-event) | |
| (sauron-add-event 'my 3 "Called org-mobile-pull and org-mobile-push"))) | |
| (defun my-org-mobile-sync-start () | |
| "Start automated `org-mobile-push'" | |
| (interactive) | |
| (setq my-org-mobile-sync-timer | |
| (run-with-idle-timer my-org-mobile-sync-secs t | |
| 'my-org-mobile-sync-pull-and-push))) | |
| (defun my-org-mobile-sync-stop () | |
| "Stop automated `org-mobile-push'" | |
| (interactive) | |
| (cancel-timer my-org-mobile-sync-timer)) | |
| (my-org-mobile-sync-start) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment