From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikael Fornius Subject: Re: [feature request] use relative path in the file set by org-agenda-files Date: Tue, 23 Mar 2010 11:30:07 +0100 Message-ID: <87sk7rnxe8.fsf@eee.lan> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nu1Js-0003pH-91 for emacs-orgmode@gnu.org; Tue, 23 Mar 2010 06:26:44 -0400 Received: from [140.186.70.92] (port=47664 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nu1Jm-0003ob-QS for emacs-orgmode@gnu.org; Tue, 23 Mar 2010 06:26:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nu1Jk-0007bN-Rz for emacs-orgmode@gnu.org; Tue, 23 Mar 2010 06:26:38 -0400 Received: from violet.abc.se ([62.80.200.155]:54103) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nu1Jk-0007Wo-If for emacs-orgmode@gnu.org; Tue, 23 Mar 2010 06:26:36 -0400 In-Reply-To: (zwz's message of "Tue, 23 Mar 2010 07:32:59 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: zwz Cc: emacs-orgmode@gnu.org --=-=-= I have made a small patch implementing the following behavior: With org-agenda-files = "/home/mfo/org/agenda", a filename. | Line in agenda-file | Expands to: | |------------------------+------------------------------| | $HOME/org/org-mode.org | "/home/mfo/org/org-mode.org" | | td/td.org | "/home/mfo/org/td/td.org" | | ~/org/test.org | "/home/mfo/org/test.org" | | scratch.org | "/home/mfo/org/scratch.org" | | /home/mfo/org/wep.org | "/home/mfo/org/wep.org" | | ../te.org | "/home/mfo/te.org" | |------------------------+------------------------------| Here is the patch to current git-head: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=org-read-agenda-file-list.patch Content-Description: org-read-agenda-file-list diff --git a/lisp/org.el b/lisp/org.el index 84bec4c..dad9293 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14672,8 +14672,10 @@ 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 () --=-=-= -- Mikael Fornius --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--