From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: hlines in babel output Date: Sat, 23 Feb 2013 22:23:45 +0100 Message-ID: <871uc667xa.fsf@pank.eu> References: <871ucnr5ud.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9MZo-0006Ld-AD for emacs-orgmode@gnu.org; Sat, 23 Feb 2013 16:24:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9MZk-0002UX-ME for emacs-orgmode@gnu.org; Sat, 23 Feb 2013 16:24:12 -0500 Received: from plane.gmane.org ([80.91.229.3]:41184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9MZk-0002UO-Ev for emacs-orgmode@gnu.org; Sat, 23 Feb 2013 16:24:08 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U9MZy-0000Bg-Rc for emacs-orgmode@gnu.org; Sat, 23 Feb 2013 22:24:22 +0100 Received: from dynamic-adsl-94-34-152-98.clienti.tiscali.it ([94.34.152.98]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 23 Feb 2013 22:24:22 +0100 Received: from rasmus by dynamic-adsl-94-34-152-98.clienti.tiscali.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 23 Feb 2013 22:24:22 +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 > I have the following Org document where I would like to add some extra > hlines to the output. I'm using babel. I tried the ascii package but > couldn't find anything giving me extra hlines. I'd also prefer to > stick to just babel. I'm still looking for a good way to insert horizontal lines into generated tables. I have been trying to use Emacs Lisp to use org-table-insert-hline using (i) babel and (ii) noweb. For (i) I need to add an hline object as the second-to-last object, but I havne't been successful so far. I'd appreciate any hints. #+NAME:budget-dta #+begin_src R :colnames yes :noweb-ref TBL :exports none tt <- textConnection(" account p rent 110 food 50") ee <- read.table(tt, header = TRUE) close(tt) cc <- 4 ## a complicated number generated with R ee$p <- ee$p * cc ee <- rbind(ee, data.frame(p=sum(ee$p),account=c("total"))) ee #+end_src #+NAME:test #+RESULTS: budget-dta | account | p | |---------+-----| | rent | 440 | | food | 200 | | total | 640 | #+BEGIN_SRC emacs-lisp :var X=test (add-to-list 'X 'hline t) #+END_SRC -- Vote for proprietary math!