* Creating a link to a file using ID
@ 2015-04-23 22:10 Yuri Niyazov
2015-04-24 6:48 ` Rainer M Krug
0 siblings, 1 reply; 2+ messages in thread
From: Yuri Niyazov @ 2015-04-23 22:10 UTC (permalink / raw
To: emacs-orgmode@gnu.org
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. 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!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Creating a link to a file using ID
2015-04-23 22:10 Creating a link to a file using ID Yuri Niyazov
@ 2015-04-24 6:48 ` Rainer M Krug
0 siblings, 0 replies; 2+ messages in thread
From: Rainer M Krug @ 2015-04-24 6:48 UTC (permalink / raw
To: Yuri Niyazov; +Cc: emacs-orgmode@gnu.org
Envoyé de mon iPhone
> Le 24 avr. 2015 à 00:10, Yuri Niyazov <yuri.niyazov@gmail.com> 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!
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-24 6:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 22:10 Creating a link to a file using ID Yuri Niyazov
2015-04-24 6:48 ` Rainer M Krug
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.