diff lisp/org/ob-lob.el @ 111880:a7740098b594

Update to Org mode 7.4
author Carsten Dominik <carsten.dominik@gmail.com>
date Sat, 11 Dec 2010 17:42:53 +0100
parents 76c2ff4450eb
children 6378d1b57038
line wrap: on
line diff
--- a/lisp/org/ob-lob.el	Sat Dec 11 17:41:04 2010 +0200
+++ b/lisp/org/ob-lob.el	Sat Dec 11 17:42:53 2010 +0100
@@ -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 @@
   (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 @@
       (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