diff options
Diffstat (limited to 'lisp/org/ob-lob.el')
-rw-r--r-- | lisp/org/ob-lob.el | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index 243666c0a1b..137a6bce9a3 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el @@ -2,11 +2,10 @@ ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc. -;; Author: Eric Schulte -;; Dan Davison +;; Author: Eric Schulte, Dan Davison ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org -;; Version: 7.3 +;; Version: 7.4 ;; This file is part of GNU Emacs. @@ -26,7 +25,7 @@ ;;; Commentary: ;; See the online documentation for more information -;; +;; ;; http://orgmode.org/worg/org-contrib/babel/ ;;; Code: @@ -72,7 +71,8 @@ If you change the value of this variable then your files may (concat "^\\([ \t]*\\)#\\+\\(?:" (mapconcat #'regexp-quote org-babel-lob-call-aliases "\\|") - "\\):[ \t]+\\([^\(\)\n]+\\)\(\\([^\n]*\\)\)\\(\\[.+\\]\\|\\)[ \t]*\\([^\n]*\\)") + "\\):[ \t]+\\([^\(\)\n]+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)" + "\(\\([^\n]*\\)\)\\(\\[.+\\]\\|\\)[ \t]*\\([^\n]*\\)") "Regexp to match calls to predefined source block functions.") ;; functions for executing lob one-liners @@ -93,13 +93,16 @@ if so then run the appropriate source block from the Library." (beginning-of-line 1) (if (looking-at org-babel-lob-one-liner-regexp) (append - (mapcar #'org-babel-clean-text-properties + (mapcar #'org-babel-clean-text-properties (list - (format "%s(%s)%s" - (match-string 2) (match-string 3) (match-string 4)) - (match-string 5))) + (format "%s%s(%s)%s" + (match-string 2) + (if (match-string 4) + (concat "[" (match-string 4) "]") "") + (or (match-string 6) "") (match-string 7)) + (match-string 8))) (list (length (match-string 1)))))))) - + (defun org-babel-lob-execute (info) "Execute the lob call specified by INFO." (let ((params (org-babel-process-params |