Hi Nicolas,

Thanks for the quick response!

On Tuesday, 20 Jun 2017 at 19:23, Nicolas Goaziou wrote:

[...]

> That is a serious babel call.

:-)

I think it's a symptom of being lazy and spending way too much time on
codes to make life easier...  as in "The tale of the man who was too
lazy to fail" by Robert Heinlein [1].

> I improved babel call arguments parsing. Could you confirm that your
> wizardry is in order now?

I got further but there's still an error.  See attached debug output.  I
don't understand as org-table-to-lisp does exist.  I don't think it's a
configuration problem but...

thanks,
eric

Footnotes: 
[1]  https://en.wikipedia.org/wiki/Time_Enough_for_Love

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.8-568-ga615d3
Debugger entered--Lisp error: (void-function org-table-to-lisp)
  (org-table-to-lisp)
  (mapcar (function (lambda (row) (if (and (symbolp row) (equal row (quote 
hline))) row (mapcar (function (lambda (el) (org-babel-read el ...))) row)))) 
(org-table-to-lisp))
  org-babel-read-table()
  (cond ((eq val (quote fixed-width)) (let ((v (org-trim (org-element-property 
:value element)))) (or (org-babel--string-to-number v) v))) ((eq val (quote 
table)) (org-babel-read-table)) ((eq val (quote plain-list)) 
(org-babel-read-list)) ((eq val (quote example-block)) (let ((v 
(org-element-property :value element))) (if (or org-src-preserve-indentation 
(org-element-property :preserve-indent element)) v (org-remove-indentation 
v)))) ((eq val (quote export-block)) (org-remove-indentation 
(org-element-property :value element))) ((eq val (quote paragraph)) 
(skip-chars-forward "  ") (if (and (looking-at org-bracket-link-regexp) 
(save-excursion (goto-char (match-end 0)) (skip-chars-forward " 
        \n") (<= (org-element-property :end element) (point)))) 
(org-babel-read-link) (buffer-substring-no-properties (org-element-property 
:contents-begin element) (org-element-property :contents-end element)))) ((memq 
val (quote (special-block verse-block quote-block center-block))) 
(org-remove-indentation (buffer-substring-no-properties (org-element-property 
:contents-begin element) (org-element-property :contents-end element)))) (t 
nil))
  (let* ((val (org-element-type element))) (cond ((eq val (quote fixed-width)) 
(let ((v (org-trim (org-element-property :value element)))) (or 
(org-babel--string-to-number v) v))) ((eq val (quote table)) 
(org-babel-read-table)) ((eq val (quote plain-list)) (org-babel-read-list)) 
((eq val (quote example-block)) (let ((v (org-element-property :value 
element))) (if (or org-src-preserve-indentation (org-element-property 
:preserve-indent element)) v (org-remove-indentation v)))) ((eq val (quote 
export-block)) (org-remove-indentation (org-element-property :value element))) 
((eq val (quote paragraph)) (skip-chars-forward "         ") (if (and 
(looking-at org-bracket-link-regexp) (save-excursion (goto-char (match-end 0)) 
(skip-chars-forward " 
        \n") (<= (org-element-property :end element) (point)))) 
(org-babel-read-link) (buffer-substring-no-properties (org-element-property 
:contents-begin element) (org-element-property :contents-end element)))) ((memq 
val (quote (special-block verse-block quote-block center-block))) 
(org-remove-indentation (buffer-substring-no-properties (org-element-property 
:contents-begin element) (org-element-property :contents-end element)))) (t 
nil)))
  (save-restriction (widen) (goto-char (org-element-property :post-affiliated 
element)) (let* ((val (org-element-type element))) (cond ((eq val (quote 
fixed-width)) (let ((v (org-trim ...))) (or (org-babel--string-to-number v) 
v))) ((eq val (quote table)) (org-babel-read-table)) ((eq val (quote 
plain-list)) (org-babel-read-list)) ((eq val (quote example-block)) (let ((v 
(org-element-property :value element))) (if (or org-src-preserve-indentation 
(org-element-property :preserve-indent element)) v (org-remove-indentation 
v)))) ((eq val (quote export-block)) (org-remove-indentation 
(org-element-property :value element))) ((eq val (quote paragraph)) 
(skip-chars-forward "     ") (if (and (looking-at org-bracket-link-regexp) 
(save-excursion (goto-char ...) (skip-chars-forward " 
        \n") (<= ... ...))) (org-babel-read-link) 
(buffer-substring-no-properties (org-element-property :contents-begin element) 
(org-element-property :contents-end element)))) ((memq val (quote 
(special-block verse-block quote-block center-block))) (org-remove-indentation 
(buffer-substring-no-properties (org-element-property :contents-begin element) 
(org-element-property :contents-end element)))) (t nil))))
  (save-excursion (save-restriction (widen) (goto-char (org-element-property 
:post-affiliated element)) (let* ((val (org-element-type element))) (cond ((eq 
val (quote fixed-width)) (let ((v ...)) (or (org-babel--string-to-number v) 
v))) ((eq val (quote table)) (org-babel-read-table)) ((eq val (quote 
plain-list)) (org-babel-read-list)) ((eq val (quote example-block)) (let ((v 
...)) (if (or org-src-preserve-indentation ...) v (org-remove-indentation v)))) 
((eq val (quote export-block)) (org-remove-indentation (org-element-property 
:value element))) ((eq val (quote paragraph)) (skip-chars-forward "      ") (if 
(and (looking-at org-bracket-link-regexp) (save-excursion ... ... ...)) 
(org-babel-read-link) (buffer-substring-no-properties (org-element-property 
:contents-begin element) (org-element-property :contents-end element)))) ((memq 
val (quote (special-block verse-block quote-block center-block))) 
(org-remove-indentation (buffer-substring-no-properties (org-element-property 
:contents-begin element) (org-element-property :contents-end element)))) (t 
nil)))))
  org-babel-read-element((table (:begin 14485 :end 15445 :type org :tblfm nil 
:contents-begin 14508 :contents-end 15444 :value nil :post-blank 1 
:post-affiliated 14508 :name "subtasks-table" :parent nil)))
  (let* ((sym (org-babel-read-element e))) (if sym (let ((v sym)) (throw :found 
v)) (error "Reference not found")))
  (cond ((eq val (quote babel-call)) (throw :found (org-babel-execute-src-block 
nil (org-babel-lob-get-info e) params))) ((eq val (quote src-block)) (throw 
:found (org-babel-execute-src-block nil nil (and (not 
org-babel-update-intermediate) params)))) (t (let* ((sym 
(org-babel-read-element e))) (if sym (let ((v sym)) (throw :found v)) (error 
"Reference not found")))))
  (let* ((val (org-element-type e))) (cond ((eq val (quote babel-call)) (throw 
:found (org-babel-execute-src-block nil (org-babel-lob-get-info e) params))) 
((eq val (quote src-block)) (throw :found (org-babel-execute-src-block nil nil 
(and (not org-babel-update-intermediate) params)))) (t (let* ((sym 
(org-babel-read-element e))) (if sym (let ((v sym)) (throw :found v)) (error 
"Reference not found"))))))
  (progn (goto-char (org-element-property :post-affiliated e)) (let* ((val 
(org-element-type e))) (cond ((eq val (quote babel-call)) (throw :found 
(org-babel-execute-src-block nil (org-babel-lob-get-info e) params))) ((eq val 
(quote src-block)) (throw :found (org-babel-execute-src-block nil nil (and (not 
org-babel-update-intermediate) params)))) (t (let* ((sym 
(org-babel-read-element e))) (if sym (let (...) (throw :found v)) (error 
"Reference not found")))))))
  (if (equal (org-element-property :name e) ref) (progn (goto-char 
(org-element-property :post-affiliated e)) (let* ((val (org-element-type e))) 
(cond ((eq val (quote babel-call)) (throw :found (org-babel-execute-src-block 
nil (org-babel-lob-get-info e) params))) ((eq val (quote src-block)) (throw 
:found (org-babel-execute-src-block nil nil (and ... params)))) (t (let* ((sym 
...)) (if sym (let ... ...) (error "Reference not found"))))))))
  (let ((e (org-element-at-point))) (if (equal (org-element-property :name e) 
ref) (progn (goto-char (org-element-property :post-affiliated e)) (let* ((val 
(org-element-type e))) (cond ((eq val (quote babel-call)) (throw :found 
(org-babel-execute-src-block nil ... params))) ((eq val (quote src-block)) 
(throw :found (org-babel-execute-src-block nil nil ...))) (t (let* (...) (if 
sym ... ...))))))))
  (if (org-in-commented-heading-p) nil (let ((e (org-element-at-point))) (if 
(equal (org-element-property :name e) ref) (progn (goto-char 
(org-element-property :post-affiliated e)) (let* ((val (org-element-type e))) 
(cond ((eq val ...) (throw :found ...)) ((eq val ...) (throw :found ...)) (t 
(let* ... ...))))))))
  (while (re-search-forward regexp nil t) (if (org-in-commented-heading-p) nil 
(let ((e (org-element-at-point))) (if (equal (org-element-property :name e) 
ref) (progn (goto-char (org-element-property :post-affiliated e)) (let* ((val 
...)) (cond (... ...) (... ...) (t ...))))))))
  (catch :found (while (re-search-forward regexp nil t) (if 
(org-in-commented-heading-p) nil (let ((e (org-element-at-point))) (if (equal 
(org-element-property :name e) ref) (progn (goto-char (org-element-property 
:post-affiliated e)) (let* (...) (cond ... ... ...))))))) (if 
(org-babel-ref-goto-headline-id ref) (progn (throw :found 
(org-babel-ref-headline-body)))) (let ((info (cdr (assq (intern ref) 
org-babel-library-of-babel)))) (if info (progn (throw :found 
(org-babel-execute-src-block nil info params))))) (error "Reference `%s' not 
found in this buffer" ref))
  (let* ((params (append args (quote ((:results . "silent"))))) (regexp 
(org-babel-named-data-regexp-for-name ref)) (result (catch :found (while 
(re-search-forward regexp nil t) (if (org-in-commented-heading-p) nil (let 
(...) (if ... ...)))) (if (org-babel-ref-goto-headline-id ref) (progn (throw 
:found (org-babel-ref-headline-body)))) (let ((info (cdr ...))) (if info (progn 
(throw :found ...)))) (error "Reference `%s' not found in this buffer" ref)))) 
(cond ((symbolp result) (format "%S" result)) ((and index (listp result)) 
(org-babel-ref-index-list index result)) (t result)))
  (save-restriction (widen) (goto-char (point-min)) (let* ((params (append args 
(quote ((:results . "silent"))))) (regexp (org-babel-named-data-regexp-for-name 
ref)) (result (catch :found (while (re-search-forward regexp nil t) (if 
(org-in-commented-heading-p) nil (let ... ...))) (if 
(org-babel-ref-goto-headline-id ref) (progn (throw :found ...))) (let ((info 
...)) (if info (progn ...))) (error "Reference `%s' not found in this buffer" 
ref)))) (cond ((symbolp result) (format "%S" result)) ((and index (listp 
result)) (org-babel-ref-index-list index result)) (t result))))
  (save-excursion (save-restriction (widen) (goto-char (point-min)) (let* 
((params (append args (quote (...)))) (regexp 
(org-babel-named-data-regexp-for-name ref)) (result (catch :found (while 
(re-search-forward regexp nil t) (if ... nil ...)) (if 
(org-babel-ref-goto-headline-id ref) (progn ...)) (let (...) (if info ...)) 
(error "Reference `%s' not found in this buffer" ref)))) (cond ((symbolp 
result) (format "%S" result)) ((and index (listp result)) 
(org-babel-ref-index-list index result)) (t result)))))
  (let ((case-fold-search t) args new-refere new-header-args new-referent 
split-file split-ref index) (if (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) 
(let ((str (substring ref 0 (match-beginning 0)))) (= (cl-count 40 str) 
(cl-count 41 str)))) (progn (setq index (match-string 1 ref)) (setq ref 
(substring ref 0 (match-beginning 0))))) (if (string-match 
"^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (progn (setq 
new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) 
(setq new-referent (match-string 5 ref)) (if (> (length new-refere) 0) (progn 
(if (> (length new-referent) 0) (progn (setq args ...))) (if (> (length 
new-header-args) 0) (progn (setq args ...))) (setq ref new-refere))))) (if 
(string-match "^\\(.+\\):\\(.+\\)$" ref) (progn (setq split-file (match-string 
1 ref)) (setq split-ref (match-string 2 ref)) (find-file split-file) (setq ref 
split-ref))) (save-excursion (save-restriction (widen) (goto-char (point-min)) 
(let* ((params (append args (quote ...))) (regexp 
(org-babel-named-data-regexp-for-name ref)) (result (catch :found (while ... 
...) (if ... ...) (let ... ...) (error "Reference `%s' not found in this 
buffer" ref)))) (cond ((symbolp result) (format "%S" result)) ((and index 
(listp result)) (org-babel-ref-index-list index result)) (t result))))))
  (save-excursion (let ((case-fold-search t) args new-refere new-header-args 
new-referent split-file split-ref index) (if (and (string-match 
"\\[\\([^\\[]+\\)\\]$" ref) (let ((str (substring ref 0 ...))) (= (cl-count 40 
str) (cl-count 41 str)))) (progn (setq index (match-string 1 ref)) (setq ref 
(substring ref 0 (match-beginning 0))))) (if (string-match 
"^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (progn (setq 
new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) 
(setq new-referent (match-string 5 ref)) (if (> (length new-refere) 0) (progn 
(if (> ... 0) (progn ...)) (if (> ... 0) (progn ...)) (setq ref new-refere))))) 
(if (string-match "^\\(.+\\):\\(.+\\)$" ref) (progn (setq split-file 
(match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file 
split-file) (setq ref split-ref))) (save-excursion (save-restriction (widen) 
(goto-char (point-min)) (let* ((params (append args ...)) (regexp 
(org-babel-named-data-regexp-for-name ref)) (result (catch :found ... ... ... 
...))) (cond ((symbolp result) (format "%S" result)) ((and index ...) 
(org-babel-ref-index-list index result)) (t result)))))))
  (save-current-buffer (set-buffer (or org-babel-exp-reference-buffer 
(current-buffer))) (save-excursion (let ((case-fold-search t) args new-refere 
new-header-args new-referent split-file split-ref index) (if (and (string-match 
"\\[\\([^\\[]+\\)\\]$" ref) (let ((str ...)) (= (cl-count 40 str) (cl-count 41 
str)))) (progn (setq index (match-string 1 ref)) (setq ref (substring ref 0 
(match-beginning 0))))) (if (string-match 
"^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (progn (setq 
new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) 
(setq new-referent (match-string 5 ref)) (if (> (length new-refere) 0) (progn 
(if ... ...) (if ... ...) (setq ref new-refere))))) (if (string-match 
"^\\(.+\\):\\(.+\\)$" ref) (progn (setq split-file (match-string 1 ref)) (setq 
split-ref (match-string 2 ref)) (find-file split-file) (setq ref split-ref))) 
(save-excursion (save-restriction (widen) (goto-char (point-min)) (let* 
((params ...) (regexp ...) (result ...)) (cond (... ...) (... ...) (t 
result))))))))
  (progn (save-current-buffer (set-buffer (or org-babel-exp-reference-buffer 
(current-buffer))) (save-excursion (let ((case-fold-search t) args new-refere 
new-header-args new-referent split-file split-ref index) (if (and (string-match 
"\\[\\([^\\[]+\\)\\]$" ref) (let (...) (= ... ...))) (progn (setq index 
(match-string 1 ref)) (setq ref (substring ref 0 ...)))) (if (string-match 
"^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (progn (setq 
new-refere (match-string 1 ref)) (setq new-header-args (match-string 3 ref)) 
(setq new-referent (match-string 5 ref)) (if (> ... 0) (progn ... ... ...)))) 
(if (string-match "^\\(.+\\):\\(.+\\)$" ref) (progn (setq split-file 
(match-string 1 ref)) (setq split-ref (match-string 2 ref)) (find-file 
split-file) (setq ref split-ref))) (save-excursion (save-restriction (widen) 
(goto-char (point-min)) (let* (... ... ...) (cond ... ... ...))))))))
  (unwind-protect (progn (save-current-buffer (set-buffer (or 
org-babel-exp-reference-buffer (current-buffer))) (save-excursion (let 
((case-fold-search t) args new-refere new-header-args new-referent split-file 
split-ref index) (if (and (string-match "\\[\\([^\\[]+\\)\\]$" ref) (let ... 
...)) (progn (setq index ...) (setq ref ...))) (if (string-match 
"^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (progn (setq 
new-refere ...) (setq new-header-args ...) (setq new-referent ...) (if ... 
...))) (if (string-match "^\\(.+\\):\\(.+\\)$" ref) (progn (setq split-file 
...) (setq split-ref ...) (find-file split-file) (setq ref split-ref))) 
(save-excursion (save-restriction (widen) (goto-char ...) (let* ... ...))))))) 
(set-window-configuration wconfig))
  (let ((wconfig (current-window-configuration))) (unwind-protect (progn 
(save-current-buffer (set-buffer (or org-babel-exp-reference-buffer 
(current-buffer))) (save-excursion (let ((case-fold-search t) args new-refere 
new-header-args new-referent split-file split-ref index) (if (and ... ...) 
(progn ... ...)) (if (string-match 
"^\\(.+?\\)\\(\\[\\(.*\\)\\]\\|\\(\\)\\)(\\(.*\\))$" ref) (progn ... ... ... 
...)) (if (string-match "^\\(.+\\):\\(.+\\)$" ref) (progn ... ... ... ...)) 
(save-excursion (save-restriction ... ... ...)))))) (set-window-configuration 
wconfig)))
  org-babel-ref-resolve("subtasks-table[2:-1]")

Attachment: signature.asc
Description: PGP signature

Reply via email to