babel: org-babel-switch-to-session [C-c M-b z]

org-babel-pop-to-session is an alias of this
This commit is contained in:
Dan Davison 2010-03-16 12:55:36 -04:00
parent 53410c7afa
commit 6976d9fc79
2 changed files with 8 additions and 5 deletions

View file

@ -47,7 +47,8 @@ interactive babel functions which are assigned key bindings.")
("b" . org-babel-execute-buffer)
("h" . org-babel-sha1-hash)
("g" . org-babel-goto-named-source-block)
("l" . org-babel-lob-ingest))
("l" . org-babel-lob-ingest)
("z" . org-babel-switch-to-session))
"Org-babel keybindings. This list associates interactive
org-babel functions with keys. Each element of this list will
add an entry to the `org-mode-map' using the letter key which is

View file

@ -261,10 +261,10 @@ session. After loading the body this pops open the session."
(pop-to-buffer (funcall (intern (concat "org-babel-load-session:" lang)) session body params))
(move-end-of-line 1)))
(defun org-babel-pop-to-session (&optional arg info)
"Pop to the session of the current source-code block. If
called with a prefix argument then evaluate the header arguments
for the source block before entering the session. Copy the body
(defun org-babel-switch-to-session (&optional arg info)
"Switch to the session of the current source-code block.
If called with a prefix argument then evaluate the header arguments
for the source block before entering the session. Copy the body
of the source block to the kill ring."
(interactive)
(let* ((info (or info (org-babel-get-src-block-info)))
@ -285,6 +285,8 @@ of the source block to the kill ring."
(pop-to-buffer (funcall (intern (format "org-babel-%s-initiate-session" lang)) session params))
(move-end-of-line 1)))
(defalias 'org-babel-pop-to-session 'org-babel-switch-to-session)
(defun org-babel-open-src-block-result (&optional re-run)
"If `point' is on a src block then open the results of the
source code block, otherwise return nil. With optional prefix