Browse Source

Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

Carsten Dominik 15 years ago
parent
commit
32c2231e96
2 changed files with 8 additions and 5 deletions
  1. 2 1
      contrib/babel/lisp/org-babel-keys.el
  2. 6 4
      contrib/babel/lisp/org-babel.el

+ 2 - 1
contrib/babel/lisp/org-babel-keys.el

@@ -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

+ 6 - 4
contrib/babel/lisp/org-babel.el

@@ -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