From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: Babel trims leading 0s for certain numbers of tables Date: Sun, 10 Jul 2016 09:35:06 -0400 Message-ID: References: <87eg713a2y.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMEt5-0006t4-7a for emacs-orgmode@gnu.org; Sun, 10 Jul 2016 09:35:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMEt3-0004Ap-7j for emacs-orgmode@gnu.org; Sun, 10 Jul 2016 09:35:10 -0400 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:35355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMEt3-0004AZ-3t for emacs-orgmode@gnu.org; Sun, 10 Jul 2016 09:35:09 -0400 Received: by mail-qk0-x229.google.com with SMTP id s63so37433129qkb.2 for ; Sun, 10 Jul 2016 06:35:08 -0700 (PDT) In-reply-to: <87eg713a2y.fsf@ericabrahamsen.net> 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" To: Eric Abrahamsen Cc: emacs-orgmode@gnu.org On 2016-07-10 at 13:18, Eric Abrahamsen wrote: > Ken Mankoff writes: > >> I've just discovered that when Org results are returned in a table, >> they are modified in that leading 0s are removed. Is this a feature? A >> bug? Is there a workaround for this? Leading 0s are not removed if the >> result is a string, but in many cases a string of numbers is still a >> string and should retain those 0s. > > Maybe you can use a format specifier for that column, so the > zero-padding is retained? Maybe. Can you provide an example? Adding a #+TBLFM: after the table doesn't do it, and I'm not sure how to specify result formatting at this level of detail in babel header block arguments. -k. #+BEGIN_SRC sh :results table echo "0042" #+END_SRC #+RESULTS: | 42 | #+TBLFM: @1=@1;N