[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Process hlines in imported tables
From: |
Rick Frankel |
Subject: |
Re: [O] [PATCH] Process hlines in imported tables |
Date: |
Fri, 29 Mar 2013 17:42:38 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Mar 29, 2013 at 09:04:42AM -0600, Eric Schulte wrote:
> Rick Frankel <address@hidden> 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 |
- [O] [PATCH] Process hlines in imported tables, Rick Frankel, 2013/03/28
- Re: [O] [PATCH] Process hlines in imported tables, Eric Schulte, 2013/03/29
- Re: [O] [PATCH] Process hlines in imported tables,
Rick Frankel <=
- Re: [O] [PATCH] Process hlines in imported tables, Eric Schulte, 2013/03/29
- Re: [O] [PATCH] Process hlines in imported tables, Rick Frankel, 2013/03/30
- Re: [O] [PATCH] Process hlines in imported tables, Eric Schulte, 2013/03/30
- Re: [O] [PATCH] Process hlines in imported tables, Rick Frankel, 2013/03/31
- Re: [O] [PATCH] Process hlines in imported tables, Eric Schulte, 2013/03/31