From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc-Oliver Ihm Subject: Re: org-babel: feature-request: allow table-cells to be passed as strings Date: Mon, 04 Oct 2010 21:05:43 +0200 Message-ID: <4CAA2587.1030509@online.de> References: <8739sm9jby.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=57961 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2qTb-0001kW-26 for emacs-orgmode@gnu.org; Mon, 04 Oct 2010 15:13:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2qMM-00018q-K7 for emacs-orgmode@gnu.org; Mon, 04 Oct 2010 15:06:03 -0400 Received: from lo.gmane.org ([80.91.229.12]:50770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2qMM-00018S-A6 for emacs-orgmode@gnu.org; Mon, 04 Oct 2010 15:06:02 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P2qMK-0001wO-4d for emacs-orgmode@gnu.org; Mon, 04 Oct 2010 21:06:00 +0200 Received: from p54a8822b.dip0.t-ipconnect.de ([84.168.130.43]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Oct 2010 21:06:00 +0200 Received: from ihm by p54a8822b.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Oct 2010 21:06:00 +0200 In-Reply-To: <8739sm9jby.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Cc: emacs-orgmode@gnu.org Hello, This would be such an example. The Input table contains some numbers, the last of them larger than allowed for an integer. As the result table show, the last one is converted to float thereby using some precision. I would like to see them all as strings. with kind regards, Marc-Oliver Ihm #+tblname: numbers | 1 | | 2 | | 12 | | 45 | | 166 | | 12567890 | | 231231282371983279389999999 | #+begin_src emacs-lisp :var numbers=numbers (mapcar (lambda (line) (let ((number (car line))) (list number (type-of number)) ) ) numbers) #+end_src #+results: | 1 | integer | | 2 | integer | | 12 | integer | | 45 | integer | | 166 | integer | | 12567890 | integer | | 2.3123128237198328e+26 | float | Am 04.10.2010 15:30, schrieb Eric Schulte: > Hi, > > Could you send an example of the contents of such a cell, and what it is > converted to? Maybe it will be possible to improve the parsing of > numerals in Babel s.t. we don't lose precision in these cases. > > Thanks -- Eric > > Marc-Oliver Ihm writes: > >> Hello ! >> >> Currently org-babel, when passing a table as input to a >> source-code-block, behaves like this: >> If the cell looks like a number, it will be converted to an integer or a >> float. Otherwise the cell-content is passed unconverted as a string. >> >> Now, dealing with very large numbers (which I want to process with >> calc), I found this behavior annoying, because babel converts my large >> numbers to float, loosing precision in the process. >> >> Now my request would be, to have a switch (maybe as a header argument) >> which would tell babel to pass all cells as unconverted strings. >> >> I have checked the documentation and the sources and have not been able >> to find such a switch. >> >> >> with kind regards, Marc-Oliver Ihm >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode >