summary refs log tree commit diff stats
path: root/tag-emacs/emacs.d
diff options
context:
space:
mode:
authorAlan Pearce2015-08-28 17:31:25 +0200
committerAlan Pearce2015-08-28 17:31:25 +0200
commitc8a0c2118957c9b9fdaf060308a3920d994aa0d9 (patch)
tree02f02afbf2daf7034926c4ddba93baedfe6efacf /tag-emacs/emacs.d
parent5c3bbde2d1bed275bb1687198e712838bb9cddd7 (diff)
parent401e4791ec7e666af4b9f219ab5055bb1027fdbf (diff)
downloaddotfiles-c8a0c2118957c9b9fdaf060308a3920d994aa0d9.tar.lz
dotfiles-c8a0c2118957c9b9fdaf060308a3920d994aa0d9.tar.zst
dotfiles-c8a0c2118957c9b9fdaf060308a3920d994aa0d9.zip
Merge branch 'master' of github.com:alanpearce/dotfiles
Diffstat (limited to 'tag-emacs/emacs.d')
-rw-r--r--tag-emacs/emacs.d/init.org81
1 files changed, 40 insertions, 41 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 96c3531..f6c4cf7 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -1529,46 +1529,6 @@ Org is wünderbar.
                     (if (looking-at org-outline-regexp) (goto-char (1- (match-end 0))))
                     (if (looking-at (concat " +" org-todo-regexp "\\( +\\|[ \t]*$\\)"))
                         (org-todo "STARTED")))))
-
-              (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= (file-truename (expand-file-name (car file)))
-                                           (file-truename (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
-              (org-mobile-pull) ;; run org-mobile-pull at startup
-
-              (defun install-monitor (file secs)
-                (run-with-timer
-                 0 secs
-                 (lambda (f p)
-                   (unless (< p (second (time-since (elt (file-attributes f) 5))))
-                     (org-mobile-pull)))
-                 file secs))
-
-              (install-monitor (file-truename
-                                (concat
-                                 (file-name-as-directory org-mobile-directory)
-                                 org-mobile-capture-file))
-                               5)
-
-              ;; Do a pull every 5 minutes to circumvent problems with timestamping
-              ;; (ie. dropbox bugs)
-              (run-with-timer 0 (* 5 60) 'org-mobile-pull)))
 #+END_SRC
 
 **** org-babel
@@ -1609,7 +1569,46 @@ I can use this to keep a journal.  I should use it.
     :defer t
     :config (progn
               (setq org-mobile-directory "~/Mobile/Org"
-                    org-mobile-inbox-for-pull "~/Mobile/Org/from-mobile.org")))
+                    org-mobile-inbox-for-pull "~/Mobile/Org/from-mobile.org")
+              (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= (file-truename (expand-file-name (car file)))
+                                           (file-truename (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
+              (org-mobile-pull) ;; run org-mobile-pull at startup
+
+              (defun install-monitor (file secs)
+                (run-with-timer
+                 0 secs
+                 (lambda (f p)
+                   (unless (< p (second (time-since (elt (file-attributes f) 5))))
+                     (org-mobile-pull)))
+                 file secs))
+
+              (install-monitor (file-truename
+                                (concat
+                                 (file-name-as-directory org-mobile-directory)
+                                 org-mobile-capture-file))
+                               5)
+
+              ;; Do a pull every 5 minutes to circumvent problems with timestamping
+              ;; (ie. dropbox bugs)
+              (run-with-timer 0 (* 5 60) 'org-mobile-pull)))))
 #+END_SRC
 
 * Programming