emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [babel] Bugs for Emacs Lisp code blocks


From: Sebastien Vauban
Subject: [O] [babel] Bugs for Emacs Lisp code blocks
Date: Sat, 06 Apr 2013 17:44:03 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (windows-nt)

Hello,

Here are some tests with the colnames parameter *and* the Emacs Lisp language
for the "echo" code block. They're giving results I don't understand...

Note that functionally the same "echo" code block in other languages (I tested
R and sh) does return the expected results.

* Input table

Consider this input table, with 2 rows, and a header row.

#+name: input
| id   | var1 |
|------+------|
| obs1 | foo  |
| obs2 | bar  |

* Interactive calls

Let's try different calls, changing the =:colnames= parameter.

1. Using =:colnames yes=

   #+name: ELisp-echo-1
   #+begin_src emacs-lisp :var data=input :colnames yes :exports results
   data
   #+end_src

   #+results: ELisp-echo-1
   | id   | var1 |
   |------+------|
   | obs1 | foo  |
   | obs2 | bar  |

   OK; the result is what I expected.

2. Using =:colnames no=

   #+name: ELisp-echo-2
   #+begin_src emacs-lisp :var data=input :colnames no :exports results
   data
   #+end_src

   #+results: ELisp-echo-2
   | id   | var1 |
   |------+------|
   | obs1 | foo  |
   | obs2 | bar  |

   Here, I was expecting:

   | id   | var1 |
   | obs1 | foo  |
   | obs2 | bar  |

3. Using no =:colnames= header argument

   #+name: ELisp-echo-3
   #+begin_src emacs-lisp :var data=input :exports results
   data
   #+end_src

   #+results: ELisp-echo-3
   | id   | var1 |
   |------+------|
   | obs1 | foo  |
   | obs2 | bar  |

   Here, I was expecting:

   | obs1 | foo |
   | obs2 | bar |

* Call at export time

#+call: ELisp-echo-1(data=input)

I get:

| id   | var1 |
| id   | var1 |
| obs1 | foo  |
| obs2 | bar  |

Not at all what I was expecting...

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]