From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: [PATCH 05/10] Remove info arg from several org-babel functions Date: Mon, 1 Apr 2013 01:42:19 -0400 Message-ID: <1364794944-13826-6-git-send-email-aaronecay@gmail.com> References: <1364794944-13826-1-git-send-email-aaronecay@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMXVt-0002l0-S8 for emacs-orgmode@gnu.org; Mon, 01 Apr 2013 01:42:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMXVr-0000vt-4B for emacs-orgmode@gnu.org; Mon, 01 Apr 2013 01:42:37 -0400 Received: from mail-qa0-f52.google.com ([209.85.216.52]:52387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMXVr-0000vo-04 for emacs-orgmode@gnu.org; Mon, 01 Apr 2013 01:42:35 -0400 Received: by mail-qa0-f52.google.com with SMTP id bs12so714187qab.11 for ; Sun, 31 Mar 2013 22:42:34 -0700 (PDT) In-Reply-To: <1364794944-13826-1-git-send-email-aaronecay@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * 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