From d1bcb5e4258d49906c307faa792b134b4f3aa18d Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Sun, 14 Jun 2009 11:10:09 -0700 Subject: [PATCH] cleaned version of body is now added to kill ring --- lisp/org-babel.el | 2 +- org-babel.org | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/org-babel.el b/lisp/org-babel.el index 650952548..bbc415ac2 100644 --- a/lisp/org-babel.el +++ b/lisp/org-babel.el @@ -125,7 +125,7 @@ of the source block to the kill ring." (unless (member lang org-babel-interpreters) (error "Language is not in `org-babel-interpreters': %s" lang)) ;; copy body to the kill ring - (with-temp-buffer (insert body) (copy-region-as-kill (point-min) (point-max))) + (with-temp-buffer (insert (org-babel-trim body)) (copy-region-as-kill (point-min) (point-max))) ;; if called with a prefix argument, then process header arguments (if arg (funcall (intern (concat "org-babel-prep-session:" lang)) session params)) ;; just to the session using pop-to-buffer diff --git a/org-babel.org b/org-babel.org index 3a901a054..164a3bb4e 100644 --- a/org-babel.org +++ b/org-babel.org @@ -677,11 +677,17 @@ For lack of a better place, lets add this to the #+srcname: task-ruby-pop-to-session #+begin_src ruby :var num=9 :var another="something else" +num.times{|n| puts another} +#+end_src + +**** TODO python + +#+srcname: task-python-pop-to-session +#+begin_src python :var num=9 :var another="something else" num.times{|n| puts n} #+end_src **** TODO R -**** TODO python **** TODO shell *** TODO function to dump last N lines from inf-proc buffer into the current source block