Browse Source

Expand file names in org-agenda-files (external file case)

Patch by Mikael Fornius.
Carsten Dominik 15 years ago
parent
commit
42589b32c2
2 changed files with 9 additions and 2 deletions
  1. 4 0
      lisp/ChangeLog
  2. 5 2
      lisp/org.el

+ 4 - 0
lisp/ChangeLog

@@ -1,5 +1,9 @@
 2010-03-24  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el (org-read-agenda-file-list): Interpret file names
+	relative to org-directory and allow environment variables and
+	"~".
+
 	* org-latex.el (org-export-latex-special-chars): Allow a
 	parenthesis before an exponent or subscript.
 

+ 5 - 2
lisp/org.el

@@ -14672,8 +14672,11 @@ the buffer and restores the previous window configuration."
   (when (stringp org-agenda-files)
     (with-temp-buffer
       (insert-file-contents org-agenda-files)
-      (org-split-string (buffer-string) "[ \t\r\n]*?[\r\n][ \t\r\n]*"))))
-
+      (mapcar
+       (lambda (f)
+	 (expand-file-name (substitute-in-file-name f)
+			   (file-name-directory org-agenda-files)))
+       (org-split-string (buffer-string) "[ \t\r\n]*?[\r\n][ \t\r\n]*")))))
 
 ;;;###autoload
 (defun org-cycle-agenda-files ()