From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: [PATCH] Process hlines in imported tables Date: Fri, 29 Mar 2013 17:42:38 -0400 Message-ID: <20130329214238.GA53401@BigDog.local> References: <20130329014615.GA49671@BigDog.local> <87wqsq6yd1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULh4O-0005xD-7E for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 17:42:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULh4L-0000sJ-P0 for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 17:42:44 -0400 Received: from [204.62.15.78] (port=44549 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULh4L-0000s3-M2 for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 17:42:41 -0400 Content-Disposition: inline In-Reply-To: <87wqsq6yd1.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode@gnu.org On Fri, Mar 29, 2013 at 09:04:42AM -0600, Eric Schulte wrote: > Rick Frankel writes: > > Users may want to insert a "-" in their tables, and I think it would be > surprising to magically replace floating "-" characters with hlines. > There are numerous existing options for inserting hlines into tables, > e.g., the :colnames header argument, using the raw, wrap and org result > types and printing literal Org-mode syntax from your block, additionally > any result could be passed through an elisp code block which may insert > hline symbols at will. > > Is there a specific use case which isn't addressed by the existing > functionality? Yes and no. :colnames works, but often the header comes from the processing, so they may not be static (I use a lot of call:s). Also, I've been having trouble using the output from raw results as input -- it seems that unless the results are cached (:cache yes), the table is not parsed on input, but passed as a multiline string. I was hoping to avoid this problem using value returns (now that Achim has made the perl parsing work better). Here's an example (btw, this breaks in 7.4 as well): * Cache vs. uncached raw #+name: uncached #+begin_src elisp :results raw "|c1|c2| |- |a|1| |b|2|" #+end_src #+call: uncached() #+results: uncached() : |c1|c2| : |- : |a|1| : |b|2| #+name: cached #+begin_src elisp :results raw :cache yes "|c1|c2| |- |a|1| |b|2|" #+end_src #+results[62ca3004bf7cb363e47635216b3289cfdc39684c]: cached | c1 | c2 | |----+----| | a | 1 | | b | 2 | #+call: cached() #+results: cached() | a | 1 | | b | 2 |