1

Is there a way of linking to a specific structure block in org mode?

I have a block of text as follows:

* Heading

Some text

** Subheading

some text

#+BEGIN_PROSE Lorem
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
#+END_PROSE

some text

C-cC-l would only store a link to the top of subheading.

I would like to be able the use [[Lorem]] to jump to the bock of text.

Would that be possible?

-----

Update:

Because the text would be printed, I would like any dedicated target to stay within the template code or comment.

I've tried #+BEGIN_PROSE <<Lorem>> and # <<Lorem>> but neither works.

2

I think you need to put a name on the block like this:

* Heading

Some text

** Subheading

some text

#+name: Lorem
#+BEGIN_PROSE
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
#+END_PROSE

some text

* Heading with link to Lorem

Here is the link:  [[Lorem]].
1

Just insert a dedicated target <<lorem>> at the place where you would like to jump to with [[lorem]].

It's clear that John Kitchin's solution works with blocks. What I meant is:

* Heading

Some text [[lorem]]

** Subheading

some text

#+BEGIN_PROSE Lorem
<<lorem>> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
#+END_PROSE

some text
  • I tried #+BEGIN_PROSE <<Lorem>> but it doesn't work. – Sati Jan 5 at 7:28
  • Because the text would be published, I would like the dedicated target to stay within the comment. – Sati Jan 5 at 7:30
  • Would it be trivial to tweak the behavior of structure templates to allow this function? – Sati Jan 5 at 10:20
  • @Sati: I edited my answer to address your problem. – Tobias Jan 5 at 17:05
  • Yeah, I am aware of this function. I did not use it because that would add <<lorem>> to the printed text. We could consider <<Lorem>> ipsum, though, but that would only work if the title/name of the block can be found within the text itself, as in this situation. – Sati Jan 7 at 1:00

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.