From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: table not returned Date: Wed, 28 Mar 2012 15:26:29 +0200 Message-ID: <87r4wcdfga.fsf@med.uni-goettingen.de> References: <87ty19ak2b.fsf@med.uni-goettingen.de> <87pqbx4wn7.fsf@gnu.org> <87zkb1c5jx.fsf@med.uni-goettingen.de> <16747.1332938738@alphaville> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCsuI-0001et-Rs for emacs-orgmode@gnu.org; Wed, 28 Mar 2012 09:27:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCsu9-0008QZ-DD for emacs-orgmode@gnu.org; Wed, 28 Mar 2012 09:27:22 -0400 Received: from plane.gmane.org ([80.91.229.3]:51921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCsu9-0008QM-6G for emacs-orgmode@gnu.org; Wed, 28 Mar 2012 09:27:13 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SCsu5-0005XJ-92 for emacs-orgmode@gnu.org; Wed, 28 Mar 2012 15:27:09 +0200 Received: from genepi110.genepi.med.uni-goettingen.de ([134.76.140.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Mar 2012 15:27:09 +0200 Received: from andreas.leha by genepi110.genepi.med.uni-goettingen.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Mar 2012 15:27:09 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nick Dokos writes: > Andreas Leha wrote: > >> >> Hi Bastien, >> >> thanks for looking into this! >> >> >> Bastien writes: >> >> > Andreas Leha writes: >> > >> >> #+begin_src R :results table >> >> data.frame(parameter=c("parameter", "", "param1"), >> >> mean=c("mean sd", "", "1.1 0.1"), >> >> median=c("median", "(minimum;maximum)", "1 (1;2)")) >> >> #+end_src >> >> >> >> #+results: >> > >> > I can't test this because of the character. >> ^^^^^ >> This character got lost on the mailing list. I guess the offending >> character was the plus-minus character. >> >> This should be testable, I hope: >> >> ,---- >> | #+begin_src R :results table >> | data.frame(parameter=c("parameter", "", "param1"), >> | mean=c("mean +- sd", "", "1.1 +- 0.1"), >> | median=c("median", "(minimum;maximum)", "1 (1;2)")) >> | #+end_src >> | >> | #+results: >> `---- >> >> Again, this works as expected, if "(minimum" is replaced by "minimum". >> > > This happens in org-babel-import-elisp-from-file, when org-babel-string-read > is mapped on each row. To wit: > > (org-babel-string-read "foo)") --> "foo)" > > but > > (org-babel-string-read "(foo)") --> Error > > The backtrace for the error says: > > ,---- > | Debugger entered--Lisp error: (void-function foo) > | (foo) > | eval((foo)) > | (if (and (not inhibit-lisp-eval) (member (substring cell 0 1) > | (quote ("(" "'" "`" "[")))) (eval (read cell)) (if (string= > | (substring cell 0 1) "\"") (read cell) (progn (set-text-properties 0 > | (length cell) nil cell) cell))) > | (or (org-babel-number-p cell) (if (and (not inhibit-lisp-eval) > | (member (substring cell 0 1) (quote ("(" "'" "`" "[")))) (eval (read > | cell)) (if (string= (substring cell 0 1) "\"") (read cell) (progn > | (set-text-properties 0 (length cell) nil cell) cell)))) > | (if (and (stringp cell) (not (equal cell ""))) (or > | (org-babel-number-p cell) (if (and (not inhibit-lisp-eval) (member > | (substring cell 0 1) (quote ("(" "'" "`" "[")))) (eval (read cell)) > | (if (string= (substring cell 0 1) "\"") (read cell) (progn > | (set-text-properties 0 (length cell) nil cell) cell)))) cell) > | org-babel-read("(foo)") > | org-babel-string-read("(foo)") > `---- > > Nick Hi Nick, thanks for that analysis! I had tried replacing "(" with "[" without success. Now I "know" why: (org-babel-string-read "[foo)") --> Error ,---- | Debugger entered--Lisp error: (invalid-read-syntax ") or . in a vector") | read("[foo)") | org-babel-read("[foo)") | org-babel-string-read("[foo)") | eval((org-babel-string-read "[foo)") nil) | eval-last-sexp-1(nil) | eval-last-sexp(nil) | call-interactively(eval-last-sexp nil nil) `---- Regards, Andreas