emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Agenda buffer and relative links
@ 2012-01-06  3:39 François Pinard
  2012-01-06  4:43 ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: François Pinard @ 2012-01-06  3:39 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-07 20:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-06  3:39 Agenda buffer and relative links François Pinard
2012-01-06  4:43 ` 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

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).