* how to make relative file links?
@ 2013-11-05 22:09 David Belohrad
2013-11-05 23:51 ` Nick Dokos
0 siblings, 1 reply; 8+ messages in thread
From: David Belohrad @ 2013-11-05 22:09 UTC (permalink / raw)
To: org-mode Mailinglist
Dear all,
i've just noticed one annoying thing. When I specify the relative file
link by org-insert-link, then I specify 'file:' <enter>, then i specify
filename with relative path, the function converts the relative path to
absolute path. so when i move my org files into another location,
well...
is there any way how to tell to org-store-link (and as well to %a in
org-capture templates) to specify link path relative to the file the
link is stored in?
respectively: if file contains many links, how can i assure file: links
portability when entire org tree changes location?
many thanks
david
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to make relative file links?
2013-11-05 22:09 how to make relative file links? David Belohrad
@ 2013-11-05 23:51 ` Nick Dokos
2013-11-06 7:52 ` David Belohrad
2013-11-06 7:57 ` David Belohrad
0 siblings, 2 replies; 8+ messages in thread
From: Nick Dokos @ 2013-11-05 23:51 UTC (permalink / raw)
To: emacs-orgmode
David Belohrad <david@belohrad.ch> writes:
> Dear all,
>
> i've just noticed one annoying thing. When I specify the relative file
> link by org-insert-link, then I specify 'file:' <enter>, then i specify
> filename with relative path, the function converts the relative path to
> absolute path. so when i move my org files into another location,
> well...
>
> is there any way how to tell to org-store-link (and as well to %a in
> org-capture templates) to specify link path relative to the file the
> link is stored in?
>
> respectively: if file contains many links, how can i assure file: links
> portability when entire org tree changes location?
>
> many thanks
>
> david
Does this help?
,----
| org-link-file-path-type is a variable defined in `org.el'.
| Its value is adaptive
|
| Documentation:
| How the path name in file links should be stored.
| Valid values are:
|
| relative Relative to the current directory, i.e. the directory of the file
| into which the link is being inserted.
| absolute Absolute path, if possible with ~ for home directory.
| noabbrev Absolute path, no abbreviation of home directory.
| adaptive Use relative path for files in the current directory and sub-
| directories of it. For other files, use an absolute path.
|
| You can customize this variable.
|
| [back]
`----
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to make relative file links?
2013-11-05 23:51 ` Nick Dokos
@ 2013-11-06 7:52 ` David Belohrad
2013-11-20 3:18 ` Samuel Wales
2013-11-06 7:57 ` David Belohrad
1 sibling, 1 reply; 8+ messages in thread
From: David Belohrad @ 2013-11-06 7:52 UTC (permalink / raw)
To: Nick Dokos, emacs-orgmode
i have it set to adaptive, but always finish with absolute paths, even
if the link is into sub-directory of directory, where the current org file is.
Nick Dokos <ndokos@gmail.com> writes:
> David Belohrad <david@belohrad.ch> writes:
>
>> Dear all,
>>
>> i've just noticed one annoying thing. When I specify the relative file
>> link by org-insert-link, then I specify 'file:' <enter>, then i specify
>> filename with relative path, the function converts the relative path to
>> absolute path. so when i move my org files into another location,
>> well...
>>
>> is there any way how to tell to org-store-link (and as well to %a in
>> org-capture templates) to specify link path relative to the file the
>> link is stored in?
>>
>> respectively: if file contains many links, how can i assure file: links
>> portability when entire org tree changes location?
>>
>> many thanks
>>
>> david
>
> Does this help?
>
> ,----
> | org-link-file-path-type is a variable defined in `org.el'.
> | Its value is adaptive
> |
> | Documentation:
> | How the path name in file links should be stored.
> | Valid values are:
> |
> | relative Relative to the current directory, i.e. the directory of the file
> | into which the link is being inserted.
> | absolute Absolute path, if possible with ~ for home directory.
> | noabbrev Absolute path, no abbreviation of home directory.
> | adaptive Use relative path for files in the current directory and sub-
> | directories of it. For other files, use an absolute path.
> |
> | You can customize this variable.
> |
> | [back]
> `----
>
> Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to make relative file links?
2013-11-05 23:51 ` Nick Dokos
2013-11-06 7:52 ` David Belohrad
@ 2013-11-06 7:57 ` David Belohrad
2013-11-06 8:43 ` paul-sqPYmOVXOov10XsdtD+oqA
1 sibling, 1 reply; 8+ messages in thread
From: David Belohrad @ 2013-11-06 7:57 UTC (permalink / raw)
To: Nick Dokos, emacs-orgmode
ups, second test. it really works. I have messed up settings on two
computers, one had adaptive and one absolute setting of this variable.
sorry for the mess.
d..
Nick Dokos <ndokos@gmail.com> writes:
> David Belohrad <david@belohrad.ch> writes:
>
>> Dear all,
>>
>> i've just noticed one annoying thing. When I specify the relative file
>> link by org-insert-link, then I specify 'file:' <enter>, then i specify
>> filename with relative path, the function converts the relative path to
>> absolute path. so when i move my org files into another location,
>> well...
>>
>> is there any way how to tell to org-store-link (and as well to %a in
>> org-capture templates) to specify link path relative to the file the
>> link is stored in?
>>
>> respectively: if file contains many links, how can i assure file: links
>> portability when entire org tree changes location?
>>
>> many thanks
>>
>> david
>
> Does this help?
>
> ,----
> | org-link-file-path-type is a variable defined in `org.el'.
> | Its value is adaptive
> |
> | Documentation:
> | How the path name in file links should be stored.
> | Valid values are:
> |
> | relative Relative to the current directory, i.e. the directory of the file
> | into which the link is being inserted.
> | absolute Absolute path, if possible with ~ for home directory.
> | noabbrev Absolute path, no abbreviation of home directory.
> | adaptive Use relative path for files in the current directory and sub-
> | directories of it. For other files, use an absolute path.
> |
> | You can customize this variable.
> |
> | [back]
> `----
>
> Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to make relative file links?
2013-11-06 7:57 ` David Belohrad
@ 2013-11-06 8:43 ` paul-sqPYmOVXOov10XsdtD+oqA
0 siblings, 0 replies; 8+ messages in thread
From: paul-sqPYmOVXOov10XsdtD+oqA @ 2013-11-06 8:43 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
David Belohrad <david-rZamiVn3bvgfv37vnLkPlQ@public.gmane.org> writes:
> ups, second test. it really works. I have messed up settings on two
> computers...
I use Dropbox (there are alternatives) for an elisp file with all my
emacs settings so that I always loading the same settings. A minimal
.emacs.d/init.el loads this file on each machine, and also has any
settings that are strictly necessary for just that machine.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to make relative file links?
2013-11-06 7:52 ` David Belohrad
@ 2013-11-20 3:18 ` Samuel Wales
2013-11-20 3:48 ` Nick Dokos
0 siblings, 1 reply; 8+ messages in thread
From: Samuel Wales @ 2013-11-20 3:18 UTC (permalink / raw)
To: David Belohrad; +Cc: Nick Dokos, emacs-orgmode
I find that capture creates an absolute file link regardless of the variable.
On 11/6/13, David Belohrad <david@belohrad.ch> wrote:
>> | org-link-file-path-type is a variable defined in `org.el'.
>> | Its value is adaptive
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to make relative file links?
2013-11-20 3:18 ` Samuel Wales
@ 2013-11-20 3:48 ` Nick Dokos
2013-11-20 4:27 ` Samuel Wales
0 siblings, 1 reply; 8+ messages in thread
From: Nick Dokos @ 2013-11-20 3:48 UTC (permalink / raw)
To: emacs-orgmode
Samuel Wales <samologist@gmail.com> writes:
> I find that capture creates an absolute file link regardless of the variable.
>
That's correct: the variable is only used by org-insert-link. Capture
uses org-store-link which stores an absolute link.
Since you can initiate a capture from an arbitrary location in the file
system and store the capture in some other arbitrary location, it would
be a bit more difficult to use anything but absolute links (and things
like symbolic links might make it quite a bit more difficult). It
probably could be done, but I'm not sure it's worth it.
> On 11/6/13, David Belohrad <david@belohrad.ch> wrote:
>>> | org-link-file-path-type is a variable defined in `org.el'.
>>> | Its value is adaptive
>
>
--
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: how to make relative file links?
2013-11-20 3:48 ` Nick Dokos
@ 2013-11-20 4:27 ` Samuel Wales
0 siblings, 0 replies; 8+ messages in thread
From: Samuel Wales @ 2013-11-20 4:27 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
Actually, I wanted a link to a headline in the same file.
On 11/19/13, Nick Dokos <ndokos@gmail.com> wrote:
> Samuel Wales <samologist@gmail.com> writes:
>
>> I find that capture creates an absolute file link regardless of the
>> variable.
>>
>
> That's correct: the variable is only used by org-insert-link. Capture
> uses org-store-link which stores an absolute link.
>
> Since you can initiate a capture from an arbitrary location in the file
> system and store the capture in some other arbitrary location, it would
> be a bit more difficult to use anything but absolute links (and things
> like symbolic links might make it quite a bit more difficult). It
> probably could be done, but I'm not sure it's worth it.
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-11-20 4:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-05 22:09 how to make relative file links? David Belohrad
2013-11-05 23:51 ` Nick Dokos
2013-11-06 7:52 ` David Belohrad
2013-11-20 3:18 ` Samuel Wales
2013-11-20 3:48 ` Nick Dokos
2013-11-20 4:27 ` Samuel Wales
2013-11-06 7:57 ` David Belohrad
2013-11-06 8:43 ` paul-sqPYmOVXOov10XsdtD+oqA
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).