From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: how to make relative file links? Date: Tue, 05 Nov 2013 18:51:24 -0500 Message-ID: <87bo1yz9tv.fsf@alphaville.bos.redhat.com> References: <87d2meqz5q.fsf@pcbe13433.cern.ch> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdqPV-0005Jt-Bz for emacs-orgmode@gnu.org; Tue, 05 Nov 2013 18:51:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdqPP-00087d-2m for emacs-orgmode@gnu.org; Tue, 05 Nov 2013 18:51:49 -0500 Received: from plane.gmane.org ([80.91.229.3]:48058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdqPO-00086u-RQ for emacs-orgmode@gnu.org; Tue, 05 Nov 2013 18:51:42 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VdqPN-0003dy-1O for emacs-orgmode@gnu.org; Wed, 06 Nov 2013 00:51:41 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Nov 2013 00:51:41 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Nov 2013 00:51:41 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org David Belohrad 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:' , 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