emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] Specified colnames
@ 2013-04-07 20:11 Sebastien Vauban
  2013-04-08 16:41 ` Eric Schulte
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastien Vauban @ 2013-04-07 20:11 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric,

I'm trying to specify the column names of the table.

#+name: input
| title | baz |
|-------+-----|
| obs1  | foo |
| obs2  | bar |

But both versions (with symbols or strings) just do return the plain input
table.

#+name: R-echo-colnames-list
#+begin_src R :var data=input :exports results :colnames '(Rev Author)
data
#+end_src

#+name: R-echo-colnames-qlist
#+begin_src R :var data=input :exports results :colnames '("Rev" "Author")
data
#+end_src

Am I doing something wrong?

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-07 20:11 [babel] Specified colnames Sebastien Vauban
@ 2013-04-08 16:41 ` Eric Schulte
  2013-04-08 19:45   ` Sebastien Vauban
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Schulte @ 2013-04-08 16:41 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> Hi Eric,
>
> I'm trying to specify the column names of the table.
>
> #+name: input
> | title | baz |
> |-------+-----|
> | obs1  | foo |
> | obs2  | bar |
>
> But both versions (with symbols or strings) just do return the plain input
> table.
>
> #+name: R-echo-colnames-list
> #+begin_src R :var data=input :exports results :colnames '(Rev Author)
> data
> #+end_src
>
> #+name: R-echo-colnames-qlist
> #+begin_src R :var data=input :exports results :colnames '("Rev" "Author")
> data
> #+end_src
>
> Am I doing something wrong?
>
> Best regards,
>   Seb

It looks like ob-R implements its own result table reconstruction
instead of using the general support.  This is because R actually has a
notion of column names and row names internally.  The implementation in
ob-R does not correctly handle specified colnmaes as your example shows.

The attached patch brings ob-R closer to the using the unified general
table reconstructed used in most other languages, and fixes your problem
mentioned above.  I haven't applied it however, as it may introduce
other bugs related to specifying column names from within R.  For
example, I'm not sure that it will now correctly apply column names from
a table built entirely from within R.

Additional testing by someone more familiar with R than myself would be
greatly appreciated.

Thanks,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-use-org-babel-reassemble-table-in-ob-R.patch --]
[-- Type: text/x-patch, Size: 3403 bytes --]

From 680bfe22c423d5fad43348fc86eba6618f3aa57c Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Mon, 8 Apr 2013 10:36:32 -0600
Subject: [PATCH] use org-babel-reassemble-table in ob-R

* lisp/ob-R.el (org-babel-execute:R): Use org-babel-reassemble-table to
  reconstruct tables with column and row names.
  (org-babel-R-evaluate-external-process): Don't use R-specific table
  reconstruction.
  (org-babel-R-evaluate-session): Don't use R-specific table
  reconstruction.
---
 lisp/ob-R.el | 46 ++++++++++++++++++----------------------------
 1 file changed, 18 insertions(+), 28 deletions(-)

diff --git a/lisp/ob-R.el b/lisp/ob-R.el
index 67d3c37..b424f0f 100644
--- a/lisp/ob-R.el
+++ b/lisp/ob-R.el
@@ -111,13 +111,14 @@ This function is called by `org-babel-execute-src-block'."
 	   (result
 	    (org-babel-R-evaluate
 	     session full-body result-type result-params
-	     (or (equal "yes" colnames-p)
-		 (org-babel-pick-name
-		  (cdr (assoc :colname-names params)) colnames-p))
-	     (or (equal "yes" rownames-p)
-		 (org-babel-pick-name
-		  (cdr (assoc :rowname-names params)) rownames-p)))))
-      (if graphics-file nil result))))
+	     (equal "yes" colnames-p) (equal "yes" rownames-p))))
+      (if graphics-file nil
+	(org-babel-reassemble-table
+	 result
+	 (org-babel-pick-name (cdr (assoc :colname-names params))
+			      (cdr (assoc :colnames params)))
+	 (org-babel-pick-name (cdr (assoc :rowname-names params))
+			      (cdr (assoc :rownames params))))))))
 
 (defun org-babel-prep-session:R (session params)
   "Prepare SESSION according to the header arguments specified in PARAMS."
@@ -301,13 +302,11 @@ last statement in BODY, as elisp."
 				 "FALSE")
 			       (format "{function ()\n{\n%s\n}}()" body)
 			       (org-babel-process-file-name tmp-file 'noquote)))
-       (org-babel-R-process-value-result
-	(org-babel-result-cond result-params
-	  (with-temp-buffer
-	    (insert-file-contents tmp-file)
-	    (buffer-string))
-	  (org-babel-import-elisp-from-file tmp-file '(16)))
-	column-names-p)))
+       (org-babel-result-cond result-params
+	 (with-temp-buffer
+	   (insert-file-contents tmp-file)
+	   (buffer-string))
+	 (org-babel-import-elisp-from-file tmp-file '(16)))))
     (output (org-babel-eval org-babel-R-command body))))
 
 (defun org-babel-R-evaluate-session
@@ -333,13 +332,11 @@ last statement in BODY, as elisp."
 		    (if row-names-p "NA" "TRUE")
 		  "FALSE")
 		".Last.value" (org-babel-process-file-name tmp-file 'noquote)))
-       (org-babel-R-process-value-result
-	(org-babel-result-cond result-params
-	  (with-temp-buffer
-	    (insert-file-contents tmp-file)
-	    (buffer-string))
-	  (org-babel-import-elisp-from-file tmp-file '(16)))
-	column-names-p)))
+       (org-babel-result-cond result-params
+	 (with-temp-buffer
+	   (insert-file-contents tmp-file)
+	   (buffer-string))
+	 (org-babel-import-elisp-from-file tmp-file '(16)))))
     (output
      (mapconcat
       #'org-babel-chomp
@@ -359,13 +356,6 @@ last statement in BODY, as elisp."
 				    "\n"))
 		 (inferior-ess-send-input)))))) "\n"))))
 
