Procházet zdrojové kódy

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'.
Bastien před 5 roky
rodič
revize
5dd7721242
4 změnil soubory, kde provedl 6 přidání a 4 odebrání
  1. 2 2
      lisp/ob-lilypond.el
  2. 2 0
      lisp/org-agenda.el
  3. 1 1
      lisp/org-attach.el
  4. 1 1
      lisp/org-src.el

+ 2 - 2
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)))

+ 2 - 0
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)

+ 1 - 1
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.")

+ 1 - 1
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)