Browse Source

Merge branch 'master' of orgmode.org:org-mode

Bastien Guerry 13 years ago
parent
commit
ef3d83d0cf
8 changed files with 15 additions and 21 deletions
  1. 1 1
      README_DIST
  2. 1 1
      doc/org.texi
  3. 1 1
      doc/orgcard.tex
  4. 1 1
      doc/orgguide.texi
  5. 1 1
      lisp/ob-fortran.el
  6. 1 14
      lisp/ob-ref.el
  7. 2 2
      lisp/org.el
  8. 7 0
      testing/lisp/test-ob.el

+ 1 - 1
README_DIST

@@ -1,7 +1,7 @@
 The is a distribution of Org, a plain text notes and project planning
 tool for Emacs.
 
-The version of this release is: 7.8
+The version of this release is: 7.8.01
 
 The homepage of Org is at http://orgmode.org
 

+ 1 - 1
doc/org.texi

@@ -4,7 +4,7 @@
 @setfilename ../../info/org
 @settitle The Org Manual
 
-@set VERSION 7.8
+@set VERSION 7.8.01
 @set DATE December 2011
 
 @c Use proper quote and backtick for code sections in PDF output

+ 1 - 1
doc/orgcard.tex

@@ -1,5 +1,5 @@
 % Reference Card for Org Mode
-\def\orgversionnumber{7.8}
+\def\orgversionnumber{7.8.01}
 \def\versionyear{2011}          % latest update
 \def\year{2011}                 % latest copyright year
 

+ 1 - 1
doc/orgguide.texi

@@ -3,7 +3,7 @@
 @setfilename ../../info/orgguide
 @settitle The compact Org-mode Guide
 
-@set VERSION 7.8
+@set VERSION 7.8.01
 @set DATE December 2011
 
 @c Use proper quote and backtick for code sections in PDF output

+ 1 - 1
lisp/ob-fortran.el

@@ -5,7 +5,7 @@
 ;; Authors: Sergey Litvinov (based on ob-C.el by Eric Schulte), Eric Schulte
 ;; Keywords: literate programming, reproducible research, fortran
 ;; Homepage: http://orgmode.org
-;; Version: 7.8
+;; Version: 7.8.01
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by

+ 1 - 14
lisp/ob-ref.el

@@ -244,20 +244,7 @@ to \"0:-1\"."
 
 (defun org-babel-ref-split-args (arg-string)
   "Split ARG-STRING into top-level arguments of balanced parenthesis."
-  (let ((index 0) (depth 0) (buffer "") holder return)
-    ;; crawl along string, splitting at any ","s which are on the top level
-    (while (< index (length arg-string))
-      (setq holder (substring arg-string index (+ 1 index)))
-      (setq buffer (concat buffer holder))
-      (setq index (+ 1 index))
-      (cond
-       ((string= holder ",")
-        (when (= depth 0)
-          (setq return (cons (substring buffer 0 -1) return))
-          (setq buffer "")))
-       ((or (string= holder "(") (string= holder "[")) (setq depth (+ depth 1)))
-       ((or (string= holder ")") (string= holder "]")) (setq depth (- depth 1)))))
-    (mapcar #'org-babel-trim (reverse (cons buffer return)))))
+  (mapcar #'org-babel-trim (org-babel-balanced-split arg-string 44)))
 
 (defvar org-bracket-link-regexp)
 (defun org-babel-ref-at-ref-p ()

+ 2 - 2
lisp/org.el

@@ -6,7 +6,7 @@
 ;; Maintainer: Bastien Guerry <bzg at gnu dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://orgmode.org
-;; Version: 7.8
+;; Version: 7.8.01
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -203,7 +203,7 @@ identifier."
 
 ;;; Version
 
-(defconst org-version "7.8"
+(defconst org-version "7.8.01"
   "The version number of the file org.el.")
 
 (defun org-version (&optional here)

+ 7 - 0
testing/lisp/test-ob.el

@@ -576,6 +576,13 @@ on two lines
 #+end_src"
     (should (string= (org-babel-expand-noweb-references) "barbaz"))))
 
+(ert-deftest test-ob/splitting-variable-lists-in-references ()
+  (org-test-with-temp-text ""
+    (should (= 1 (length (org-babel-ref-split-args
+			  "a=\"this, no work\""))))
+    (should (= 2 (length (org-babel-ref-split-args
+			  "a=\"this, no work\", b=1"))))))
+
 (provide 'test-ob)
 
 ;;; test-ob ends here