-
Notifications
You must be signed in to change notification settings - Fork 227
A: Before posting any issues, please make sure that you have set up org-mobile-push correctly (see question below).
A: The org-mobile-push command will copy all files that are included in the variable org-mobile-files to a directory specified by org-mobile-directory. It will also create three additional files called checksum.dat, index.org and agendas.org.
Agendas.org contains all the agendas specified in org-mobile-agendas. The idea is that Emacs will generate the agendas once in a while, instead of MobileOrg having to implement all of the features of org-mode.
Checksums.dat are simply the checksum of all files that will be synchronized. MobileOrg will use those to determine what files where modified since the last synchronization, thereby speeding up the sync and reducing bandwidth consumption.
Index.org contains information about the org files, like a list of tags, all files and their aliases, all todo keywords and whether a todo keyword is active or done.
In addition, MobileOrg will generate so called "edit nodes" when editing nodes in the outline. This makes it possible to edit entries in MobileOrg and synchronize the changes to Emacs in a safe way.
MobileOrg makes use of both checksums.dat and index.org. Without them, synchronization will not work!
More details on how to set up org-mobile-push can be found here, or just type alt-x customize-group Enter org-mobile in Emacs.
A: MobileOrg stores the information contained in org files into a database. To view files, they first need to be transfered into that database. This is what the synchronizers do. It is currently not possible to edit files directly and will most likely not be in the near future.
A: The calendar synchronizer will currently only update the calendar when files are changed through synchronization or if they are removed. The changes won't show up immediately when changing calendar options in the settings menu. When changing any of the options, such as enabling the calendar, press "Clear Database" in the settings menu and synchronize again.
A: The code below will check if an org file that was saved is in the mobile agenda list and if it is the case it will set an idle timer to schedule a sync 30 seconds in the future. This will make it possible to do a chain of edits in several file, resulting in Emacs running push only once after it has been idle for the specified number of seconds.
(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
A: To get org-mode to pull at startup and monitor the file mobileorg writes to, add the following to your Emacs configuration:
(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)