0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

Fix argument parsing bug.

This commit is contained in:
Dan Davison 2009-07-23 22:55:29 -04:00
parent 6524ce510a
commit f53d61980f
2 changed files with 17 additions and 8 deletions

View file

@ -158,7 +158,7 @@ return nil."
(setq buffer ""))) (setq buffer "")))
((string= holder "(") (setq depth (+ depth 1))) ((string= holder "(") (setq depth (+ depth 1)))
((string= holder ")") (setq depth (- depth 1))))) ((string= holder ")") (setq depth (- depth 1)))))
(reverse (cons buffer return)))) (mapcar #'org-babel-trim (reverse (cons buffer return)))))
(defun org-babel-ref-at-ref-p () (defun org-babel-ref-at-ref-p ()
"Return the type of reference located at point or nil if none "Return the type of reference located at point or nil if none

View file

@ -2284,7 +2284,7 @@ plot data using 1:2 with lines
(see [[* file result types][file result types]]) (see [[* file result types][file result types]])
* Bugs [25/37] * Bugs [26/37]
** TODO creeping blank lines ** TODO creeping blank lines
There's still inappropriate addition of blank lines in some circumstances. There's still inappropriate addition of blank lines in some circumstances.
@ -2484,7 +2484,7 @@ the same for the other languages. [Dan]
** TODO LoB is not populated on startup ** TODO LoB is not populated on startup
org-babel-library-of-babel is nil for me on startup. I have to org-babel-library-of-babel is nil for me on startup. I have to
evaluate the [[file:lisp/org-babel-lob.el::][org-babel-lob-ingest]] line manually. evaluate the [[file:lisp/org-babel-lob.el::][org-babel-lob-ingest]] line manually.
** TODO Fix nested evaluation and default args ** DONE Fix nested evaluation and default args
The current parser / evaluator fails with greater levels of nested The current parser / evaluator fails with greater levels of nested
function block calls (example below). function block calls (example below).
@ -2766,7 +2766,7 @@ arg
#+end_src #+end_src
#+resname: #+resname:
: nil : 4
**** Used to result in this error **** Used to result in this error
: supplied params=nil : supplied params=nil
@ -2784,9 +2784,9 @@ Need to change the regexp in [[file:lisp/org-babel-ref.el::assign%20any%20argume
it only matches when the parenthesis are balanced. Maybe look at it only matches when the parenthesis are balanced. Maybe look at
[[http://www.gnu.org/software/emacs/elisp/html_node/List-Motion.html][this]]. [[http://www.gnu.org/software/emacs/elisp/html_node/List-Motion.html][this]].
*** Still some problems with deeply nested arguments and defaults *** DONE Still some problems with deeply nested arguments and defaults
**** sandbox **** sandbox
**** TODO Parsing / defaults bug **** DONE Parsing / defaults bug
Try inserting a space between 'a=0,' and 'b=0' and comparing results Try inserting a space between 'a=0,' and 'b=0' and comparing results
#+srcname: parsing-defaults-bug() #+srcname: parsing-defaults-bug()
#+begin_src python :var arg=adder(a=adder(a=0,b=0)) #+begin_src python :var arg=adder(a=adder(a=0,b=0))
@ -2796,6 +2796,17 @@ arg
#+resname: parsing-defaults-bug #+resname: parsing-defaults-bug
: 99 : 99
#+srcname: deeply-nested-args-bug-orig()
#+begin_src python :var arg=adder(a=adder(a=one(),b=one()),b=adder(a=adder(a=3, b=4),b=one()))
arg
#+end_src
#+resname: deeply-nested-args-bug-orig
: 10
**** DONE Nesting problem II **** DONE Nesting problem II
This generates parsing errors This generates parsing errors
@ -2868,7 +2879,6 @@ arg
*** DONE Arg lacking default *** DONE Arg lacking default
@ -2889,7 +2899,6 @@ a+b
var var
#+end_src #+end_src
** DONE allow srcname to omit function call parentheses ** DONE allow srcname to omit function call parentheses
Someone needs to revisit those regexps. Is there an argument for Someone needs to revisit those regexps. Is there an argument for
moving some of the regexps used to match function calls into moving some of the regexps used to match function calls into