incandescentman
incandescentman

Reputation: 6388

is there an Emacs org-mode command to jump to an org heading?

In Emacs org-mode, is there a command like org-goto-heading?

In a long org-mode file, I have a heading toward the bottom like this:

* questions

I'd like to jump to that heading without having to wade through all the other instances of the word questions.

Is there a command like:

Basically I would like to navigate to that heading using something like this: M-x org-goto-heading questions <RET>

Upvotes: 21

Views: 7841

Answers (6)

SaMeji
SaMeji

Reputation: 1

You can also do a simple regexp search (isearch-forward-regexp) for "^* questions".

I.e. type

M-x isearch-forward-regexp

Emacs will then prompt you for a string to search (the minibuffer will prompt: "I-search"). You then simply type:

^* questions

Upvotes: 0

Juancho
Juancho

Reputation: 7372

Then there's org-occur-goto, which makes a multi-occur search on all your org-mode buffers and displays results dynamically as you type.

Useful for any text (not only headings).

Upvotes: 7

Brian Z
Brian Z

Reputation: 953

If you're looking for headings in agenda files, helm-org-agenda-files-headings is a very useful command. It's part of the helm package, available via MELPA.

Upvotes: 5

event_jr
event_jr

Reputation: 17707

Here is an interesting thread from the org mailing list discussing navigation.

Essentially, add this to your init file:

(setq org-goto-interface 'outline-path-completion
      org-goto-max-level 10)

And you can jump to heading with the org-goto command C-c C-j. You can also use C-u C-c C-w org-refile by adding this to your init file:

(setq org-outline-path-complete-in-steps nil)

Upvotes: 21

armandino
armandino

Reputation: 18562

Not sure if this works for you but there is a org-goto function C-c C-j.

Once you invoke it you can scroll the tree using up and down keys or using a search C-s.

Here's a snippet from the docs.

C-c C-j     (org-goto)

Jump to a different place without changing the current outline visibility.
Shows the document structure in a temporary buffer, where you can use the
following keys to find your destination:

          <TAB>         Cycle visibility.
          <down> / <up>   Next/previous visible headline.
          <RET>         Select this location.
          /           Do a Sparse-tree search
          The following keys work if you turn off org-goto-auto-isearch
          n / p        Next/previous visible headline.
          f / b        Next/previous headline same level.
          u            One level up.
          0-9          Digit argument.
          q            Quit

Upvotes: 13

PascalVKooten
PascalVKooten

Reputation: 21461

I have this command bound to M-o: (imenu-anywhere).

It allows you to quickly jump to sections (selected from a list of all sections). It does not only work in org-mode, but in many other modes as well.

Upvotes: 8

Related Questions