;; Init for org-mode (require 'org-install) (require 'org-pomodoro) (add-hook 'org-mode-hook (lambda () (turn-on-auto-fill))) (setq org-default-notes-file "~/org/notes.org") (global-set-key (kbd "C-c a") 'org-agenda) (global-set-key (kbd "C-c c") 'org-capture) (setq org-capture-templates '(("t" "Todo" entry (file+headline "~/org/notes.org" "Tasks") "* TODO %?\n %u\n %a") ("i" "Idea" entry (file+headline "~/org/notes.org" "Ideas") "* IDEA %?\n %u") ("e" "MailTo" entry (file+headline "~/org/notes.org" "E-mails") "* TODO mailto:%?"))) (setq org-clock-persist 'history) (org-clock-persistence-insinuate) (setq org-mobile-directory "~/coxeter/mobileOrg") ;; found this in http://blog.zhengdong.me/2012/06/16/org-my-life/ (defvar org-mobile-sync-timer nil) (defvar org-mobile-sync-idle-secs (* 60 4)) (defun org-mobile-sync () (interactive) (org-mobile-pull) (org-mobile-push)) (defun org-mobile-sync-enable () "enable mobile org idle sync" (interactive) (setq org-mobile-sync-timer (run-with-idle-timer org-mobile-sync-idle-secs t 'org-mobile-sync))); (defun org-mobile-sync-disable () "disable mobile org idle sync" (interactive) (cancel-timer org-mobile-sync-timer)) (org-mobile-sync-enable) ;;----------------------------------------------------------