Browse Source

Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

Carsten Dominik 15 years ago
parent
commit
906bca96c6

+ 2 - 1
contrib/babel/lisp/langs/org-babel-R.el

@@ -44,7 +44,8 @@ called by `org-babel-execute-src-block'."
            (result-type (fourth processed-params))
            (session (org-babel-R-initiate-session (first processed-params)))
            (vars (second processed-params))
-	   (column-names-p (cdr (assoc :colnames params)))
+	   (column-names-p (and (cdr (assoc :colnames params))
+				(string= "yes" (cdr (assoc :colnames params)))))
 	   (out-file (cdr (assoc :file params)))
 	   (augmented-body
 	    (concat

+ 0 - 1
contrib/babel/lisp/langs/org-babel-gnuplot.el

@@ -79,7 +79,6 @@ called by `org-babel-execute-src-block'."
            (term (or (cdr (assoc :term params))
                      (when out-file (file-name-extension out-file))))
            (cmdline (cdr (assoc :cmdline params)))
-           (in-file (make-temp-file "org-babel-ditaa"))
            (title (plist-get params :title))
            (lines (plist-get params :line))
            (sets (plist-get params :set))

+ 1 - 1
contrib/babel/lisp/langs/org-babel-haskell.el

@@ -81,7 +81,7 @@
 
 (defun org-babel-haskell-read-string (string)
   "Strip \\\"s from around haskell string"
-  (if (string-match "\"\\([^\000]+\\)\"" string)
+  (if (string-match "^\"\\([^\000]+\\)\"$" string)
       (match-string 1 string)
     string))
 

+ 5 - 4
contrib/babel/lisp/langs/org-babel-python.el

@@ -91,10 +91,11 @@ specifying a var of the same value."
     (format "%S" var)))
 
 (defun org-babel-python-table-or-string (results)
-  "If the results look like a table, then convert them into an
+  "If the results look like a list or tuple, then convert them into an
 Emacs-lisp table, otherwise return the results as a string."
   (org-babel-read
-   (if (string-match "^\\[.+\\]$" results)
+   (if (or (string-match "^\\[.+\\]$" results)
+	   (string-match "^(.+)$" results))
        (org-babel-read
         (replace-regexp-in-string
          "\\[" "(" (replace-regexp-in-string
@@ -208,8 +209,8 @@ last statement in BODY, as elisp."
              (org-babel-python-table-or-string (org-babel-trim (car results))))))))))
 
 (defun org-babel-python-read-string (string)
-  "Strip 's from around ruby string"
-  (if (string-match "'\\([^\000]+\\)'" string)
+  "Strip 's from around python string"
+  (if (string-match "^'\\([^\000]+\\)'$" string)
       (match-string 1 string)
     string))
 

+ 1 - 1
contrib/babel/lisp/langs/org-babel-ruby.el

@@ -202,7 +202,7 @@ last statement in BODY, as elisp."
 
 (defun org-babel-ruby-read-string (string)
   "Strip \\\"s from around ruby string"
-  (if (string-match "\"\\([^\000]+\\)\"" string)
+  (if (string-match "^\"\\([^\000]+\\)\"$" string)
       (match-string 1 string)
     string))
 

+ 2 - 1
contrib/babel/lisp/org-babel-exp.el

@@ -142,7 +142,8 @@ options are taken from `org-babel-default-header-args'."
                                            (list 'org-caption
                                                  (format "%s(%s)"
                                                          name (mapconcat #'identity args ", ")))
-                                           str) str)))
+                                           str))
+           str))
       ('lob
        (let ((call-line (and (string-match "results=" (car args))
                              (substring (car args) (match-end 0)))))

+ 3 - 2
contrib/babel/lisp/org-babel.el

@@ -94,13 +94,13 @@ then run `org-babel-pop-to-session'."
   "Regexp used to test when on an inline org-babel src-block")
 
 (defvar org-babel-result-regexp
-  "#\\+res\\(ults\\|name\\)\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:"
+  "^[ \t]*#\\+res\\(ults\\|name\\)\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:"
   "Regular expression used to match result lines.  If the
 results are associated with a hash key then the hash will be
 saved in the second match data.")
 
 (defvar org-babel-source-name-regexp
-  "#\\+\\(srcname\\|source\\|function\\):[ \t]*"
+  "^[ \t]*#\\+\\(srcname\\|source\\|function\\):[ \t]*"
   "Regular expression used to match a source name line.")
 
 (defvar org-babel-min-lines-for-block-output 10
@@ -202,6 +202,7 @@ block."
 		     (if (and (cdr (assoc :noweb params))
                               (string= "yes" (cdr (assoc :noweb params))))
 			 (org-babel-expand-noweb-references info) (second info))))
+
          (result-params (split-string (or (cdr (assoc :results params)) "")))
          (result-type (cond ((member "output" result-params) 'output)
 			    ((member "value" result-params) 'value)

+ 1 - 1
lisp/org-beamer.el

@@ -386,7 +386,7 @@ the value will be inserted right after the documentclass statement."
       (insert org-beamer-header-extra)
       (or (bolp) (insert "\n"))))))
 
-(defcustom org-beamer-fragile-re "^[ \t]*\\\\begin{verbatim}"
+(defcustom org-beamer-fragile-re "^[ \t]*\\\\begin{\\(verbatim\\|lstlisting\\)}"
   "If this regexp matches in a frame, the frame is marked as fragile."
   :group 'org-beamer
   :type 'regexp)

+ 4 - 3
lisp/org-plot.el

@@ -250,8 +250,10 @@ manner suitable for prepending to a user-specified script."
 		 (setf plot-lines
 		       (cons
 			(format plot-str data-file
-				(or (and (not text-ind) ind
-					 (> ind 0) (format "%d:" ind)) "")
+				(or (and ind (> ind 0)
+                                         (not (or (equal 'histograms (plist-get params :with))
+                                                  (equal 'hist (plist-get params :with))))
+                                         (format "%d:" ind)) "")
 				(+ 1 col)
 				(if text-ind (format ":xticlabel(%d)" ind) "")
 				with
@@ -320,7 +322,6 @@ line directly before or after the table."
 			   (mapcar (lambda (row) (nth ind row)) table)))) 0)
 	      (plist-put params :timeind t)
 	    ;; check for text ind column
-
 	    (if (or (string= (plist-get params :with) "hist")
 		    (> (length
 			(delq 0 (mapcar