Function: org-goto
org-goto is an autoloaded, interactive and byte-compiled function
defined in org-goto.el.gz.
Signature
(org-goto &optional ALTERNATIVE-INTERFACE)
Documentation
Look up a different location in the current file, keeping current visibility.
When you want look-up or go to a different location in a document, the fastest way is often to fold the entire buffer and then dive into the tree. This method has the disadvantage, that the previous location will be folded, which may not be what you want.
This command works around this by showing a copy of the current
buffer in an indirect buffer, in overview mode. You can dive
into the tree in that copy, use org-occur and incremental search
to find a location. When pressing RET or Q, the command
returns to the original buffer in which the visibility is still
unchanged. After RET it will also jump to the location selected
in the indirect buffer and expose the headline hierarchy above.
With a prefix argument, use the alternative interface: e.g., if
org-goto-interface is outline use outline-path-completion.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-goto.el.gz
;;;###autoload
(defun org-goto (&optional alternative-interface)
"Look up a different location in the current file, keeping current visibility.
When you want look-up or go to a different location in a
document, the fastest way is often to fold the entire buffer and
then dive into the tree. This method has the disadvantage, that
the previous location will be folded, which may not be what you
want.
This command works around this by showing a copy of the current
buffer in an indirect buffer, in overview mode. You can dive
into the tree in that copy, use `org-occur' and incremental search
to find a location. When pressing RET or `Q', the command
returns to the original buffer in which the visibility is still
unchanged. After RET it will also jump to the location selected
in the indirect buffer and expose the headline hierarchy above.
With a prefix argument, use the alternative interface: e.g., if
`org-goto-interface' is `outline' use `outline-path-completion'."
(interactive "P")
(org-goto--set-map)
(let* ((org-refile-targets `((nil . (:maxlevel . ,org-goto-max-level))))
(org-refile-use-outline-path t)
(org-refile-target-verify-function nil)
(interface
(if (not alternative-interface)
org-goto-interface
(if (eq org-goto-interface 'outline)
'outline-path-completion
'outline)))
(org-goto-start-pos (point))
(selected-point
(if (eq interface 'outline) (car (org-goto-location))
(let ((pa (org-refile-get-location "Goto")))
(org-refile-check-position pa)
(nth 3 pa)))))
(if selected-point
(progn
(org-mark-ring-push org-goto-start-pos)
(goto-char selected-point)
(when (or (org-invisible-p) (org-invisible-p2))
(org-fold-show-context 'org-goto)))
(message "Quit"))))