I'd like to create a link inside an org-mode file to a source code file, say in C++. But I'd like the link to point to a possibly changing position in the file, so I want to use a unique identifier. For example, say the C++ file is as follows:

// {{{ 507ab9d0-d1a5-4fa9-97a9-d78a48a08c3d
<some content>
// }}}

I want to create a link that takes me to 507ab9d0-d1a5-4fa9-97a9-d78a48a08c3d. Can this be done in org-mode? I've been looking at org-id [1], but to the lay person, it does not seem to fit this use case.

[1] https://github.com/tkf/org-mode/blob/master/lisp/org-id.el


1 Answer 1


You can use a file link like this:


It should open the file and then search for the string you put in.


This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .