Re: [O] [PATCH 05/10] Remove info arg from several org-babel functions

2013-04-18 Thread Aaron Ecay
Hi Eric,

Thanks for your comments on this and all the patches.

2013ko apirilak 3an, Eric Schulte-ek idatzi zuen:
 
 Aaron Ecay aarone...@gmail.com writes:
 
 * 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).
 
 The rgrep command disagrees with this last statement.
 
 ./ob-core.el:411: (progn (org-babel-load-in-session current-prefix-arg 
 info) t)

This was removed in patch #3 of the series.  I tried to make all the
patches independent of each other, but this dependency did slip in.  I
can squash the two patches if you’d prefer.

-- 
Aaron Ecay



Re: [O] [PATCH 05/10] Remove info arg from several org-babel functions

2013-04-03 Thread Eric Schulte
Aaron Ecay aarone...@gmail.com writes:

 * 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).

The rgrep command disagrees with this last statement.

./ob-core.el:411:   (progn (org-babel-load-in-session current-prefix-arg 
info) t)

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



[O] [PATCH 05/10] Remove info arg from several org-babel functions

2013-03-31 Thread Aaron Ecay
* 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