Fix relative path creation when making a file link
commitacb8bcfba7023b362a7fbe9615bb167a046ad26d
authorCarsten Dominik <carsten.dominik@gmail.com>
Tue, 13 Jul 2010 10:53:47 +0000 (13 12:53 +0200)
committerCarsten Dominik <carsten.dominik@gmail.com>
Tue, 13 Jul 2010 11:35:50 +0000 (13 13:35 +0200)
treeeb1c17dec1fc84f1249cef7902db009883bfa745
parentceb63ae94eb96eb2d922c417e52b3339a7b4f75c
Fix relative path creation when making a file link

* lisp/org.el (org-insert-link): Correctly determine if we should use
a relative path.

Aidan Gauland writes:

> If I create a link with C-c C-l and give it a relative "file:" link, a
> link is created with an absolute path.  For example, C-c C-l
> file:../foo.org <RET> foo puts
> [[file:~/path/to/working-directory/foo.org][foo]] in the buffer.  I was
> expecting [[file:../foo.org][foo]].
lisp/org.el