diff options
author | Bastien <bzg@gnu.org> | 2020-02-17 09:04:19 +0100 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-02-17 09:04:19 +0100 |
commit | 5dd7721242316a0fd63bcdcda2ec073d0821ab3f (patch) | |
tree | 9c0a41c1450f8f10a30383927703226c723e6c2a | |
parent | 915a8eade4175d284f9eced8cf4204a06feebf94 (diff) | |
download | org-mode-5dd7721242316a0fd63bcdcda2ec073d0821ab3f.tar.gz |
Use `org-switch-to-buffer-other-window' in a few places
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org-attach.el (org-attach):
* lisp/ob-lilypond.el (org-babel-lilypond-execute-tangled-ly)
(org-babel-lilypond-mark-error-line): Use
`org-switch-to-buffer-other-window' instead of
`switch-to-buffer-other-window'.
-rw-r--r-- | lisp/ob-lilypond.el | 4 | ||||
-rw-r--r-- | lisp/org-agenda.el | 2 | ||||
-rw-r--r-- | lisp/org-attach.el | 2 | ||||
-rw-r--r-- | lisp/org-src.el | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index e207784..c221c41 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -205,7 +205,7 @@ If error in compilation, attempt to mark the error in lilypond org file." (delete-file org-babel-lilypond-temp-file)) (rename-file org-babel-lilypond-tangled-file org-babel-lilypond-temp-file)) - (switch-to-buffer-other-window "*lilypond*") + (org-switch-to-buffer-other-window "*lilypond*") (erase-buffer) (org-babel-lilypond-compile-lilyfile org-babel-lilypond-temp-file) (goto-char (point-min)) @@ -262,7 +262,7 @@ FILE-NAME is full path to lilypond file." "Mark the erroneous lines in the lilypond org buffer. FILE-NAME is full path to lilypond file. LINE is the erroneous line." - (switch-to-buffer-other-window + (org-switch-to-buffer-other-window (concat (file-name-nondirectory (org-babel-lilypond-switch-extension file-name ".org")))) (let ((temp (point))) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 049fde8..84b3ba3 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -8737,6 +8737,7 @@ When called with a prefix argument, include all archive files as well." (org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position marker))) + ;; FIXME: use `org-switch-to-buffer-other-window'? (switch-to-buffer-other-window buffer) (widen) (push-mark) @@ -8987,6 +8988,7 @@ It also looks at the text of the entry itself." (goto-char (match-beginning 0)) (org-open-at-point))) ;; This is an internal link, widen the buffer + ;; FIXME: use `org-switch-to-buffer-other-window'? (switch-to-buffer-other-window buffer) (widen) (goto-char marker) diff --git a/lisp/org-attach.el b/lisp/org-attach.el index 38e9ad0..d073291 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -260,7 +260,7 @@ Shows a list of commands and prompts for another key to execute a command." (save-excursion (save-window-excursion (unless org-attach-expert - (switch-to-buffer-other-window (get-buffer-create "*Org Attach*")) + (org-switch-to-buffer-other-window "*Org Attach*") (erase-buffer) (setq cursor-type nil header-line-format "Use C-v, M-v, C-n or C-p to navigate.") diff --git a/lisp/org-src.el b/lisp/org-src.el index bb1c57c..c65eef9 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -810,7 +810,7 @@ Raise an error when current buffer is not a source editing buffer." (`current-window (pop-to-buffer-same-window buffer)) (`other-window (let ((cur-win (selected-window))) - (switch-to-buffer-other-window buffer) + (org-switch-to-buffer-other-window buffer) (when (eq context 'exit) (quit-restore-window cur-win)))) (`split-window-below (if (eq context 'exit) |