Fix bug with mobile files

Pushing failed when `agenda-file' is in `org-agenda-text-search-extra-files'.
This commit is contained in:
Carsten Dominik 2009-11-05 12:10:32 +01:00
parent e139fa1662
commit d02cde236c
2 changed files with 26 additions and 13 deletions

View File

@ -1,3 +1,9 @@
2009-11-05 Carsten Dominik <carsten.dominik@gmail.com>
* org-mobile.el (org-mobile-files-alist): Make it work when
`agenda-archives' is included in
`org-agenda-text-search-extra-files'.
2009-11-05 John Wiegley <jwiegley@gmail.com>
* org-clock.el (org-resolve-clocks-if-idle): Another fix to the

View File

@ -177,19 +177,26 @@ using `rsync' or `scp'.")
(defun org-mobile-files-alist ()
"Expand the list in `org-mobile-files' to a list of existing files."
(let* ((files
(apply 'append (mapcar
(lambda (f)
(cond
((eq f 'org-agenda-files) (org-agenda-files t))
((eq f 'org-agenda-text-search-extra-files)
org-agenda-text-search-extra-files)
((and (stringp f) (file-directory-p f))
(directory-files f 'full "\\.org\\'"))
((and (stringp f) (file-exists-p f))
(list f))
(t nil)))
org-mobile-files)))
(let* ((include-archives
(and (member 'org-agenda-text-search-extra-files org-mobile-files)
(member 'agenda-archives org-agenda-text-search-extra-files)))
(files
(apply 'append
(mapcar
(lambda (f)
(cond
((eq f 'org-agenda-files) (org-agenda-files
t include-archives))
((eq f 'org-agenda-text-search-extra-files)
(delq 'agenda-archives
(copy-sequence
org-agenda-text-search-extra-files)))
((and (stringp f) (file-directory-p f))
(directory-files f 'full "\\.org\\'"))
((and (stringp f) (file-exists-p f))
(list f))
(t nil)))
org-mobile-files)))
(orgdir-uname (file-name-as-directory (file-truename org-directory)))
(orgdir-re (concat "\\`" (regexp-quote orgdir-uname)))
uname seen rtn file link-name)