summaryrefslogtreecommitdiff
path: root/lisp/org/org-goto.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org-goto.el')
-rw-r--r--lisp/org/org-goto.el71
1 files changed, 35 insertions, 36 deletions
diff --git a/lisp/org/org-goto.el b/lisp/org/org-goto.el
index 163aa580ef6..352bf9f2e52 100644
--- a/lisp/org/org-goto.el
+++ b/lisp/org/org-goto.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2012-2021 Free Software Foundation, Inc.
-;; Author: Carsten Dominik <carsten at orgmode dot org>
+;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, wp
;; This file is part of GNU Emacs.
@@ -203,40 +203,39 @@ When nil, you can use these keybindings to navigate the buffer:
"Let the user select a location in current buffer.
This function uses a recursive edit. It returns the selected
position or nil."
- (org-no-popups
- (let ((isearch-mode-map org-goto-local-auto-isearch-map)
- (isearch-hide-immediately nil)
- (isearch-search-fun-function
- (lambda () #'org-goto--local-search-headings))
- (help (or help org-goto-help)))
- (save-excursion
- (save-window-excursion
- (delete-other-windows)
- (and (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
- (pop-to-buffer-same-window
- (condition-case nil
- (make-indirect-buffer (current-buffer) "*org-goto*" t)
- (error (make-indirect-buffer (current-buffer) "*org-goto*" t))))
- (let (temp-buffer-show-function temp-buffer-show-hook)
- (with-output-to-temp-buffer "*Org Help*"
- (princ (format help (if org-goto-auto-isearch
- " Just type for auto-isearch."
- " n/p/f/b/u to navigate, q to quit.")))))
- (org-fit-window-to-buffer (get-buffer-window "*Org Help*"))
- (org-overview)
- (setq buffer-read-only t)
- (if (and (boundp 'org-goto-start-pos)
- (integer-or-marker-p org-goto-start-pos))
- (progn (goto-char org-goto-start-pos)
- (when (org-invisible-p)
- (org-show-set-visibility 'lineage)))
- (goto-char (point-min)))
- (let (org-special-ctrl-a/e) (org-beginning-of-line))
- (message "Select location and press RET")
- (use-local-map org-goto-map)
- (recursive-edit)))
- (kill-buffer "*org-goto*")
- (cons org-goto-selected-point org-goto-exit-command))))
+ (let ((isearch-mode-map org-goto-local-auto-isearch-map)
+ (isearch-hide-immediately nil)
+ (isearch-search-fun-function
+ (lambda () #'org-goto--local-search-headings))
+ (help (or help org-goto-help)))
+ (save-excursion
+ (save-window-excursion
+ (delete-other-windows)
+ (and (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
+ (pop-to-buffer-same-window
+ (condition-case nil
+ (make-indirect-buffer (current-buffer) "*org-goto*" t)
+ (error (make-indirect-buffer (current-buffer) "*org-goto*" t))))
+ (let (temp-buffer-show-function temp-buffer-show-hook)
+ (with-output-to-temp-buffer "*Org Help*"
+ (princ (format help (if org-goto-auto-isearch
+ " Just type for auto-isearch."
+ " n/p/f/b/u to navigate, q to quit.")))))
+ (org-fit-window-to-buffer (get-buffer-window "*Org Help*"))
+ (org-overview)
+ (setq buffer-read-only t)
+ (if (and (boundp 'org-goto-start-pos)
+ (integer-or-marker-p org-goto-start-pos))
+ (progn (goto-char org-goto-start-pos)
+ (when (org-invisible-p)
+ (org-show-set-visibility 'lineage)))
+ (goto-char (point-min)))
+ (let (org-special-ctrl-a/e) (org-beginning-of-line))
+ (message "Select location and press RET")
+ (use-local-map org-goto-map)
+ (recursive-edit)))
+ (kill-buffer "*org-goto*")
+ (cons org-goto-selected-point org-goto-exit-command)))
;;;###autoload
(defun org-goto (&optional alternative-interface)
@@ -250,7 +249,7 @@ 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
+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