From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Creating hline in table from source block? Date: Tue, 26 Nov 2013 09:54:10 +0100 Message-ID: <8738mjtufh.fsf@gmx.us> References: <8738mkiwhx.fsf@hornfels.zedat.fu-berlin.de> <8738mjdguk.fsf@gmail.com> <87pppnoaej.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]:39686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlEMf-0004Qz-Hx for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 03:51:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlEMZ-0006jg-My for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 03:51:25 -0500 Received: from plane.gmane.org ([80.91.229.3]:43039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlEMZ-0006jX-GR for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 03:51:19 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VlEMY-0001Zb-HU for emacs-orgmode@gnu.org; Tue, 26 Nov 2013 09:51:18 +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 ; Tue, 26 Nov 2013 09:51:18 +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 ; Tue, 26 Nov 2013 09:51:18 +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: > So Achim's suggestion of using ":results raw" might be the way to go > (once I've worked out what the sed bit is doing ...) > > However, the table will ultimately be around 40000 lines long, > so from a performance point of view it would be nice not to have to pipe > the whole thing through sed, particularly as the files are on a remote > server. Having said that though, it is not a performance-critical > application. > > So maybe I'll look at Rasmus' simpler suggestion (my lisp skill are > unfortunately not quite up to the "fun" variant ...) The "fun" variant works with any table. You just specify a list of positions where you want hlines, e.g. '(0 1 last) or '(0 1 -1). > How complex would the elisp version of my grep and awk above be? Just > having one code block would be a little neater from my point of view. If you use :post you can keep your utility functions in a :noexport: section at the bottom of your file (or even in a library-of-babel (see org-babel-lob-ingest)) and you don't litter your code with unnecessary stuff. It's also usable across blocks. –Rasmus -- When the facts change, I change my mind. What do you do, sir?