I think you need to do it like this:


#+BEGIN_SRC test.ml -r

(* Object projection functions  *) (ref:opf)


#+END_SRC


[[file:2020-02-05.org::(opf)]]

The -r in the header removes the coderef when you run it.

John

-----------------------------------
Professor John Kitchin 
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803


On Thu, Feb 6, 2020 at 9:48 AM Alan Schmitt <alan.schmitt@polytechnique.org> wrote:
Hello,

I'm trying to create an org link to a specific place in an OCaml file. I
thought I would use some specific target in an OCaml comment, but it
does not work.

Here is an OCaml comment:

(* Object projection functions *)

Here is the link create by `org-store-link` (I put it here with no
description)

[[file:~/work/jsexplain/jsexplain/jsref/JsSyntax.ml::(* Object projection functions *)]]

When I try to follow this link, I get the following error (note the
missing parentheses):

org-open-file: No match for coderef: * Object projection functions *

and I am moved to the top of the file (instead of where I stored the
link).

Is there an escape problem here? And if so, is it a bug of
`org-store-link` of not doing the escaping?

Thanks,

Alan