[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH 05/10] Remove info arg from several org-babel functions
From: |
Aaron Ecay |
Subject: |
[O] [PATCH 05/10] Remove info arg from several org-babel functions |
Date: |
Mon, 1 Apr 2013 01:42:19 -0400 |
* lisp/ob-core.el (org-babel-load-in-session),
(org-babel-initiate-session),
(org-babel-switch-to-session)
(org-babel-switch-to-session-with-code): Remove info optional arg
The info arg is threaded through this code, but never used by
callers (at least in org code).
---
lisp/ob-core.el | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 0aae998..c69b736 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -794,13 +794,13 @@ arguments and pop open the results in a preview buffer."
(add-hook 'org-tab-first-hook 'org-babel-header-arg-expand)
;;;###autoload
-(defun org-babel-load-in-session (&optional arg info)
+(defun org-babel-load-in-session (&optional arg)
"Load the body of the current source-code block.
Evaluate the header arguments for the source block before
entering the session. After loading the body this pops open the
session."
(interactive)
- (let* ((info (or info (org-babel-get-src-block-info)))
+ (let* ((info (org-babel-get-src-block-info))
(lang (nth 0 info))
(params (nth 2 info))
(body (if (not info)
@@ -820,13 +820,13 @@ session."
(end-of-line 1)))
;;;###autoload
-(defun org-babel-initiate-session (&optional arg info)
+(defun org-babel-initiate-session (&optional arg)
"Initiate session for current code block.
If called with a prefix argument then resolve any variable
references in the header arguments and assign these variables in
the session. Copy the body of the code block to the kill ring."
(interactive "P")
- (let* ((info (or info (org-babel-get-src-block-info (not arg))))
+ (let* ((info (org-babel-get-src-block-info (not arg)))
(lang (nth 0 info))
(body (nth 1 info))
(params (nth 2 info))
@@ -849,19 +849,19 @@ the session. Copy the body of the code block to the kill
ring."
(funcall init-cmd session params)))
;;;###autoload
-(defun org-babel-switch-to-session (&optional arg info)
+(defun org-babel-switch-to-session (&optional arg)
"Switch to the session of the current code block.
Uses `org-babel-initiate-session' to start the session. If called
with a prefix argument then this is passed on to
`org-babel-initiate-session'."
(interactive "P")
- (pop-to-buffer (org-babel-initiate-session arg info))
+ (pop-to-buffer (org-babel-initiate-session arg))
(end-of-line 1))
(defalias 'org-babel-pop-to-session 'org-babel-switch-to-session)
;;;###autoload
-(defun org-babel-switch-to-session-with-code (&optional arg info)
+(defun org-babel-switch-to-session-with-code (&optional arg)
"Switch to code buffer and display session."
(interactive "P")
(let ((swap-windows
@@ -870,10 +870,9 @@ with a prefix argument then this is passed on to
(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-babel-switch-to-session arg))
(org-edit-src-code)
(funcall swap-windows)))
--
1.8.2
- Re: [O] [PATCH 1/4] Clean up various org-babel-*-maybe commands, (continued)
[O] [PATCH 02/10] Clean up org-babel-expand-body: functions for awk and picolisp, Aaron Ecay, 2013/04/01
[O] [PATCH 07/10] Simplify org-babel-execute-src-block, Aaron Ecay, 2013/04/01
[O] [PATCH 05/10] Remove info arg from several org-babel functions,
Aaron Ecay <=
[O] [PATCH 08/10] Fix testing/lisp/test-ob-emacs-lisp.el, Aaron Ecay, 2013/04/01
[O] [PATCH 06/10] Use prefix arg in org-edit-special, Aaron Ecay, 2013/04/01
[O] [PATCH 09/10] Remove org-babel-check-confirm-evaluate macro, Aaron Ecay, 2013/04/01