From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Creating hline in table from source block? Date: Tue, 26 Nov 2013 21:07:39 +0100 Message-ID: <87siuj0vw4.fsf@Rainer.invalid> References: <8738mkiwhx.fsf@hornfels.zedat.fu-berlin.de> <8738mjdguk.fsf@gmail.com> <87pppnoaej.fsf@hornfels.zedat.fu-berlin.de> <878uwbmhg2.fsf@gmail.com> <87zjormect.fsf@hornfels.zedat.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlOvP-0002UX-7k for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 15:08:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlOvI-00047h-Ll for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 15:07:59 -0500 Received: from plane.gmane.org ([80.91.229.3]:55768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlOvI-00047V-Fz for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 15:07:52 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VlOvG-0008Nv-EG for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 21:07:50 +0100 Received: from pd9eb0f85.dip0.t-ipconnect.de ([217.235.15.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 21:07:50 +0100 Received: from Stromeko by pd9eb0f85.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Nov 2013 21:07:50 +0100 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 Loris Bennett writes: > No, the column names are fixed, so that's perfect, thank you. I > suspected there might be some more straight-forward way than the > interesting, but slightly more involved methods suggested by Achim and > Rasmus. There might be way to do that, but it's not implemented for shell blocks since there isn't an easy way to deal with arrays in a shell. You'd be much better off using a language that has support for that (like Perl). In your case (when the first line is always a header and you don't need hlines anywhere else), the following trick using the end header arguments of a call line works just as well: --8<---------------cut here---------------start------------->8--- #+NAME: table #+BEGIN_SRC sh :results table echo "a b c d" echo "1 2 3 4" echo "5 6 7 8" #+END_SRC #+CALL: table() :results table :colnames yes #+RESULTS: | a | b | c | d | |---+---+---+---| | 1 | 2 | 3 | 4 | | 5 | 6 | 7 | 8 | --8<---------------cut here---------------end--------------->8--- Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for KORG EX-800 and Poly-800MkII V0.9: http://Synth.Stromeko.net/Downloads.html#KorgSDada