emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: org link to OCaml comment
Date: Thu, 6 Feb 2020 09:58:54 -0500	[thread overview]
Message-ID: <CAJ51ETpZDzdcYTKJ5oUP6WYHupF4ARRreP_2FaiaPeTWwb6JhQ@mail.gmail.com> (raw)
In-Reply-To: <87a75vu60w.fsf@polytechnique.org>

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

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
@johnkitchin
http://kitchingroup.cheme.cmu.edu



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
>
>

[-- Attachment #2: Type: text/html, Size: 2104 bytes --]

  reply	other threads:[~2020-02-06 14:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 14:47 org link to OCaml comment Alan Schmitt
2020-02-06 14:58 ` John Kitchin [this message]
2020-02-06 15:39   ` Alan Schmitt
2020-02-06 17:10     ` Nicolas Goaziou
2020-02-06 18:33       ` Alan Schmitt
2020-02-07 14:33         ` Nicolas Goaziou
2020-02-07 15:25           ` Alan Schmitt
2020-02-19 17:49             ` Nicolas Goaziou
2020-02-20  8:20               ` Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ51ETpZDzdcYTKJ5oUP6WYHupF4ARRreP_2FaiaPeTWwb6JhQ@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).