emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: how to express relative path for grandparent folder?
Date: Tue, 07 Apr 2009 19:09:57 -0400	[thread overview]
Message-ID: <21766.1239145797@alphaville.usa.hp.com> (raw)
In-Reply-To: Message from Nick Dokos <nicholas.dokos@hp.com> of "Tue, 07 Apr 2009 18:33:57 EDT." <21092.1239143637@alphaville.usa.hp.com>

Nick Dokos <nicholas.dokos@hp.com> wrote:

> goodhei8@gmail.com <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

  reply	other threads:[~2009-04-07 23:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 13:37 When exporting a subtree, headline levels are now relative to parent - but css - config is unchanged Rainer Stengele
2009-04-06 17:25 ` how to express relative path for grandparent folder? goodhei8
2009-04-06 17:41   ` Manish
2009-04-07 21:53     ` goodhei8
2009-04-07 22:33       ` Nick Dokos
2009-04-07 23:09         ` Nick Dokos [this message]
2009-04-07 22:39     ` goodhei8
2009-04-08 15:59 ` When exporting a subtree, headline levels are now relative to parent - but css - config is unchanged Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21766.1239145797@alphaville.usa.hp.com \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: how to express relative path for grandparent folder?' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).