emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aaron Ecay <aaronecay@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH 05/10] Remove info arg from several org-babel functions
Date: Mon,  1 Apr 2013 01:42:19 -0400	[thread overview]
Message-ID: <1364794944-13826-6-git-send-email-aaronecay@gmail.com> (raw)
In-Reply-To: <1364794944-13826-1-git-send-email-aaronecay@gmail.com>

* 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

  parent reply	other threads:[~2013-04-01  5:42 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  5:42 [PATCH 00/10] babel cleanups Aaron Ecay
2013-04-01  5:42 ` [PATCH 01/10] Fix org-babel-R-initiate-session Aaron Ecay
2013-04-03 13:46   ` Eric Schulte
2013-04-01  5:42 ` [PATCH 02/10] Clean up org-babel-expand-body: functions for awk and picolisp Aaron Ecay
2013-04-03 13:56   ` Eric Schulte
2013-04-01  5:42 ` [PATCH 03/10] Clean up various org-babel-*-maybe commands Aaron Ecay
2013-04-02 19:31   ` Achim Gratz
2013-04-03 14:18   ` Bastien
2013-04-18  7:03     ` Aaron Ecay
2013-04-18  8:06       ` [PATCH 1/4] " Aaron Ecay
2013-04-18 10:28         ` Bastien
2013-04-20 10:10       ` [PATCH 03/10] " Eric Schulte
2013-04-22  3:52         ` Aaron Ecay
2013-04-01  5:42 ` [PATCH 04/10] Add 'light argument to some uses of org-babel-get-src-block-info Aaron Ecay
2013-04-03 14:09   ` Eric Schulte
2013-04-18  7:09     ` Aaron Ecay
2013-04-20 10:09       ` Eric Schulte
2013-04-22  3:51         ` Aaron Ecay
2013-04-01  5:42 ` Aaron Ecay [this message]
2013-04-03 13:58   ` [PATCH 05/10] Remove info arg from several org-babel functions Eric Schulte
2013-04-18  7:07     ` Aaron Ecay
2013-04-01  5:42 ` [PATCH 06/10] Use prefix arg in org-edit-special Aaron Ecay
2013-04-03 13:42   ` Eric Schulte
2013-04-03 17:02     ` Bastien
2013-04-01  5:42 ` [PATCH 07/10] Simplify org-babel-execute-src-block Aaron Ecay
2013-04-02 19:41   ` Achim Gratz
2013-04-03 13:54     ` Eric Schulte
2013-04-03 17:05       ` Achim Gratz
2013-04-03 17:20         ` Eric Schulte
2013-04-01  5:42 ` [PATCH 08/10] Fix testing/lisp/test-ob-emacs-lisp.el Aaron Ecay
2013-04-03 13:47   ` Eric Schulte
2013-04-01  5:42 ` [PATCH 09/10] Remove org-babel-check-confirm-evaluate macro Aaron Ecay
2013-04-02 19:53   ` Achim Gratz
2013-04-03 14:05     ` Eric Schulte
2013-04-01  5:42 ` [PATCH 10/10] Document how :var introduces code block dependencies Aaron Ecay
2013-04-03 14:04   ` Eric Schulte
2013-04-02 22:14 ` [PATCH 00/10] babel cleanups Eric Schulte
2013-04-03 14:13   ` Eric Schulte
2013-04-03 16:21     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1364794944-13826-6-git-send-email-aaronecay@gmail.com \
    --to=aaronecay@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).