5

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?

  • 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. – Juancho Dec 27 '15 at 15:48
6

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)
  • 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. – Tobias Dec 28 '15 at 8:43
  • You are welcome. May I edit your answer and give a usage example for remote references (when I find time)? – Tobias Dec 28 '15 at 10:21
  • Of course. edit it. – stardiviner Dec 28 '15 at 10:47
  • 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. – Zelphir Nov 3 '18 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.