emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] how to express relative path for grandparent folder?


From: Nick Dokos
Subject: Re: [Orgmode] how to express relative path for grandparent folder?
Date: Tue, 07 Apr 2009 19:09:57 -0400

Nick Dokos <address@hidden> wrote:

> address@hidden <address@hidden> 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, address@hidden 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]