emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Creating a link to a file using ID


From: Rainer M Krug
Subject: Re: [O] Creating a link to a file using ID
Date: Fri, 24 Apr 2015 08:48:29 +0200


Envoyé de mon iPhone

> Le 24 avr. 2015 à 00:10, Yuri Niyazov <address@hidden> a écrit :
> 
> I would like to link to a whole file (rather than a heading in that
> file), but instead of using the path+name, I would like to use an id,
> so that it survives renames.

I do not think this is easily possible, as I assume you are referring to a 
renaming of the external file which is done outside emacs. 

Nevertheless, there are ways of achieving this, which depend on the OS you are 
using. For Linux (and OSX) you could create a hardlink to your file. This 
hardlink always links to the file, irrespective if you rename your original 
file. You could then use the hardlink in your org file. 

Other option: use a custom function to identify the file based on the ID by 
using e.g. grep on a the directory where you expect the file to be. 

But I don' think this can easily be done. 

Hope this helps,

Rainer

> Is it possible to assign an ID to the
> whole buffer? I tried doing
> #+CUSTOM_ID:       A948A2E7-F4A0-4F77-8D7A-C6273DA7D734
> and
> #+ID:       A948A2E7-F4A0-4F77-8D7A-C6273DA7D734
> 
> but a link to such an ID results in an error when clicked. I am going
> to link to a heading in the file instead for now, but it would be nice
> to know if this is possible. Thanks!
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]