diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index ef6ac3a2e..ca22363b1 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -257,7 +257,7 @@ replaced with its value." (org-babel-noweb-wrap) "" (nth 1 info)) (if (org-babel-noweb-p (nth 2 info) :export) (org-babel-expand-noweb-references - info (org-babel-exp-get-export-buffer)) + info (org-babel-exp-get-export-buffer)) (nth 1 info)))) (org-fill-template org-babel-exp-code-template @@ -271,6 +271,9 @@ replaced with its value." (nth 2 info)) ("flags" . ,((lambda (f) (when f (concat " " f))) (nth 3 info))) ("name" . ,(or (nth 4 info) ""))))) + ("body" . ,(if (string= (nth 0 info) "org") + (replace-regexp-in-string "^" "," (nth 1 info)) + (nth 1 info)))))) (defun org-babel-exp-results (info type &optional silent hash) "Evaluate and return the results of the current code block for export. @@ -283,7 +286,7 @@ inhibit insertion of results into the buffer." (let ((lang (nth 0 info)) (body (if (org-babel-noweb-p (nth 2 info) :eval) (org-babel-expand-noweb-references - info (org-babel-exp-get-export-buffer)) + info (org-babel-exp-get-export-buffer)) (nth 1 info))) (info (copy-sequence info))) ;; skip code blocks which we can't evaluate diff --git a/lisp/ob-fortran.el b/lisp/ob-fortran.el index e9ff78dcd..1d633c951 100644 --- a/lisp/ob-fortran.el +++ b/lisp/ob-fortran.el @@ -1,6 +1,6 @@ ;;; ob-fortran.el --- org-babel functions for fortran -;; Copyright (C) 2011-2012 Sergey Litvinov, Eric Schulte +;; Copyright (C) 2011-2012 Free Software Foundation, Inc. ;; Authors: Sergey Litvinov (based on ob-C.el by Eric Schulte), Eric Schulte ;; Keywords: literate programming, reproducible research, fortran diff --git a/lisp/org.el b/lisp/org.el index c418c678a..169e17db7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11313,7 +11313,7 @@ For calling through lisp, arg is also interpreted in the following way: (interpret (nth 1 ass)) (done-word (nth 3 ass)) (final-done-word (nth 4 ass)) - (last-state (or this "")) + (org-last-state (or this "")) (completion-ignore-case t) (member (member this org-todo-keywords-1)) (tail (cdr member)) @@ -11379,7 +11379,7 @@ For calling through lisp, arg is also interpreted in the following way: (car tail)))) (state (or (run-hook-with-args-until-success - 'org-todo-get-default-hook state last-state) + 'org-todo-get-default-hook state org-last-state) state)) (next (if state (concat " " state " ") " ")) (change-plist (list :type 'todo-state-change :from this :to state