Function: org-babel-switch-to-session-with-code

org-babel-switch-to-session-with-code is an autoloaded, interactive and byte-compiled function defined in ob-core.el.gz.

Signature

(org-babel-switch-to-session-with-code &optional ARG INFO)

Documentation

Switch to code buffer and display session.

Prefix argument ARG is passed to org-babel-switch-to-session.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/ob-core.el.gz
;;;###autoload
(defun org-babel-switch-to-session-with-code (&optional arg _info)
  "Switch to code buffer and display session.
Prefix argument ARG is passed to `org-babel-switch-to-session'."
  (interactive "P")
  (let ((swap-windows
	 (lambda ()
	   (let ((other-window-buffer (window-buffer (next-window))))
	     (set-window-buffer (next-window) (current-buffer))
	     (set-window-buffer (selected-window) other-window-buffer))
	   (other-window 1)))
	(info (org-babel-get-src-block-info))
	(org-src-window-setup 'reorganize-frame))
    (save-excursion
      (org-babel-switch-to-session arg info))
    (org-edit-src-code)
    (funcall swap-windows)))