10

In Org-mode buffers, table or code block can have #+NAME: title. But I don't know how to reference them in current buffer or in other files with org-mode hyperlink. (like one link format: [[file:some-file.org::*headline]])

Org-mode has support for some Custom Search functions. By default, Org-mode does not supprt this.

Does anybody knows how to add this support?

1
  • Can you make your question more clear? Provide an example text with the expected behaviour, and your research so far; with links to these "custom search" facilities in org mode. Commented Dec 27, 2015 at 15:48

1 Answer 1

15

I found the solution, Org-mode radio target can be used here. here is the doc: http://orgmode.org/org.html#Internal-links Like this:

Here is a named table.

#+NAME: my target
| x | y |
| 1 | 2 |

I can reference it with its name. Like this:
[[my target]]

There are also table remote references further explained by an example in the following.

First we define a table with a name TBL_origin to have something to play with. The two numbers in the row Average are referenced in the tables further below.

  #+NAME: TBL_origin
  | Leaders  | Caption 1 | Caption 2 |
  |----------+-----------+-----------|
  | Average  |        16 |        17 |
  |----------+-----------+-----------|
  | Leader 1 |        11 |        12 |
  | Leader 2 |        21 |        22 |
  #+TBLFM: @2$2=vmean(@II$2..@III$2)::@2$3=vmean(@II$3..@III$3)

The vector of the two numeric cells in row Average of table TBL_origin are referenced in the table formulas of the next tables.

  | Use table reference |
  |---------------------|
  |                16.5 |
  #+TBLFM: @2$1=vmean(remote(TBL_origin,@2$2..@2$3))

Note that you can not directly assign remote references to table ranges (see the posting Re: [Orgmode] remote reference in the orgmode mailing list).

A workaround is demonstrated in the following table:

  | Refer to averages |
  |-------------------|
  |                16 |
  |                17 |
  #+TBLFM: $1=subscr(remote(TBL_origin,@2$2..@2$3),@#-1)
5
  • 1
    A note on remote references in org-table formulas would be a valuable extension of this answer. Please have a look for the syntax remote(NAME-OR-ID,REF) on the linked page. Commented Dec 28, 2015 at 8:43
  • You are welcome. May I edit your answer and give a usage example for remote references (when I find time)? Commented Dec 28, 2015 at 10:21
  • Of course. edit it. Commented Dec 28, 2015 at 10:47
  • 3
    But how do I call remote from elisp? I usually write all my formulas in elisp and cannot mix with remove(...) inside an elisp formula. I also tried (remote ...), but no luck. Commented Nov 3, 2018 at 13:25
  • Hi, sorry, but those aren't actually radio targets, which are <<<like this>>>. Were you saying internal links? Commented Aug 25, 2022 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.