Rudi C <rudiwillalwayslove...@gmail.com> writes:

> How do I link to a specific line in an org-babel block?

a.org:

#+begin_src emacs-lisp
(message "Hello world!")
(message "Hello other worlds!!!") ; (ref:greetworlds)
#+end_src

b:org
[[./a.org::(greetworlds)]]

See https://orgmode.org/manual/Literal-Examples.html

> I tried using [[file:.../my.org::search-term]] , but this only works for
> jumping to a heading, not an arbitrary line. (It does work for non-org
> files.)

That's because "search-term" is used for fuzzy search, which is limited
to headings by default. You can customize
`org-link-search-must-match-exact-headline' to change this.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to