From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Creating hline in table from source block? Date: Mon, 25 Nov 2013 22:38:23 +0100 Message-ID: <87hab0novk.fsf@gmx.us> References: <8738mkiwhx.fsf@hornfels.zedat.fu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vl3on-00054w-G7 for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 16:35:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vl3oi-0002Do-Bp for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 16:35:45 -0500 Received: from plane.gmane.org ([80.91.229.3]:36758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vl3oh-0002Dg-WD for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 16:35:40 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vl3od-0003DX-IT for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 22:35:35 +0100 Received: from dynamic-adsl-94-39-217-142.clienti.tiscali.it ([94.39.217.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 22:35:35 +0100 Received: from rasmus by dynamic-adsl-94-39-217-142.clienti.tiscali.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 22:35:35 +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 Hi Loris, "Loris Bennett" writes: > How do I get this > > #+RESULTS: > | a | b | c | d | > |-----+---+---+---| > | 1 | 2 | 3 | 4 | > | 5 | 6 | 7 | 8 | You might find use of the post header argument here, http://orgmode.org/manual/post.html In this case it's as simple as this #+NAME: add_hline #+BEGIN_SRC emacs-lisp :var data='((a b c)) h1=1 (require 'cl) (append (subseq data 0 h1 ) (list 'hline) (subseq data h1)) #+END_SRC #+BEGIN_SRC sh :post add_hline(data=*this*) echo "a b c d" echo "1 2 3 4" echo "5 6 7 8" #+END_SRC Probably you can remove the require 'cl. Also, you can generalize the code to take arbitrarily hline positions. Hope it helps. –Rasmus -- Vote for proprietary math!