emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: pinard@iro.umontreal.ca (François Pinard)
To: emacs-orgmode@gnu.org
Subject: Agenda buffer and relative links
Date: Thu, 05 Jan 2012 22:39:32 -0500	[thread overview]
Message-ID: <87zke1ebyj.fsf@iro.umontreal.ca> (raw)

Hi again, Org people.

When Org mode defines a link for me, it sometimes changes it so it
becomes relative.  If within the file ~/fp/notes/notes.org, I wanted to
create the link:

[[file:~/fp/notes/VCS/GitHub.org][GitHub]]

Org mode really creates:

[[file:VCS/GitHub.org][GitHub]]

I presume this is because of the location of "notes.org" rather than
because of the value of org-directory, which happens to be "~/fp/notes".
This is OK in general, but not always.

For example, doing "C-a a a" today, I get this line among others
(squeezed so it fits in this message):

 notes: Scheduled: TODO *[[file:Informatique/Entretien.org][Entretien]]

and clicking on the displayed "Entretien" link yields a white window.

The problem is that the *Org Agenda* buffer is associated with the "~/"
directory, and the relativized name is then wrong.

Because all my agenda-files happen to be directly within org-directory,
a sufficient counter-measure is to have this line in my ~/.emacs file:

(add-hook 'org-agenda-mode-hook (lambda () (cd org-directory)))

While it solves my problem, I have feeling that there is something
deeper which might likely affect many Org mode users, and for which I
have no general solution to offer.  In the worst scenario, the solution
might be to never relativize links, but maybe someone would have a
better idea about this.  In any case, I decided to report it.

François

             reply	other threads:[~2012-01-06  3:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06  3:39 François Pinard [this message]
2012-01-06  4:43 ` Agenda buffer and relative links Nick Dokos
2012-01-06 11:55   ` François Pinard
2012-01-06 13:16     ` Sebastien Vauban
2012-01-07 17:39       ` François Pinard
2012-01-07 19:26         ` François Pinard
2012-01-07 20:58           ` Sebastien Vauban

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=87zke1ebyj.fsf@iro.umontreal.ca \
    --to=pinard@iro.umontreal.ca \
    --cc=emacs-orgmode@gnu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public 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).