Skip to content

Instantly share code, notes, and snippets.

@jweaver
Last active August 15, 2016 19:57
Show Gist options
  • Save jweaver/974ccd8f69faf90099600cd0b80b73f9 to your computer and use it in GitHub Desktop.
Save jweaver/974ccd8f69faf90099600cd0b80b73f9 to your computer and use it in GitHub Desktop.
Useful org-mode tips pulled from orgmode.org/manual

Jump around within an org-mode file

C-c %     (org-mark-ring-push) Push the current position onto the mark ring, to be able to return easily. Commands following an internal link do this automatically

C-c &     (org-mark-ring-goto) Jump back to a recorded position. A position is recorded by the commands following internal links, and by C-c %. Using this command several times in direct succession moves through a ring of previously recorded positions.

Link to sections within the org-mode document

Headings produce sections, and you want to link (hotlink) to this section elsewhere in the document, and even have that produce a valid URL/anchor link on the HTML export.

For this, use a custom section ID heading:

* Section One
:PROPERTIES:
:CUSTOM_ID: sec:one
:END:

* Section Two
You can reference Section One with [[#sec:one]] but NOT
[[#sec:one][Section One]], i.e., the link without description
will get you the actual section number (1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment