From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: how to express relative path for grandparent folder? Date: Tue, 07 Apr 2009 19:09:57 -0400 Message-ID: <21766.1239145797@alphaville.usa.hp.com> References: <49DA3AF2.8000306@gmail.com> <49DBCB50.6040101@gmail.com> <21092.1239143637@alphaville.usa.hp.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrKS7-0000tQ-IH for emacs-orgmode@gnu.org; Tue, 07 Apr 2009 19:11:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrKS3-0000so-4x for emacs-orgmode@gnu.org; Tue, 07 Apr 2009 19:11:35 -0400 Received: from [199.232.76.173] (port=35247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrKS2-0000sl-VQ for emacs-orgmode@gnu.org; Tue, 07 Apr 2009 19:11:31 -0400 Received: from g4t0015.houston.hp.com ([15.201.24.18]:7744) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LrKS2-0002UA-Ir for emacs-orgmode@gnu.org; Tue, 07 Apr 2009 19:11:30 -0400 In-Reply-To: Message from Nick Dokos of "Tue, 07 Apr 2009 18:33:57 EDT." <21092.1239143637@alphaville.usa.hp.com> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org Nick Dokos wrote: > goodhei8@gmail.com wrote: > > > no, it is not working. > > Since my grandparent folder is out of home folder(~) > > > > Any one know it? > > > > Thanks > > > > Manish wrote: > > > On Mon, Apr 6, 2009 at 10:55 PM, goodhei8@gmail.com wrote: > > > > > >> I tried ../.., does not work. ../ works for parents folder. > > >> ../.. does not work, because emacs or "setq org-agenda-files (list"? how to > > >> correct it. > > >> (setq org-agenda-files (list "../../Plans/PhD.org" > > >> "../../Plans/Others.org" > > >> )) > > >> > > >> > > > > > > Does variable org-directory help? > > > > > > > > What exactly is not working? The main problem with ../../Plans/etc is > that it's a relative pathname: *it depends on your current working > directory (CWD)*, so whether the agenda files can be found will depend > on what your CWD is - a rather undesirable state of affairs. > > If you want to *initialize* the agenda files list, you can do something > like this in your .emacs: > > (setq org-agenda-files (mapcar (function expand-file-name) (list "../../Plans/PhD.org" etc))) > > expand-file-name will convert the relative path names to absolute path names, > so they can be found later on no matter what your CWD is. > > Does this help? > It doesn't - although the diagnosis is correct, the cure is not: the pathnames are expanded relative to the directory where emacs is started. So the only way is to use absolute path names (which is what you did by prefixing them with ~ - they are now relative to a fixed place, rather than to a floating one). Sorry about that. Nick