-(defun org-babel-R-process-value-result (result column-names-p)
-  "R-specific processing of return value.
-Insert hline if column names in output have been requested."
-  (if column-names-p
-      (cons (car result) (cons 'hline (cdr result)))
-    result))
-
 (provide 'ob-R)
 
 
-- 
1.8.2


[-- Attachment #3: Type: text/plain, Size: 46 bytes --]


-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-08 16:41 ` Eric Schulte
@ 2013-04-08 19:45   ` Sebastien Vauban
  2013-04-08 20:15     ` Eric Schulte
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastien Vauban @ 2013-04-08 19:45 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric,

Eric Schulte wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> I'm trying to specify the column names of the table.
>>
>> #+name: input
>> | title | baz |
>> |-------+-----|
>> | obs1  | foo |
>> | obs2  | bar |
>>
>> But both versions (with symbols or strings) just do return the plain input
>> table.
>>
>> #+name: R-echo-colnames-list
>> #+begin_src R :var data=input :exports results :colnames '(Rev Author)
>> data
>> #+end_src
>>
>> #+name: R-echo-colnames-qlist
>> #+begin_src R :var data=input :exports results :colnames '("Rev" "Author")
>> data
>> #+end_src
>>
>> Am I doing something wrong?
>
> It looks like ob-R implements its own result table reconstruction
> instead of using the general support.  This is because R actually has a
> notion of column names and row names internally.  The implementation in
> ob-R does not correctly handle specified colnmaes as your example shows.
>
> The attached patch brings ob-R closer to the using the unified general
> table reconstructed used in most other languages, and fixes your problem
> mentioned above.  I haven't applied it however, as it may introduce
> other bugs related to specifying column names from within R.  For
> example, I'm not sure that it will now correctly apply column names from
> a table built entirely from within R.

Thanks for your help.

Extra question: tested with a sh block, both of the above do work, that is
with strings or symbols. Which one is supposed to be better (that is, will be
more portable with time), if there is one?

> Additional testing by someone more familiar with R than myself would be
> greatly appreciated.

Can't yet be that person, sadly. But time will come that...

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-08 19:45   ` Sebastien Vauban
@ 2013-04-08 20:15     ` Eric Schulte
  2013-04-08 20:49       ` Sebastien Vauban
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Schulte @ 2013-04-08 20:15 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

>
> Thanks for your help.
>
> Extra question: tested with a sh block, both of the above do work, that is
> with strings or symbols. Which one is supposed to be better (that is, will be
> more portable with time), if there is one?
>

Both will be maintained.  The contribution of a test exercising both
options could provide an extra guarantee of perseverance.  This is also
a good first step towards editing the code. :)

>
>> Additional testing by someone more familiar with R than myself would be
>> greatly appreciated.
>
> Can't yet be that person, sadly. But time will come that...
>
> Best regards,
>   Seb

Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-08 20:15     ` Eric Schulte
@ 2013-04-08 20:49       ` Sebastien Vauban
  2013-04-12 21:42         ` Eric Schulte
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastien Vauban @ 2013-04-08 20:49 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Eric,

Eric Schulte wrote:
>> Extra question: tested with a sh block, both of the above do work, that is
>> with strings or symbols. Which one is supposed to be better (that is, will be
>> more portable with time), if there is one?
>
> Both will be maintained.  The contribution of a test exercising both
> options could provide an extra guarantee of perseverance.  This is also
> a good first step towards editing the code. :)

Here's my trial to do so.

--8<---------------cut here---------------start------------->8---
(ert-deftest test-ob/specific-column-names-symbols ()
  "Test passing specific column names as a list of symbols."
  (should
   (equal "#+name: input-table
| id | var1 |
|----+------|
|  1 | bar  |
|  2 | baz  |

#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
echo \"$data\"
#+end_src

#+results:
| Rev | Author |
|-----+--------|
|   1 | bar    |
|   2 | baz    |

"
	  (org-test-with-temp-text "#+name: input-table
| id | var1 |
|----+------|
|  1 | bar  |
|  2 | baz  |

#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
echo \"$data\"
#+end_src
"
				   (org-babel-execute-src-block)
				   (buffer-string)))))
--8<---------------cut here---------------end--------------->8---

Does this correspond to what you're asking for?

However, running it did not succeed. I must do something wrong, or NOT do
something good...

  ╭────
  │ Selector: t
  │ Passed: 0
  │ Failed: 0
  │ Total:  0/1
  │ 
  │ Started at:   2013-04-08 22:45:19+0200
  │ Aborted.
  │ Aborted at:   2013-04-08 22:45:19+0200
  │ 
  │ A
  │ 
  │ A test-ob/specific-column-names-symbols
  │     Test passing specific column names as a list of symbols.
  │     aborted
  ╰────

The worse is that I don't get a backtrace, even after:

- setting debug-on-error to t, or
- M-x'ing toggle-debug-on-error.

Weird, but not the first time -- seems related to Emacs 24.2 or so (+ my
config?).

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-08 20:49       ` Sebastien Vauban
@ 2013-04-12 21:42         ` Eric Schulte
  2013-04-18 21:25           ` Sebastien Vauban
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Schulte @ 2013-04-12 21:42 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> Eric,
>
> Eric Schulte wrote:
>>> Extra question: tested with a sh block, both of the above do work, that is
>>> with strings or symbols. Which one is supposed to be better (that is, will be
>>> more portable with time), if there is one?
>>
>> Both will be maintained.  The contribution of a test exercising both
>> options could provide an extra guarantee of perseverance.  This is also
>> a good first step towards editing the code. :)
>
> Here's my trial to do so.
>
> --8<---------------cut here---------------start------------->8---
> (ert-deftest test-ob/specific-column-names-symbols ()
>   "Test passing specific column names as a list of symbols."
>   (should
>    (equal "#+name: input-table
> | id | var1 |
> |----+------|
> |  1 | bar  |
> |  2 | baz  |
>
> #+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> echo \"$data\"
> #+end_src
>
> #+results:
> | Rev | Author |
> |-----+--------|
> |   1 | bar    |
> |   2 | baz    |
>
> "
> 	  (org-test-with-temp-text "#+name: input-table
> | id | var1 |
> |----+------|
> |  1 | bar  |
> |  2 | baz  |
>
> #+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> echo \"$data\"
> #+end_src
> "
> 				   (org-babel-execute-src-block)
> 				   (buffer-string)))))
> --8<---------------cut here---------------end--------------->8---
>
> Does this correspond to what you're asking for?
>

Close, could you prepare this as a patch against the current code base?
That way I can simply apply it locally and more easily test it.

>
> However, running it did not succeed. I must do something wrong, or NOT do
> something good...
>
>   ╭────
>   │ Selector: t
>   │ Passed: 0
>   │ Failed: 0
>   │ Total:  0/1
>   │ 
>   │ Started at:   2013-04-08 22:45:19+0200
>   │ Aborted.
>   │ Aborted at:   2013-04-08 22:45:19+0200
>   │ 
>   │ A
>   │ 
>   │ A test-ob/specific-column-names-symbols
>   │     Test passing specific column names as a list of symbols.
>   │     aborted
>   ╰────
>
> The worse is that I don't get a backtrace, even after:
>
> - setting debug-on-error to t, or
> - M-x'ing toggle-debug-on-error.
>
> Weird, but not the first time -- seems related to Emacs 24.2 or so (+ my
> config?).
>

Integration these tests with the existing tests should help to
illuminate whatever is causing these failures.  Assuming that the
existing tests are passing on your system that is.

Cheers,

>
> Best regards,
>   Seb

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-12 21:42         ` Eric Schulte
@ 2013-04-18 21:25           ` Sebastien Vauban
  2013-04-20 10:11             ` Eric Schulte
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastien Vauban @ 2013-04-18 21:25 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Eric,

Eric Schulte wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> Eric Schulte wrote:
>>>> Extra question: tested with a sh block, both of the above do work, that is
>>>> with strings or symbols. Which one is supposed to be better (that is, will be
>>>> more portable with time), if there is one?
>>>
>>> Both will be maintained.  The contribution of a test exercising both
>>> options could provide an extra guarantee of perseverance.  This is also
>>> a good first step towards editing the code. :)
>>
>> Here's my trial to do so [...].
>> Does this correspond to what you're asking for?
>
> Close, could you prepare this as a patch against the current code base?
> That way I can simply apply it locally and more easily test it.

I've fixed the "abortion" problem I had with the test...

Updated version:

--8<---------------cut here---------------start------------->8---
(ert-deftest test-ob/specific-colnames ()
  "Test passing specific column names."
  (should
   (equal "#+name: input-table
| id | var1 |
|----+------|
|  1 | bar  |
|  2 | baz  |

#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
echo \"$data\"
#+end_src

#+results:
| Rev | Author |
|-----+--------|
|   1 | bar    |
|   2 | baz    |

"
        (org-test-with-temp-text "#+name: input-table
| id | var1 |
|----+------|
|  1 | bar  |
|  2 | baz  |

#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
echo \"$data\"
#+end_src
"
                                 (org-babel-execute-src-block)
                                 (buffer-string)))))
--8<---------------cut here---------------end--------------->8---

Though, it generates an incomprehensible error (for me):

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument consp nil)
  apply(debug (error (wrong-type-argument consp nil)))
  ert--run-test-debugger([cl-struct-ert--test-execution-info [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804))) nil :passed nil] [cl-struct-ert-test-failed nil nil (wrong-type-argument consp nil) ((t setcar nil ((:comments . "") (:shebang . "") (:cache . "") (:padline . "") (:noweb . "") (:tangle . "") (:exports . "") (:results . ""))) (nil let* ((c (nthcdr 2 i))) (setcar c merged-params)) (nil let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i) (nil org-babel-check-evaluate (let ((i info)) (let* ((c ...)) (setcar c merged-params)) i)) (nil if (org-babel-check-evaluate (let ((i info)) (let* (...) (setcar c merged-params)) i)) (progn (let* ((params ...) (cachep ...) (new-hash ...) (old-hash ...) (cache-current-p ...)) (cond (cache-current-p ...) (... ...))))) (nil let* ((info (if info (copy-tree info) (org-babel-get-src-block-info))) (merged-params (org-babel-merge-params (nth 2 info) params))) (if (org-babel-check-evaluate (let (...) (let* ... ...) i)) (progn (let* (... ... ... ... ...) (cond ... ...))))) (t org-babel-execute-src-block) (nil progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (nil unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (nil save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char ...)) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (nil let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn ... ...) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (nil list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...))))) (nil let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804)) (t (lambda nil (let ((fn-802 ...) (args-803 ...)) (let (...) (let ... ...) value-804)))) (t byte-code "\306\307!r\bq\210\310\216\311 \312\216\313\314\315\316\317D\316\nD\320FE\321\211\322\211\x1c\x1e\x1e\nJ\323H\x1f>\2046\324\325\326\327#\210\nJ\330H\323H >\204H\324\325\331\332#\210\nJ\323H\x1f>\204X\324\325\326\327#\210\nJ\330H\333H \210.\n\334 \207" [temp-buffer wconfig --cl-info-- ert--infos debug-ignored-errors debug-on-quit generate-new-buffer " *temp*" ((byte-code "\301\b!\203\n\302\b!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) current-window-configuration ((set-window-configuration wconfig)) lambda (&rest --cl-rest--) apply quote #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3] --cl-rest-- t nil 0 error "%s accessing a non-%s" ert--test-execution-info-test ert--test-execution-info 1 ert-test-body ert-test 3 ert-pass debug-on-error debugger cl-struct-ert--test-execution-info-tags cl-struct-ert-test-tags] 6) (t ert--run-test-internal #0) (t byte-code "\306\307!\211\211r\310\311!q\210\312 d\313\223)L\210)\314\216\306\315!\306\316!\211\211\317\320\317\321\313\211#\322\313\211&L\210)\n\211\x1c\313L\210)\323\216\324\325\326\327\330D\327\nD\327\vD\327\bD\331\257E\332\x0eB\x1d\x1e\x1f\333\vJ!\210.\b\313\207" [--cl-begin-marker-- v --cl-should-form-accu-- --cl-info-- v ert-test make-symbol "--begin-marker--" get-buffer-create "*Messages*" make-marker nil ((byte-code "\bJ\301\211\223\207" [--cl-begin-marker-- nil] 3)) "--info--" "--should-form-accu--" vector cl-struct-ert--test-execution-info cl-struct-ert-test-aborted-with-non-local-exit #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] ((byte-code "\bJ\306H	>\204\0\307\310\311\312#\210\bJ\313H\211\306H\v>\204\"\307\310\314\315#\210\n\211\316r\317\320!q\210Jd{)I\210)\321 \210\x16\211\x17\x16J\237L\210)\n\306H\v>\204Q\307\310\322\315#\210\n\211\x18\313\x16JI\210)\x14\306H\x19>\204l\307\310\323\324#\210\x14\211\x1a\325\nI\210*\306\207" [--cl-info-- cl-struct-ert--test-execution-info-tags result cl-struct-ert-test-result-tags v --cl-begin-marker-- 0 error "%s accessing a non-%s" ert--test-execution-info-result ert--test-execution-info 2 ert-test-result-messages ert-test-result 1 get-buffer-create "*Messages*" ert--force-message-log-buffer-truncation ert-test-result-should-forms ert-test-most-recent-result ert-test 4 --cl-should-form-accu-- v v cl-struct-ert-test-tags v] 5)) lambda (&rest --cl-rest--) apply quote #[(G77602 G77603 G77604 form-description) "\b\211\n\bJBL)\207" [G77602 v form-description] 4] --cl-rest-- t ert--run-test-internal v ert--running-tests message-log-max ert--should-execution-observer] 9) (t ert-run-test [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let (... ...) (let ... ... value-804))) nil :passed nil]) (t ert-run-or-rerun-test [cl-struct-ert--stats "specific-colnames" [[cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil ...) nil :passed nil]] #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8 data (test-ob/specific-colnames 0)) [nil] [(20848 25509 799000 0)] [(20848 25504 127000 0)] 0 0 0 0 (20848 25504 96000 0) (20848 25504 127000 0) nil [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ... ...)) nil :passed nil] 1366320037.899] [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let (... ...) (let ... ... value-804))) nil :passed nil] (lambda (&rest --cl-rest--) (apply (quote #[... "\306\b\307\"\2032	\211G\310U\203\0\n@\202\0\311\312\313\nGD\"\f\211\314\v.J/J#L\210)\315\fJ!*\207\306\b\316\"\203\224	\2110G\317U\203M\x0e0\211A0@\202U\311\312\3130GD\"\x0e0@12J\3201\204h\321\202i\322\323\v!\324\v!\325\v!3\3263!\203\x7f\321\202\204\327\3303\")%\210\331r\fJq\2104)\v\"+\207\306\b\332\"\203\x01	\2115G\317U\203\257\x0e5\211A5@\202\267\311\312\3135GD\"\x0e5@6r\fJq\21047\333\v6\"8\33478\"\211\x1e\204\337\311\335\336C\"\210\x1e\317H\2119\337H:>\204\364\340\341\342\343#\2109\211;\3106I\210*<8\344\313\345\"I\210\3467\v\"\210\3477\x1e\".\a\207\306\b\350\"\203\301	\211=G\351U\2033\x0e=\211A=@\202;\311\312\313=GD\"\x0e=\211A=@6=@>r\fJq\21047\333\v6\"8\33478\"\211\x1e\317H\2119\337H:>\204v\340\341\352\343#\2109\317H)\203\242\x0e\317H\2119\337H:>\204\223\340\341\352\343#\2109\211?\317\3536>\"I\210*<8\344>\3536>\"\"I\210\3467\v\"\210\3477\x1e\".\b\207\340\354\b\355#\205\312\313\207" [event-type event-args --cl-rest-- stats G77608 v eql run-started 1 signal wrong-number-of-arguments nil ert--setup-results-buffer pop-to-buffer run-ended 2 "%sRan %s tests, %s results were as expected%s" "" "Aborted: " ert-stats-total ert-stats-completed-expected ert-stats-completed-unexpected zerop format ", %s unexpected" ert--results-update-stats-display test-started ert--stats-test-pos ewoc-nth cl-assertion-failed node 0 error "%s accessing a non-%s" ert--ewoc-entry-test ert--ewoc-entry ert-char-for-test-result t ert--results-update-stats-display-maybe ewoc-invalidate test-ended 3 ert--ewoc-entry-hidden-p ert-test-result-expected-p "cl-ecase failed: %s, %s" ... G77607 G77609 --cl-rest-- abortedp ...] 9]) (quote --message-fn--) (quote --listener--) (quote --buffer--) (quote --output-buffer-name--) --cl-rest--))) (t ert-results-rerun-test-at-point) (t ert-results-rerun-test-at-point-debugging-errors) (t call-interactively ert-results-rerun-test-at-point-debugging-errors nil nil)) nil] #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] debug t] (error (wrong-type-argument consp nil)))
  #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3](--info-- error (wrong-type-argument consp nil))
  apply(#[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3] --info-- (error (wrong-type-argument consp nil)))
  (lambda (&rest --cl-rest--) (apply (quote #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3]) (quote --info--) --cl-rest--))(error (wrong-type-argument consp nil))
  setcar(nil ((:comments . "") (:shebang . "") (:cache . "") (:padline . "") (:noweb . "") (:tangle . "") (:exports . "") (:results . "")))
  (let* ((c (nthcdr 2 i))) (setcar c merged-params))
  (let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i)
  (org-babel-check-evaluate (let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i))
  (if (org-babel-check-evaluate (let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i)) (progn (let* ((params (if params (org-babel-process-params merged-params) (nth 2 info))) (cachep (and (not arg) (cdr (assoc :cache params)) (string= "yes" (cdr ...)))) (new-hash (if cachep (progn (org-babel-sha1-hash info)))) (old-hash (if cachep (progn (org-babel-current-result-hash)))) (cache-current-p (and (not arg) new-hash (equal new-hash old-hash)))) (cond (cache-current-p (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (end-of-line 1) (forward-char 1) (let (...) (message ...) result))) ((org-babel-confirm-evaluate (let (...) (let* ... ...) i)) (let* ((lang ...) (result-params ...) (body ...) (dir ...) (default-directory ...) (org-babel-call-process-region-original ...) (indent ...) result cmd) (unwind-protect (let ... ... ... ...) (setq call-process-region ...))))))))
  (let* ((info (if info (copy-tree info) (org-babel-get-src-block-info))) (merged-params (org-babel-merge-params (nth 2 info) params))) (if (org-babel-check-evaluate (let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i)) (progn (let* ((params (if params (org-babel-process-params merged-params) (nth 2 info))) (cachep (and (not arg) (cdr ...) (string= "yes" ...))) (new-hash (if cachep (progn ...))) (old-hash (if cachep (progn ...))) (cache-current-p (and (not arg) new-hash (equal new-hash old-hash)))) (cond (cache-current-p (save-excursion (goto-char ...) (end-of-line 1) (forward-char 1) (let ... ... result))) ((org-babel-confirm-evaluate (let ... ... i)) (let* (... ... ... ... ... ... ... result cmd) (unwind-protect ... ...))))))))
  org-babel-execute-src-block()
  (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string))
  (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
  (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...))))))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect (setq value-804 (apply fn-802 args-803)) (setq form-description-806 (nconc (list ...) (list :form ...) (if ... nil ...) (let ... ...))) (ert--signal-should-execution form-description-806)) nil (ert-fail form-description-806))) value-804))
  (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...)))))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect (setq value-804 (apply fn-802 args-803)) (setq form-description-806 (nconc ... ... ... ...)) (ert--signal-should-execution form-description-806)) nil (ert-fail form-description-806))) value-804)))()
  byte-code("\306\307!r\bq\210\310\216\311 \312\216\313\314\315\316\317D\316\nD\320FE\321\211\322\211\x1c\x1e\x1e\nJ\323H\x1f>\2046\324\325\326\327#\210\nJ\330H\323H >\204H\324\325\331\332#\210\nJ\323H\x1f>\204X\324\325\326\327#\210\nJ\330H\333H \210.\n\334 \207" [temp-buffer wconfig --cl-info-- ert--infos debug-ignored-errors debug-on-quit generate-new-buffer " *temp*" ((byte-code "\301\b!\203\n\302\b!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) current-window-configuration ((set-window-configuration wconfig)) lambda (&rest --cl-rest--) apply quote #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3] --cl-rest-- t nil 0 error "%s accessing a non-%s" ert--test-execution-info-test ert--test-execution-info 1 ert-test-body ert-test 3 ert-pass debug-on-error debugger cl-struct-ert--test-execution-info-tags cl-struct-ert-test-tags] 6)
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804))) nil :passed nil] [cl-struct-ert-test-failed nil nil (wrong-type-argument consp nil) ((t setcar nil ((:comments . "") (:shebang . "") (:cache . "") (:padline . "") (:noweb . "") (:tangle . "") (:exports . "") (:results . ""))) (nil let* ((c (nthcdr 2 i))) (setcar c merged-params)) (nil let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i) (nil org-babel-check-evaluate (let ((i info)) (let* ((c ...)) (setcar c merged-params)) i)) (nil if (org-babel-check-evaluate (let ((i info)) (let* (...) (setcar c merged-params)) i)) (progn (let* ((params ...) (cachep ...) (new-hash ...) (old-hash ...) (cache-current-p ...)) (cond (cache-current-p ...) (... ...))))) (nil let* ((info (if info (copy-tree info) (org-babel-get-src-block-info))) (merged-params (org-babel-merge-params (nth 2 info) params))) (if (org-babel-check-evaluate (let (...) (let* ... ...) i)) (progn (let* (... ... ... ... ...) (cond ... ...))))) (t org-babel-execute-src-block) (nil progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (nil unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (nil save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char ...)) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (nil let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn ... ...) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (nil list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...))))) (nil let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804)) (t (lambda nil (let ((fn-802 ...) (args-803 ...)) (let (...) (let ... ...) value-804)))) (t byte-code "\306\307!r\bq\210\310\216\311 \312\216\313\314\315\316\317D\316\nD\320FE\321\211\322\211\x1c\x1e\x1e\nJ\323H\x1f>\2046\324\325\326\327#\210\nJ\330H\323H >\204H\324\325\331\332#\210\nJ\323H\x1f>\204X\324\325\326\327#\210\nJ\330H\333H \210.\n\334 \207" [temp-buffer wconfig --cl-info-- ert--infos debug-ignored-errors debug-on-quit generate-new-buffer " *temp*" ((byte-code "\301\b!\203\n\302\b!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) current-window-configuration ((set-window-configuration wconfig)) lambda (&rest --cl-rest--) apply quote #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3] --cl-rest-- t nil 0 error "%s accessing a non-%s" ert--test-execution-info-test ert--test-execution-info 1 ert-test-body ert-test 3 ert-pass debug-on-error debugger cl-struct-ert--test-execution-info-tags cl-struct-ert-test-tags] 6) (t ert--run-test-internal #0) (t byte-code "\306\307!\211\211r\310\311!q\210\312 d\313\223)L\210)\314\216\306\315!\306\316!\211\211\317\320\317\321\313\211#\322\313\211&L\210)\n\211\x1c\313L\210)\323\216\324\325\326\327\330D\327\nD\327\vD\327\bD\331\257E\332\x0eB\x1d\x1e\x1f\333\vJ!\210.\b\313\207" [--cl-begin-marker-- v --cl-should-form-accu-- --cl-info-- v ert-test make-symbol "--begin-marker--" get-buffer-create "*Messages*" make-marker nil ((byte-code "\bJ\301\211\223\207" [--cl-begin-marker-- nil] 3)) "--info--" "--should-form-accu--" vector cl-struct-ert--test-execution-info cl-struct-ert-test-aborted-with-non-local-exit #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] ((byte-code "\bJ\306H	>\204\0\307\310\311\312#\210\bJ\313H\211\306H\v>\204\"\307\310\314\315#\210\n\211\316r\317\320!q\210Jd{)I\210)\321 \210\x16\211\x17\x16J\237L\210)\n\306H\v>\204Q\307\310\322\315#\210\n\211\x18\313\x16JI\210)\x14\306H\x19>\204l\307\310\323\324#\210\x14\211\x1a\325\nI\210*\306\207" [--cl-info-- cl-struct-ert--test-execution-info-tags result cl-struct-ert-test-result-tags v --cl-begin-marker-- 0 error "%s accessing a non-%s" ert--test-execution-info-result ert--test-execution-info 2 ert-test-result-messages ert-test-result 1 get-buffer-create "*Messages*" ert--force-message-log-buffer-truncation ert-test-result-should-forms ert-test-most-recent-result ert-test 4 --cl-should-form-accu-- v v cl-struct-ert-test-tags v] 5)) lambda (&rest --cl-rest--) apply quote #[(G77602 G77603 G77604 form-description) "\b\211\n\bJBL)\207" [G77602 v form-description] 4] --cl-rest-- t ert--run-test-internal v ert--running-tests message-log-max ert--should-execution-observer] 9) (t ert-run-test [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let (... ...) (let ... ... value-804))) nil :passed nil]) (t ert-run-or-rerun-test [cl-struct-ert--stats "specific-colnames" [[cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil ...) nil :passed nil]] #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8 data (test-ob/specific-colnames 0)) [nil] [(20848 25509 799000 0)] [(20848 25504 127000 0)] 0 0 0 0 (20848 25504 96000 0) (20848 25504 127000 0) nil [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ... ...)) nil :passed nil] 1366320037.899] [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let (... ...) (let ... ... value-804))) nil :passed nil] (lambda (&rest --cl-rest--) (apply (quote #[... "\306\b\307\"\2032	\211G\310U\203\0\n@\202\0\311\312\313\nGD\"\f\211\314\v.J/J#L\210)\315\fJ!*\207\306\b\316\"\203\224	\2110G\317U\203M\x0e0\211A0@\202U\311\312\3130GD\"\x0e0@12J\3201\204h\321\202i\322\323\v!\324\v!\325\v!3\3263!\203\x7f\321\202\204\327\3303\")%\210\331r\fJq\2104)\v\"+\207\306\b\332\"\203\x01	\2115G\317U\203\257\x0e5\211A5@\202\267\311\312\3135GD\"\x0e5@6r\fJq\21047\333\v6\"8\33478\"\211\x1e\204\337\311\335\336C\"\210\x1e\317H\2119\337H:>\204\364\340\341\342\343#\2109\211;\3106I\210*<8\344\313\345\"I\210\3467\v\"\210\3477\x1e\".\a\207\306\b\350\"\203\301	\211=G\351U\2033\x0e=\211A=@\202;\311\312\313=GD\"\x0e=\211A=@6=@>r\fJq\21047\333\v6\"8\33478\"\211\x1e\317H\2119\337H:>\204v\340\341\352\343#\2109\317H)\203\242\x0e\317H\2119\337H:>\204\223\340\341\352\343#\2109\211?\317\3536>\"I\210*<8\344>\3536>\"\"I\210\3467\v\"\210\3477\x1e\".\b\207\340\354\b\355#\205\312\313\207" [event-type event-args --cl-rest-- stats G77608 v eql run-started 1 signal wrong-number-of-arguments nil ert--setup-results-buffer pop-to-buffer run-ended 2 "%sRan %s tests, %s results were as expected%s" "" "Aborted: " ert-stats-total ert-stats-completed-expected ert-stats-completed-unexpected zerop format ", %s unexpected" ert--results-update-stats-display test-started ert--stats-test-pos ewoc-nth cl-assertion-failed node 0 error "%s accessing a non-%s" ert--ewoc-entry-test ert--ewoc-entry ert-char-for-test-result t ert--results-update-stats-display-maybe ewoc-invalidate test-ended 3 ert--ewoc-entry-hidden-p ert-test-result-expected-p "cl-ecase failed: %s, %s" ... G77607 G77609 --cl-rest-- abortedp ...] 9]) (quote --message-fn--) (quote --listener--) (quote --buffer--) (quote --output-buffer-name--) --cl-rest--))) (t ert-results-rerun-test-at-point) (t ert-results-rerun-test-at-point-debugging-errors) (t call-interactively ert-results-rerun-test-at-point-debugging-errors nil nil)) nil] #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] debug t])
  byte-code("\306\307!\211\211r\310\311!q\210\312 d\313\223)L\210)\314\216\306\315!\306\316!\211\211\317\320\317\321\313\211#\322\313\211&L\210)\n\211\x1c\313L\210)\323\216\324\325\326\327\330D\327\nD\327\vD\327\bD\331\257E\332\x0eB\x1d\x1e\x1f\333\vJ!\210.\b\313\207" [--cl-begin-marker-- v --cl-should-form-accu-- --cl-info-- v ert-test make-symbol "--begin-marker--" get-buffer-create "*Messages*" make-marker nil ((byte-code "\bJ\301\211\223\207" [--cl-begin-marker-- nil] 3)) "--info--" "--should-form-accu--" vector cl-struct-ert--test-execution-info cl-struct-ert-test-aborted-with-non-local-exit #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] ((byte-code "\bJ\306H	>\204\0\307\310\311\312#\210\bJ\313H\211\306H\v>\204\"\307\310\314\315#\210\n\211\316r\317\320!q\210Jd{)I\210)\321 \210\x16\211\x17\x16J\237L\210)\n\306H\v>\204Q\307\310\322\315#\210\n\211\x18\313\x16JI\210)\x14\306H\x19>\204l\307\310\323\324#\210\x14\211\x1a\325\nI\210*\306\207" [--cl-info-- cl-struct-ert--test-execution-info-tags result cl-struct-ert-test-result-tags v --cl-begin-marker-- 0 error "%s accessing a non-%s" ert--test-execution-info-result ert--test-execution-info 2 ert-test-result-messages ert-test-result 1 get-buffer-create "*Messages*" ert--force-message-log-buffer-truncation ert-test-result-should-forms ert-test-most-recent-result ert-test 4 --cl-should-form-accu-- v v cl-struct-ert-test-tags v] 5)) lambda (&rest --cl-rest--) apply quote #[(G77602 G77603 G77604 form-description) "\b\211\n\bJBL)\207" [G77602 v form-description] 4] --cl-rest-- t ert--run-test-internal v ert--running-tests message-log-max ert--should-execution-observer] 9)
  ert-run-test([cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let (...) (save-current-buffer ... ...))))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect (setq value-804 ...) (setq form-description-806 ...) (ert--signal-should-execution form-description-806)) nil (ert-fail form-description-806))) value-804))) nil :passed nil])
  ert-run-or-rerun-test([cl-struct-ert--stats "specific-colnames" [[cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" ...))) (let ((value-804 ...)) (let (form-description-806) (if ... nil ...)) value-804))) nil :passed nil]] #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8 data (test-ob/specific-colnames 0)) [nil] [(20848 25509 799000 0)] [(20848 25504 127000 0)] 0 0 0 0 (20848 25504 96000 0) (20848 25504 127000 0) nil [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804))) nil :passed nil] 1366320037.899] [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let (...) (save-current-buffer ... ...))))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect (setq value-804 ...) (setq form-description-806 ...) (ert--signal-should-execution form-description-806)) nil (ert-fail form-description-806))) value-804))) nil :passed nil] (lambda (&rest --cl-rest--) (apply (quote #[(G77606 G77607 G77608 G77609 event-type &rest event-args) "\306\b\307\"\2032	\211G\310U\203\0\n@\202\0\311\312\313\nGD\"\f\211\314\v.J/J#L\210)\315\fJ!*\207\306\b\316\"\203\224	\2110G\317U\203M\x0e0\211A0@\202U\311\312\3130GD\"\x0e0@12J\3201\204h\321\202i\322\323\v!\324\v!\325\v!3\3263!\203\x7f\321\202\204\327\3303\")%\210\331r\fJq\2104)\v\"+\207\306\b\332\"\203\x01	\2115G\317U\203\257\x0e5\211A5@\202\267\311\312\3135GD\"\x0e5@6r\fJq\21047\333\v6\"8\33478\"\211\x1e\204\337\311\335\336C\"\210\x1e\317H\2119\337H:>\204\364\340\341\342\343#\2109\211;\3106I\210*<8\344\313\345\"I\210\3467\v\"\210\3477\x1e\".\a\207\306\b\350\"\203\301	\211=G\351U\2033\x0e=\211A=@\202;\311\312\313=GD\"\x0e=\211A=@6=@>r\fJq\21047\333\v6\"8\33478\"\211\x1e\317H\2119\337H:>\204v\340\341\352\343#\2109\317H)\203\242\x0e\317H\2119\337H:>\204\223\340\341\352\343#\2109\211?\317\3536>\"I\210*<8\344>\3536>\"\"I\210\3467\v\"\210\3477\x1e\".\b\207\340\354\b\355#\205\312\313\207" [event-type event-args --cl-rest-- stats G77608 v eql run-started 1 signal wrong-number-of-arguments nil ert--setup-results-buffer pop-to-buffer run-ended 2 "%sRan %s tests, %s results were as expected%s" "" "Aborted: " ert-stats-total ert-stats-completed-expected ert-stats-completed-unexpected zerop format ", %s unexpected" ert--results-update-stats-display test-started ert--stats-test-pos ewoc-nth cl-assertion-failed node 0 error "%s accessing a non-%s" ert--ewoc-entry-test ert--ewoc-entry ert-char-for-test-result t ert--results-update-stats-display-maybe ewoc-invalidate test-ended 3 ert--ewoc-entry-hidden-p ert-test-result-expected-p "cl-ecase failed: %s, %s" (run-started run-ended test-started test-ended) G77607 G77609 --cl-rest-- abortedp ...] 9]) (quote --message-fn--) (quote --listener--) (quote --buffer--) (quote --output-buffer-name--) --cl-rest--)))
  ert-results-rerun-test-at-point()
  ert-results-rerun-test-at-point-debugging-errors()
  call-interactively(ert-results-rerun-test-at-point-debugging-errors nil nil)
--8<---------------cut here---------------end--------------->8---

Any idea?

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-18 21:25           ` Sebastien Vauban
@ 2013-04-20 10:11             ` Eric Schulte
  2013-04-25 13:28               ` Sebastien Vauban
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Schulte @ 2013-04-20 10:11 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

"Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:

> Eric,
>
> Eric Schulte wrote:
>> "Sebastien Vauban" <wxhgmqzgwmuf@spammotel.com> writes:
>>> Eric Schulte wrote:
>>>>> Extra question: tested with a sh block, both of the above do work, that is
>>>>> with strings or symbols. Which one is supposed to be better (that is, will be
>>>>> more portable with time), if there is one?
>>>>
>>>> Both will be maintained.  The contribution of a test exercising both
>>>> options could provide an extra guarantee of perseverance.  This is also
>>>> a good first step towards editing the code. :)
>>>
>>> Here's my trial to do so [...].
>>> Does this correspond to what you're asking for?
>>
>> Close, could you prepare this as a patch against the current code base?
>> That way I can simply apply it locally and more easily test it.
>

See the above, could you prepare this as a patch so that I can more
easily read/use/test it?

Thanks,

>
> I've fixed the "abortion" problem I had with the test...
>
> Updated version:
>
> --8<---------------cut here---------------start------------->8---
> (ert-deftest test-ob/specific-colnames ()
>   "Test passing specific column names."
>   (should
>    (equal "#+name: input-table
> | id | var1 |
> |----+------|
> |  1 | bar  |
> |  2 | baz  |
>
> #+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> echo \"$data\"
> #+end_src
>
> #+results:
> | Rev | Author |
> |-----+--------|
> |   1 | bar    |
> |   2 | baz    |
>
> "
>         (org-test-with-temp-text "#+name: input-table
> | id | var1 |
> |----+------|
> |  1 | bar  |
> |  2 | baz  |
>
> #+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> echo \"$data\"
> #+end_src
> "
>                                  (org-babel-execute-src-block)
>                                  (buffer-string)))))
> --8<---------------cut here---------------end--------------->8---
>
> Though, it generates an incomprehensible error (for me):
>
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (wrong-type-argument consp nil)
>   apply(debug (error (wrong-type-argument consp nil)))
>   ert--run-test-debugger([cl-struct-ert--test-execution-info [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804))) nil :passed nil] [cl-struct-ert-test-failed nil nil (wrong-type-argument consp nil) ((t setcar nil ((:comments . "") (:shebang . "") (:cache . "") (:padline . "") (:noweb . "") (:tangle . "") (:exports . "") (:results . ""))) (nil let* ((c (nthcdr 2 i))) (setcar c merged-params)) (nil let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i) (nil org-babel-check-evaluate (let ((i info)) (let* ((c ...)) (setcar c merged-params)) i)) (nil if (org-babel-check-evaluate (let ((i info)) (let* (...) (setcar c merged-params)) i)) (progn (let* ((params ...) (cachep ...) (new-hash ...) (old-hash ...) (cache-current-p ...)) (cond (cache-current-p ...) (... ...))))) (nil let* ((info (if info (copy-tree info) (org-babel-get-src-block-info))) (merged-params (org-babel-merge-params (nth 2 info) params))) (if (org-babel-check-evaluate (let (...) (let* ... ...) i)) (progn (let* (... ... ... ... ...) (cond ... ...))))) (t org-babel-execute-src-block) (nil progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (nil unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (nil save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char ...)) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (nil let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn ... ...) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (nil list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...))))) (nil let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804)) (t (lambda nil (let ((fn-802 ...) (args-803 ...)) (let (...) (let ... ...) value-804)))) (t byte-code "\306\307!r\bq\210\310\216\311 \312\216\313\314\315\316\317D\316\nD\320FE\321\211\322\211\x1e\nJ\323H\x1f>\2046\324\325\326\327#\210\nJ\330H\323H >\204H\324\325\331\332#\210\nJ\323H\x1f>\204X\324\325\326\327#\210\nJ\330H\333H \210.\n\334 \207" [temp-buffer wconfig --cl-info-- ert--infos debug-ignored-errors debug-on-quit generate-new-buffer " *temp*" ((byte-code "\301\b!\203\n\302\b!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) current-window-configuration ((set-window-configuration wconfig)) lambda (&rest --cl-rest--) apply quote #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3] --cl-rest-- t nil 0 error "%s accessing a non-%s" ert--test-execution-info-test ert--test-execution-info 1 ert-test-body ert-test 3 ert-pass debug-on-error debugger cl-struct-ert--test-execution-info-tags cl-struct-ert-test-tags] 6) (t ert--run-test-internal #0) (t byte-code "\306\307!\211\211r\310\311!q\210\312 d\313\223)L\210)\314\216\306\315!\306\316!\211\211\317\320\317\321\313\211#\322\313\211&L\210)\n\211\313L\210)\323\216\324\325\326\327\330D\327\nD\327\vD\327\bD\331\257E\332B\x1e\x1f\333\vJ!\210.\b\313\207" [--cl-begin-marker-- v --cl-should-form-accu-- --cl-info-- v ert-test make-symbol "--begin-marker--" get-buffer-create "*Messages*" make-marker nil ((byte-code "\bJ\301\211\223\207" [--cl-begin-marker-- nil] 3)) "--info--" "--should-form-accu--" vector cl-struct-ert--test-execution-info cl-struct-ert-test-aborted-with-non-local-exit #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] ((byte-code "\bJ\306H	>\204\307\310\311\312#\210\bJ\313H\211\306H\v>\204\"\307\310\314\315#\210\n\211\316r\317\320!q\210Jd{)I\210)\321 \210\211\x16J\237L\210)\n\306H\v>\204Q\307\310\322\315#\210\n\211\313JI\210)\306H>\204l\307\310\323\324#\210\211\325\nI\210*\306\207" [--cl-info-- cl-struct-ert--test-execution-info-tags result cl-struct-ert-test-result-tags v --cl-begin-marker-- 0 error "%s accessing a non-%s" ert--test-execution-info-result ert--test-execution-info 2 ert-test-result-messages ert-test-result 1 get-buffer-create "*Messages*" ert--force-message-log-buffer-truncation ert-test-result-should-forms ert-test-most-recent-result ert-test 4 --cl-should-form-accu-- v v cl-struct-ert-test-tags v] 5)) lambda (&rest --cl-rest--) apply quote #[(G77602 G77603 G77604 form-description) "\b\211\n\bJBL)\207" [G77602 v form-description] 4] --cl-rest-- t ert--run-test-internal v ert--running-tests message-log-max ert--should-execution-observer] 9) (t ert-run-test [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let (... ...) (let ... ... value-804))) nil :passed nil]) (t ert-run-or-rerun-test [cl-struct-ert--stats "specific-colnames" [[cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil ...) nil :passed nil]] #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8 data (test-ob/specific-colnames 0)) [nil] [(20848 25509 799000 0)] [(20848 25504 127000 0)] 0 0 0 0 (20848 25504 96000 0) (20848 25504 127000 0) nil [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ... ...)) nil :passed nil] 1366320037.899] [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let (... ...) (let ... ... value-804))) nil :passed nil] (lambda (&rest --cl-rest--) (apply (quote #[... "\306\b\307\"\2032	\211G\310U\203\n@\202\311\312\313\nGD\"\f\211\314\v.J/J#L\210)\315\fJ!*\207\306\b\316\"\203\224	\2110G\317U\203M0\211A0@\202U\311\312\3130GD\"0@12J\3201\204h\321\202i\322\323\v!\324\v!\325\v!3\3263!\203\x7f\321\202\204\327\3303\")%\210\331r\fJq\2104)\v\"+\207\306\b\332\"\203	\2115G\317U\203\2575\211A5@\202\267\311\312\3135GD\"5@6r\fJq\21047\333\v6\"8\33478\"\211\204\337\311\335\336C\"\210\317H\2119\337H:>\204\364\340\341\342\343#\2109\211;\3106I\210*<8\344\313\345\"I\210\3467\v\"\210\3477\".\a\207\306\b\350\"\203\301	\211=G\351U\2033=\211A=@\202;\311\312\313=GD\"=\211A=@6=@>r\fJq\21047\333\v6\"8\33478\"\211\317H\2119\337H:>\204v\340\341\352\343#\2109\317H)\203\242\317H\2119\337H:>\204\223\340\341\352\343#\2109\211?\317\3536>\"I\210*<8\344>\3536>\"\"I\210\3467\v\"\210\3477\".\b\207\340\354\b\355#\205\312\313\207" [event-type event-args --cl-rest-- stats G77608 v eql run-started 1 signal wrong-number-of-arguments nil ert--setup-results-buffer pop-to-buffer run-ended 2 "%sRan %s tests, %s results were as expected%s" "" "Aborted: " ert-stats-total ert-stats-completed-expected ert-stats-completed-unexpected zerop format ", %s unexpected" ert--results-update-stats-display test-started ert--stats-test-pos ewoc-nth cl-assertion-failed node 0 error "%s accessing a non-%s" ert--ewoc-entry-test ert--ewoc-entry ert-char-for-test-result t ert--results-update-stats-display-maybe ewoc-invalidate test-ended 3 ert--ewoc-entry-hidden-p ert-test-result-expected-p "cl-ecase failed: %s, %s" ... G77607 G77609 --cl-rest-- abortedp ...] 9]) (quote --message-fn--) (quote --listener--) (quote --buffer--) (quote --output-buffer-name--) --cl-rest--))) (t ert-results-rerun-test-at-point) (t ert-results-rerun-test-at-point-debugging-errors) (t call-interactively ert-results-rerun-test-at-point-debugging-errors nil nil)) nil] #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] debug t] (error (wrong-type-argument consp nil)))
>   #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3](--info-- error (wrong-type-argument consp nil))
>   apply(#[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3] --info-- (error (wrong-type-argument consp nil)))
>   (lambda (&rest --cl-rest--) (apply (quote #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3]) (quote --info--) --cl-rest--))(error (wrong-type-argument consp nil))
>   setcar(nil ((:comments . "") (:shebang . "") (:cache . "") (:padline . "") (:noweb . "") (:tangle . "") (:exports . "") (:results . "")))
>   (let* ((c (nthcdr 2 i))) (setcar c merged-params))
>   (let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i)
>   (org-babel-check-evaluate (let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i))
>   (if (org-babel-check-evaluate (let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i)) (progn (let* ((params (if params (org-babel-process-params merged-params) (nth 2 info))) (cachep (and (not arg) (cdr (assoc :cache params)) (string= "yes" (cdr ...)))) (new-hash (if cachep (progn (org-babel-sha1-hash info)))) (old-hash (if cachep (progn (org-babel-current-result-hash)))) (cache-current-p (and (not arg) new-hash (equal new-hash old-hash)))) (cond (cache-current-p (save-excursion (goto-char (org-babel-where-is-src-block-result nil info)) (end-of-line 1) (forward-char 1) (let (...) (message ...) result))) ((org-babel-confirm-evaluate (let (...) (let* ... ...) i)) (let* ((lang ...) (result-params ...) (body ...) (dir ...) (default-directory ...) (org-babel-call-process-region-original ...) (indent ...) result cmd) (unwind-protect (let ... ... ... ...) (setq call-process-region ...))))))))
>   (let* ((info (if info (copy-tree info) (org-babel-get-src-block-info))) (merged-params (org-babel-merge-params (nth 2 info) params))) (if (org-babel-check-evaluate (let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i)) (progn (let* ((params (if params (org-babel-process-params merged-params) (nth 2 info))) (cachep (and (not arg) (cdr ...) (string= "yes" ...))) (new-hash (if cachep (progn ...))) (old-hash (if cachep (progn ...))) (cache-current-p (and (not arg) new-hash (equal new-hash old-hash)))) (cond (cache-current-p (save-excursion (goto-char ...) (end-of-line 1) (forward-char 1) (let ... ... result))) ((org-babel-confirm-evaluate (let ... ... i)) (let* (... ... ... ... ... ... ... result cmd) (unwind-protect ... ...))))))))
>   org-babel-execute-src-block()
>   (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string))
>   (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
>   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
>   (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
>   (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))
>   (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...))))))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect (setq value-804 (apply fn-802 args-803)) (setq form-description-806 (nconc (list ...) (list :form ...) (if ... nil ...) (let ... ...))) (ert--signal-should-execution form-description-806)) nil (ert-fail form-description-806))) value-804))
>   (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...)))))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect (setq value-804 (apply fn-802 args-803)) (setq form-description-806 (nconc ... ... ... ...)) (ert--signal-should-execution form-description-806)) nil (ert-fail form-description-806))) value-804)))()
>   byte-code("\306\307!r\bq\210\310\216\311 \312\216\313\314\315\316\317D\316\nD\320FE\321\211\322\211\x1e\nJ\323H\x1f>\2046\324\325\326\327#\210\nJ\330H\323H >\204H\324\325\331\332#\210\nJ\323H\x1f>\204X\324\325\326\327#\210\nJ\330H\333H \210.\n\334 \207" [temp-buffer wconfig --cl-info-- ert--infos debug-ignored-errors debug-on-quit generate-new-buffer " *temp*" ((byte-code "\301\b!\203\n\302\b!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) current-window-configuration ((set-window-configuration wconfig)) lambda (&rest --cl-rest--) apply quote #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3] --cl-rest-- t nil 0 error "%s accessing a non-%s" ert--test-execution-info-test ert--test-execution-info 1 ert-test-body ert-test 3 ert-pass debug-on-error debugger cl-struct-ert--test-execution-info-tags cl-struct-ert-test-tags] 6)
>   ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804))) nil :passed nil] [cl-struct-ert-test-failed nil nil (wrong-type-argument consp nil) ((t setcar nil ((:comments . "") (:shebang . "") (:cache . "") (:padline . "") (:noweb . "") (:tangle . "") (:exports . "") (:results . ""))) (nil let* ((c (nthcdr 2 i))) (setcar c merged-params)) (nil let ((i info)) (let* ((c (nthcdr 2 i))) (setcar c merged-params)) i) (nil org-babel-check-evaluate (let ((i info)) (let* ((c ...)) (setcar c merged-params)) i)) (nil if (org-babel-check-evaluate (let ((i info)) (let* (...) (setcar c merged-params)) i)) (progn (let* ((params ...) (cachep ...) (new-hash ...) (old-hash ...) (cache-current-p ...)) (cond (cache-current-p ...) (... ...))))) (nil let* ((info (if info (copy-tree info) (org-babel-get-src-block-info))) (merged-params (org-babel-merge-params (nth 2 info) params))) (if (org-babel-check-evaluate (let (...) (let* ... ...) i)) (progn (let* (... ... ... ... ...) (cond ... ...))))) (t org-babel-execute-src-block) (nil progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (nil unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char (point-min))) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (nil save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn (insert "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n") (goto-char ...)) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (nil let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (org-mode) (progn ... ...) (org-babel-execute-src-block) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (nil list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ... ...) (and ... ...))))) (nil let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804)) (t (lambda nil (let ((fn-802 ...) (args-803 ...)) (let (...) (let ... ...) value-804)))) (t byte-code "\306\307!r\bq\210\310\216\311 \312\216\313\314\315\316\317D\316\nD\320FE\321\211\322\211\x1e\nJ\323H\x1f>\2046\324\325\326\327#\210\nJ\330H\323H >\204H\324\325\331\332#\210\nJ\323H\x1f>\204X\324\325\326\327#\210\nJ\330H\333H \210.\n\334 \207" [temp-buffer wconfig --cl-info-- ert--infos debug-ignored-errors debug-on-quit generate-new-buffer " *temp*" ((byte-code "\301\b!\203\n\302\b!\210\301\207" [temp-buffer buffer-name kill-buffer] 2)) current-window-configuration ((set-window-configuration wconfig)) lambda (&rest --cl-rest--) apply quote #[(G77601 &rest debugger-args) "\302\bJ	\"\207" [G77601 debugger-args ert--run-test-debugger] 3] --cl-rest-- t nil 0 error "%s accessing a non-%s" ert--test-execution-info-test ert--test-execution-info 1 ert-test-body ert-test 3 ert-pass debug-on-error debugger cl-struct-ert--test-execution-info-tags cl-struct-ert-test-tags] 6) (t ert--run-test-internal #0) (t byte-code "\306\307!\211\211r\310\311!q\210\312 d\313\223)L\210)\314\216\306\315!\306\316!\211\211\317\320\317\321\313\211#\322\313\211&L\210)\n\211\313L\210)\323\216\324\325\326\327\330D\327\nD\327\vD\327\bD\331\257E\332B\x1e\x1f\333\vJ!\210.\b\313\207" [--cl-begin-marker-- v --cl-should-form-accu-- --cl-info-- v ert-test make-symbol "--begin-marker--" get-buffer-create "*Messages*" make-marker nil ((byte-code "\bJ\301\211\223\207" [--cl-begin-marker-- nil] 3)) "--info--" "--should-form-accu--" vector cl-struct-ert--test-execution-info cl-struct-ert-test-aborted-with-non-local-exit #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] ((byte-code "\bJ\306H	>\204\307\310\311\312#\210\bJ\313H\211\306H\v>\204\"\307\310\314\315#\210\n\211\316r\317\320!q\210Jd{)I\210)\321 \210\211\x16J\237L\210)\n\306H\v>\204Q\307\310\322\315#\210\n\211\313JI\210)\306H>\204l\307\310\323\324#\210\211\325\nI\210*\306\207" [--cl-info-- cl-struct-ert--test-execution-info-tags result cl-struct-ert-test-result-tags v --cl-begin-marker-- 0 error "%s accessing a non-%s" ert--test-execution-info-result ert--test-execution-info 2 ert-test-result-messages ert-test-result 1 get-buffer-create "*Messages*" ert--force-message-log-buffer-truncation ert-test-result-should-forms ert-test-most-recent-result ert-test 4 --cl-should-form-accu-- v v cl-struct-ert-test-tags v] 5)) lambda (&rest --cl-rest--) apply quote #[(G77602 G77603 G77604 form-description) "\b\211\n\bJBL)\207" [G77602 v form-description] 4] --cl-rest-- t ert--run-test-internal v ert--running-tests message-log-max ert--should-execution-observer] 9) (t ert-run-test [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let (... ...) (let ... ... value-804))) nil :passed nil]) (t ert-run-or-rerun-test [cl-struct-ert--stats "specific-colnames" [[cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil ...) nil :passed nil]] #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8 data (test-ob/specific-colnames 0)) [nil] [(20848 25509 799000 0)] [(20848 25504 127000 0)] 0 0 0 0 (20848 25504 96000 0) (20848 25504 127000 0) nil [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ... ...)) nil :passed nil] 1366320037.899] [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let (... ...) (let ... ... value-804))) nil :passed nil] (lambda (&rest --cl-rest--) (apply (quote #[... "\306\b\307\"\2032	\211G\310U\203\n@\202\311\312\313\nGD\"\f\211\314\v.J/J#L\210)\315\fJ!*\207\306\b\316\"\203\224	\2110G\317U\203M0\211A0@\202U\311\312\3130GD\"0@12J\3201\204h\321\202i\322\323\v!\324\v!\325\v!3\3263!\203\x7f\321\202\204\327\3303\")%\210\331r\fJq\2104)\v\"+\207\306\b\332\"\203	\2115G\317U\203\2575\211A5@\202\267\311\312\3135GD\"5@6r\fJq\21047\333\v6\"8\33478\"\211\204\337\311\335\336C\"\210\317H\2119\337H:>\204\364\340\341\342\343#\2109\211;\3106I\210*<8\344\313\345\"I\210\3467\v\"\210\3477\".\a\207\306\b\350\"\203\301	\211=G\351U\2033=\211A=@\202;\311\312\313=GD\"=\211A=@6=@>r\fJq\21047\333\v6\"8\33478\"\211\317H\2119\337H:>\204v\340\341\352\343#\2109\317H)\203\242\317H\2119\337H:>\204\223\340\341\352\343#\2109\211?\317\3536>\"I\210*<8\344>\3536>\"\"I\210\3467\v\"\210\3477\".\b\207\340\354\b\355#\205\312\313\207" [event-type event-args --cl-rest-- stats G77608 v eql run-started 1 signal wrong-number-of-arguments nil ert--setup-results-buffer pop-to-buffer run-ended 2 "%sRan %s tests, %s results were as expected%s" "" "Aborted: " ert-stats-total ert-stats-completed-expected ert-stats-completed-unexpected zerop format ", %s unexpected" ert--results-update-stats-display test-started ert--stats-test-pos ewoc-nth cl-assertion-failed node 0 error "%s accessing a non-%s" ert--ewoc-entry-test ert--ewoc-entry ert-char-for-test-result t ert--results-update-stats-display-maybe ewoc-invalidate test-ended 3 ert--ewoc-entry-hidden-p ert-test-result-expected-p "cl-ecase failed: %s, %s" ... G77607 G77609 --cl-rest-- abortedp ...] 9]) (quote --message-fn--) (quote --listener--) (quote --buffer--) (quote --output-buffer-name--) --cl-rest--))) (t ert-results-rerun-test-at-point) (t ert-results-rerun-test-at-point-debugging-errors) (t call-interactively ert-results-rerun-test-at-point-debugging-errors nil nil)) nil] #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] debug t])
>   byte-code("\306\307!\211\211r\310\311!q\210\312 d\313\223)L\210)\314\216\306\315!\306\316!\211\211\317\320\317\321\313\211#\322\313\211&L\210)\n\211\313L\210)\323\216\324\325\326\327\330D\327\nD\327\vD\327\bD\331\257E\332B\x1e\x1f\333\vJ!\210.\b\313\207" [--cl-begin-marker-- v --cl-should-form-accu-- --cl-info-- v ert-test make-symbol "--begin-marker--" get-buffer-create "*Messages*" make-marker nil ((byte-code "\bJ\301\211\223\207" [--cl-begin-marker-- nil] 3)) "--info--" "--should-form-accu--" vector cl-struct-ert--test-execution-info cl-struct-ert-test-aborted-with-non-local-exit #[nil "\300\301\302\"\207" [throw --cl-block-error-- nil] 3] ((byte-code "\bJ\306H	>\204\307\310\311\312#\210\bJ\313H\211\306H\v>\204\"\307\310\314\315#\210\n\211\316r\317\320!q\210Jd{)I\210)\321 \210\211\x16J\237L\210)\n\306H\v>\204Q\307\310\322\315#\210\n\211\313JI\210)\306H>\204l\307\310\323\324#\210\211\325\nI\210*\306\207" [--cl-info-- cl-struct-ert--test-execution-info-tags result cl-struct-ert-test-result-tags v --cl-begin-marker-- 0 error "%s accessing a non-%s" ert--test-execution-info-result ert--test-execution-info 2 ert-test-result-messages ert-test-result 1 get-buffer-create "*Messages*" ert--force-message-log-buffer-truncation ert-test-result-should-forms ert-test-most-recent-result ert-test 4 --cl-should-form-accu-- v v cl-struct-ert-test-tags v] 5)) lambda (&rest --cl-rest--) apply quote #[(G77602 G77603 G77604 form-description) "\b\211\n\bJBL)\207" [G77602 v form-description] 4] --cl-rest-- t ert--run-test-internal v ert--running-tests message-log-max ert--should-execution-observer] 9)
>   ert-run-test([cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let (...) (save-current-buffer ... ...))))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect (setq value-804 ...) (setq form-description-806 ...) (ert--signal-should-execution form-description-806)) nil (ert-fail form-description-806))) value-804))) nil :passed nil])
>   ert-run-or-rerun-test([cl-struct-ert--stats "specific-colnames" [[cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" ...))) (let ((value-804 ...)) (let (form-description-806) (if ... nil ...)) value-804))) nil :passed nil]] #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8 data (test-ob/specific-colnames 0)) [nil] [(20848 25509 799000 0)] [(20848 25504 127000 0)] 0 0 0 0 (20848 25504 96000 0) (20848 25504 127000 0) nil [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let ... ...)))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect ... ... ...) nil (ert-fail form-description-806))) value-804))) nil :passed nil] 1366320037.899] [cl-struct-ert-test test-ob/specific-colnames "Test passing specific column names." (lambda nil (let ((fn-802 (function equal)) (args-803 (list "#+name: input-table\n| id | var1 |\n|----+------|\n|  1 | bar  |\n|  2 | baz  |\n\n#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)\necho \"$data\"\n#+end_src\n\n#+results:\n| Rev | Author |\n|-----+--------|\n|   1 | bar    |\n|   2 | baz    |\n\n" (let (...) (save-current-buffer ... ...))))) (let ((value-804 (quote ert-form-evaluation-aborted-805))) (let (form-description-806) (if (unwind-protect (setq value-804 ...) (setq form-description-806 ...) (ert--signal-should-execution form-description-806)) nil (ert-fail form-description-806))) value-804))) nil :passed nil] (lambda (&rest --cl-rest--) (apply (quote #[(G77606 G77607 G77608 G77609 event-type &rest event-args) "\306\b\307\"\2032	\211G\310U\203\n@\202\311\312\313\nGD\"\f\211\314\v.J/J#L\210)\315\fJ!*\207\306\b\316\"\203\224	\2110G\317U\203M0\211A0@\202U\311\312\3130GD\"0@12J\3201\204h\321\202i\322\323\v!\324\v!\325\v!3\3263!\203\x7f\321\202\204\327\3303\")%\210\331r\fJq\2104)\v\"+\207\306\b\332\"\203	\2115G\317U\203\2575\211A5@\202\267\311\312\3135GD\"5@6r\fJq\21047\333\v6\"8\33478\"\211\204\337\311\335\336C\"\210\317H\2119\337H:>\204\364\340\341\342\343#\2109\211;\3106I\210*<8\344\313\345\"I\210\3467\v\"\210\3477\".\a\207\306\b\350\"\203\301	\211=G\351U\2033=\211A=@\202;\311\312\313=GD\"=\211A=@6=@>r\fJq\21047\333\v6\"8\33478\"\211\317H\2119\337H:>\204v\340\341\352\343#\2109\317H)\203\242\317H\2119\337H:>\204\223\340\341\352\343#\2109\211?\317\3536>\"I\210*<8\344>\3536>\"\"I\210\3467\v\"\210\3477\".\b\207\340\354\b\355#\205\312\313\207" [event-type event-args --cl-rest-- stats G77608 v eql run-started 1 signal wrong-number-of-arguments nil ert--setup-results-buffer pop-to-buffer run-ended 2 "%sRan %s tests, %s results were as expected%s" "" "Aborted: " ert-stats-total ert-stats-completed-expected ert-stats-completed-unexpected zerop format ", %s unexpected" ert--results-update-stats-display test-started ert--stats-test-pos ewoc-nth cl-assertion-failed node 0 error "%s accessing a non-%s" ert--ewoc-entry-test ert--ewoc-entry ert-char-for-test-result t ert--results-update-stats-display-maybe ewoc-invalidate test-ended 3 ert--ewoc-entry-hidden-p ert-test-result-expected-p "cl-ecase failed: %s, %s" (run-started run-ended test-started test-ended) G77607 G77609 --cl-rest-- abortedp ...] 9]) (quote --message-fn--) (quote --listener--) (quote --buffer--) (quote --output-buffer-name--) --cl-rest--)))
>   ert-results-rerun-test-at-point()
>   ert-results-rerun-test-at-point-debugging-errors()
>   call-interactively(ert-results-rerun-test-at-point-debugging-errors nil nil)
> --8<---------------cut here---------------end--------------->8---
>
> Any idea?
>
> Best regards,
>   Seb

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-20 10:11             ` Eric Schulte
@ 2013-04-25 13:28               ` Sebastien Vauban
  2013-04-27 15:02                 ` Eric Schulte
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastien Vauban @ 2013-04-25 13:28 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric,

Eric Schulte wrote:
> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> Eric Schulte wrote:
>>> "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>>>> Eric Schulte wrote:
>>>>>> Extra question: tested with a sh block, both of the above do work, that is
>>>>>> with strings or symbols. Which one is supposed to be better (that is, will be
>>>>>> more portable with time), if there is one?
>>>>>
>>>>> Both will be maintained.  The contribution of a test exercising both
>>>>> options could provide an extra guarantee of perseverance.  This is also
>>>>> a good first step towards editing the code. :)
>>>>
>>>> Here's my trial to do so [...].
>>>> Does this correspond to what you're asking for?
>>>
>>> Close, could you prepare this as a patch against the current code base?
>>> That way I can simply apply it locally and more easily test it.
>
> See the above, could you prepare this as a patch so that I can more
> easily read/use/test it?

Here the patch you asked for.

Best regards,
  Seb

From aa7230ff485df5d9775429b53487aefcc7cd911d Mon Sep 17 00:00:00 2001
From: Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
Date: Thu, 25 Apr 2013 15:24:58 +0200
Subject: [PATCH] Test support of explicitly specified colnames

* test-ob.el (test-ob/specific-colnames): Add test checking that given column
names are well present in the output table.

---
 testing/lisp/test-ob.el |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index bbbfbc4..d51e183 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -1106,6 +1106,38 @@ Paragraph"
     (widen)
     (should (should (re-search-forward "^: 3" nil t)))))
 
+(ert-deftest test-ob/specific-colnames ()
+  "Test passing specific column names."
+  (should
+   (equal "#+name: input-table
+| id | var1 |
+|----+------|
+|  1 | bar  |
+|  2 | baz  |
+
+#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
+echo \"$data\"
+#+end_src
+
+#+results:
+| Rev | Author |
+|-----+--------|
+|   1 | bar    |
+|   2 | baz    |
+
+"
+	  (org-test-with-temp-text "#+name: input-table
+| id | var1 |
+|----+------|
+|  1 | bar  |
+|  2 | baz  |
+
+#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
+echo \"$data\"
+#+end_src
+"
+				   (org-babel-execute-src-block)
+				   (buffer-string)))))
 
 (provide 'test-ob)
 
-- 
1.7.9

-- 
Sebastien Vauban

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-25 13:28               ` Sebastien Vauban
@ 2013-04-27 15:02                 ` Eric Schulte
  2013-04-27 16:06                   ` Sebastien Vauban
  0 siblings, 1 reply; 12+ messages in thread
From: Eric Schulte @ 2013-04-27 15:02 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

>
> Here the patch you asked for.
>
> Best regards,
>   Seb
>

I've applied this patch.  Please review the changes I had to make for it
to work correctly.  Your version wasn't working because when
org-babel-execute-src-block was called the point was not inside of the
code block.  My changes search forward in the text to place the point at
the beginning of the code block before executing.

I also had to uppercase RESULTS for the string equality to return true.
In the future more flexible tests (such as regular expression searches)
rather than strict equality should be preferable.

Thanks for contributing this test!

>
> From aa7230ff485df5d9775429b53487aefcc7cd911d Mon Sep 17 00:00:00 2001
> From: Sebastien Vauban <wxhgmqzgwmuf@spammotel.com>
> Date: Thu, 25 Apr 2013 15:24:58 +0200
> Subject: [PATCH] Test support of explicitly specified colnames
>
> * test-ob.el (test-ob/specific-colnames): Add test checking that given column
> names are well present in the output table.
>
> ---
>  testing/lisp/test-ob.el |   32 ++++++++++++++++++++++++++++++++
>  1 files changed, 32 insertions(+), 0 deletions(-)
>
> diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
> index bbbfbc4..d51e183 100644
> --- a/testing/lisp/test-ob.el
> +++ b/testing/lisp/test-ob.el
> @@ -1106,6 +1106,38 @@ Paragraph"
>      (widen)
>      (should (should (re-search-forward "^: 3" nil t)))))
>  
> +(ert-deftest test-ob/specific-colnames ()
> +  "Test passing specific column names."
> +  (should
> +   (equal "#+name: input-table
> +| id | var1 |
> +|----+------|
> +|  1 | bar  |
> +|  2 | baz  |
> +
> +#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> +echo \"$data\"
> +#+end_src
> +
> +#+results:
> +| Rev | Author |
> +|-----+--------|
> +|   1 | bar    |
> +|   2 | baz    |
> +
> +"
> +	  (org-test-with-temp-text "#+name: input-table
> +| id | var1 |
> +|----+------|
> +|  1 | bar  |
> +|  2 | baz  |
> +
> +#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
> +echo \"$data\"
> +#+end_src
> +"
> +				   (org-babel-execute-src-block)
> +				   (buffer-string)))))
>  
>  (provide 'test-ob)
>  
> -- 
> 1.7.9

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-27 15:02                 ` Eric Schulte
@ 2013-04-27 16:06                   ` Sebastien Vauban
  2013-04-27 16:47                     ` Eric Schulte
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastien Vauban @ 2013-04-27 16:06 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Eric,

Eric Schulte wrote:
>> Here the patch you asked for.
>
> I've applied this patch.

Thanks a lot for reviewing my test, and fixing it!

> Please review the changes I had to make for it to work correctly. Your
> version wasn't working because when org-babel-execute-src-block was called
> the point was not inside of the code block.

Isn't there something to fix, in order to avoid an uncontrolled error to be
generated, such as the one I had?

> My changes search forward in the text to place the point at the beginning of
> the code block before executing.

OK!

> I also had to uppercase RESULTS for the string equality to return true.

OK. That's true I've set:

--8<---------------cut here---------------start------------->8---
  ;; keep lower-case
  (setq org-babel-results-keyword "results")
--8<---------------cut here---------------end--------------->8---

since we've got nice keyword fontification -- as Carsten once said, he only
choose uppercase keywords, a while ago, when it was much more difficult to
clearly view the distinction between text, code and results (before the nice
fontification we now have). Otherwise, he'd have chosen lower-case keywords.

Because of that feature, which I completely had out of my mind, I'm thinking
at another thing that could help reduce the size of the tests. Currently, we
copy once the code block, and once the code block + its results.

Maybe we could have a function to locate (via a regexp for
#+results/#+RESULTS) the results, and only check (for strict or loose
equality [1]) on the results.

So, something along those lines:

--8<---------------cut here---------------start------------->8---
(should
 (equal (results-part (org-babel-execute-src-block "code block only"))
        "results only"))
--8<---------------cut here---------------end--------------->8---

No duplication of the input...

Does this make sense?

> In the future more flexible tests (such as regular expression searches)
> rather than strict equality should be preferable.
>
> Thanks for contributing this test!

My pleasure.

Best regards,
  Seb

[1] Regexp match

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [babel] Specified colnames
  2013-04-27 16:06                   ` Sebastien Vauban
@ 2013-04-27 16:47                     ` Eric Schulte
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Schulte @ 2013-04-27 16:47 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

>
> OK. That's true I've set:
>
> --8<---------------cut here---------------start------------->8---
>   ;; keep lower-case
>   (setq org-babel-results-keyword "results")
> --8<---------------cut here---------------end--------------->8---
>

If you like you could let-bind this around any future tests.

>
> since we've got nice keyword fontification -- as Carsten once said, he only
> choose uppercase keywords, a while ago, when it was much more difficult to
> clearly view the distinction between text, code and results (before the nice
> fontification we now have). Otherwise, he'd have chosen lower-case keywords.
>
> Because of that feature, which I completely had out of my mind, I'm thinking
> at another thing that could help reduce the size of the tests. Currently, we
> copy once the code block, and once the code block + its results.
>
> Maybe we could have a function to locate (via a regexp for
> #+results/#+RESULTS) the results, and only check (for strict or loose
> equality [1]) on the results.
>
> So, something along those lines:
>
> --8<---------------cut here---------------start------------->8---
> (should
>  (equal (results-part (org-babel-execute-src-block "code block only"))
>         "results only"))
> --8<---------------cut here---------------end--------------->8---
>
> No duplication of the input...
>
> Does this make sense?
>

Yes, that would be an improvement, see the other tests in that file for
examples of similar functionality.

>
>> In the future more flexible tests (such as regular expression searches)
>> rather than strict equality should be preferable.
>>
>> Thanks for contributing this test!
>
> My pleasure.
>
> Best regards,
>   Seb
>

Cheers,

>
> [1] Regexp match

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-04-27 16:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-07 20:11 [babel] Specified colnames Sebastien Vauban
2013-04-08 16:41 ` Eric Schulte
2013-04-08 19:45   ` Sebastien Vauban
2013-04-08 20:15     ` Eric Schulte
2013-04-08 20:49       ` Sebastien Vauban
2013-04-12 21:42         ` Eric Schulte
2013-04-18 21:25           ` Sebastien Vauban
2013-04-20 10:11             ` Eric Schulte
2013-04-25 13:28               ` Sebastien Vauban
2013-04-27 15:02                 ` Eric Schulte
2013-04-27 16:06                   ` Sebastien Vauban
2013-04-27 16:47                     ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).