diff --git a/doc/ChangeLog b/doc/ChangeLog index 5e318ad10..66c0c5141 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2009-10-18 Carsten Dominik + + * org.texi (Pushing to MobileOrg): Mention that `org-directory' + should be set. + 2009-10-14 Carsten Dominik * org.texi (Agenda commands): Document that SPC is a filter for diff --git a/doc/org.texi b/doc/org.texi index 538aba8fa..9c5b4f4d9 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -11735,19 +11735,20 @@ from the WebDAV directory using @file{scp}. This operation copies all files currently listed in @code{org-mobile-files} to the directory @code{org-mobile-directory}. By default this list contains all agenda files (as listed in @code{org-agenda-files}), but additional files -can be included by customizing @code{org-mobiles-files}. The push operation -also creates (in the same directory) a special Org file @file{agendas.org}. -This file is an Org-mode style outline, containing every custom agenda view -defined by the user. While creating the agendas, Org-mode will -force@footnote{See the variable @code{org-mobile-force-id-on-agenda-items}.} -an ID property on all entries referenced by the agendas, so that these -entries can be uniquely identified if @i{MobileOrg} flags them for further -action. Finally, Org writes the file @file{index.org}, containing links to -all other files. If @i{MobileOrg} is configured to request this file from -the WebDAV server, all agendas and Org files will be downloaded to the -device. To speed up the download, MobileOrg will only read files whose -checksums@footnote{stored automatically in the file @file{checksums.dat}} -have changed. +can be included by customizing @code{org-mobiles-files}. File names will be +staged with path relative to @code{org-directory}, so all files should be +inside this directory. The push operation also creates (in the same +directory) a special Org file @file{agendas.org}. This file is an Org-mode +style outline, containing every custom agenda view defined by the user. +While creating the agendas, Org-mode will force@footnote{See the variable +@code{org-mobile-force-id-on-agenda-items}.} an ID property on all entries +referenced by the agendas, so that these entries can be uniquely identified +if @i{MobileOrg} flags them for further action. Finally, Org writes the file +@file{index.org}, containing links to all other files. If @i{MobileOrg} is +configured to request this file from the WebDAV server, all agendas and Org +files will be downloaded to the device. To speed up the download, MobileOrg +will only read files whose checksums@footnote{stored automatically in the +file @file{checksums.dat}} have changed. @node Pulling from MobileOrg, , Pushing to MobileOrg, MobileOrg @section Pulling from MobileOrg diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3ae6f8eee..b029b8e7d 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2009-10-18 Carsten Dominik + + * org-mobile.el (org-mobile-locate-entry): Interpret files + relative to org-directory. + (org-mobile-inbox-for-pull): Document the best location for this + file. + (org-mobile-check-setup): Verify `org-directory'. + 2009-10-17 Carsten Dominik * org-clock.el (org-clock-resolve, org-resolve-clocks) diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index c46c51b77..113e1a922 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -68,7 +68,8 @@ org-agenda-text-search-extra-files "The file where captured notes and flags will be appended to. During the execution of `org-mobile-pull', the file `org-mobile-capture-file' will be emptied it's contents have -been appended to the file given here." +been appended to the file given here. This file should be in +`org-directory', and not in the staging area or on the web server." :group 'org-mobile :type 'file) @@ -236,18 +237,25 @@ agenda view showing the flagged items." (defun org-mobile-check-setup () "Check if org-mobile-directory has been set up." - (when (or (not org-mobile-directory) - (not (stringp org-mobile-directory)) - (not (string-match "\\S-" org-mobile-directory)) - (not (file-exists-p org-mobile-directory)) - (not (file-directory-p org-mobile-directory))) + (unless (and org-directory + (stringp org-directory) + (string-match "\\S-" org-directory) + (file-exists-p org-directory) + (file-directory-p org-directory)) + (error + "Please set `org-directory' to the directory where your org files live")) + (unless (and org-mobile-directory + (stringp org-mobile-directory) + (string-match "\\S-" org-mobile-directory) + (file-exists-p org-mobile-directory) + (file-directory-p org-mobile-directory)) (error "Variable `org-mobile-directory' must point to an existing directory")) - (when (or (not org-mobile-inbox-for-pull) - (not (stringp org-mobile-inbox-for-pull)) - (not (string-match "\\S-" org-mobile-inbox-for-pull)) - (not (file-exists-p - (file-name-directory org-mobile-inbox-for-pull)))) + (unless (and org-mobile-inbox-for-pull + (stringp org-mobile-inbox-for-pull) + (string-match "\\S-" org-mobile-inbox-for-pull) + (file-exists-p + (file-name-directory org-mobile-inbox-for-pull))) (error "Variable `org-mobile-inbox-for-pull' must point to a file in an existing directory"))) @@ -728,6 +736,7 @@ as a string." (path (match-string 2 link)) (table '((?: . "%3a") (?\[ . "%5b") (?\] . "%5d") (?/ . "%2f")))) (setq file (org-link-unescape file table)) + (setq file (expand-file-name file org-directory)) (setq path (mapcar (lambda (x) (org-link-unescape x table)) (org-split-string path "/"))) (org-find-olp (cons file path))))))