diff options
author | Kyle Meyer <kyle@kyleam.com> | 2020-09-05 09:41:24 +0200 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-09-05 09:41:24 +0200 |
commit | 4696aef580bd9efaf934c177fadcccbe52a64df4 (patch) | |
tree | a79afd40092e1d65796db57a61bd4609d3303fd3 | |
parent | ee3c3b554799c9f0fbe387848cd9eec7e9ab9d95 (diff) | |
download | org-mode-4696aef580bd9efaf934c177fadcccbe52a64df4.tar.gz |
goto: Avoid invoking org-mode for outline navigation
* lisp/org-goto.el (org-goto-location): Call make-indirect-buffer with
a non-nil CLONE to preserve the base buffer's state, avoiding a more
expensive call to org-mode.
Reported-by: Vladimir Nikishkin <lockywolf@gmail.com>
Suggested-by: Ihor Radchenko <yantar92@gmail.com>
-rw-r--r-- | lisp/org-goto.el | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lisp/org-goto.el b/lisp/org-goto.el index dd9c0fa..05b9252 100644 --- a/lisp/org-goto.el +++ b/lisp/org-goto.el @@ -234,20 +234,15 @@ position or nil." (and (get-buffer "*org-goto*") (kill-buffer "*org-goto*")) (pop-to-buffer-same-window (condition-case nil - (make-indirect-buffer (current-buffer) "*org-goto*") - (error (make-indirect-buffer (current-buffer) "*org-goto*")))) + (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*")) - (setq buffer-read-only nil) - (let ((org-startup-truncated t) - (org-startup-folded nil) - (org-startup-align-all-tables nil)) - (org-mode) - (org-overview)) + (org-overview) (setq buffer-read-only t) (if (and (boundp 'org-goto-start-pos) (integer-or-marker-p org-goto-start-pos)) |