From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: [RFC] Rewrite radio tables Date: Sun, 24 Aug 2014 22:51:08 +0200 Message-ID: <87a96tharn.fsf@gmail.com> References: <8761hh6662.fsf@nicolasgoaziou.fr> <87fvglhcas.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLel5-0005hC-Tu for emacs-orgmode@gnu.org; Sun, 24 Aug 2014 16:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLel0-0000I4-Lm for emacs-orgmode@gnu.org; Sun, 24 Aug 2014 16:51:27 -0400 Received: from plane.gmane.org ([80.91.229.3]:44839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLel0-0000Hk-Dt for emacs-orgmode@gnu.org; Sun, 24 Aug 2014 16:51:22 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XLeky-0003rY-CY for emacs-orgmode@gnu.org; Sun, 24 Aug 2014 22:51:20 +0200 Received: from e178059182.adsl.alicedsl.de ([85.178.59.182]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Aug 2014 22:51:20 +0200 Received: from tjolitz by e178059182.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Aug 2014 22:51:20 +0200 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 Thorsten Jolitz writes: > Nicolas Goaziou writes: > > Hello, > >> The following patch implements radio tables and `orgtbl-to-...' >> functions using Org export engine. The implementation is probably not >> totally backward compatible, though. Btw, great job - thats quite a complex part of Org-mode, looks like a lot of work ... > funny, I just wrote `org-dp-create-table' (in > https://github.com/tj64/org-dp) a few hours ago, obviously it is not > competing with this rather complex framework of Org table creation, but > it does its job and might be useful for anybody just looking for a > simple way to create a table programmatically. Just figured out that I can make the function more generic with a few changes, now it handles table-formulas and table.el tables too, so FYI: ,----[ C-h f org-dp-create-table RET ] | org-dp-create-table is a Lisp function in `org-dp-lib.el'. | | (org-dp-create-table ROW-LST &optional TBLFM TABLE-EL-P) | | Create table with content ROW-LST. | ROW-LST is an alist of lists with elements that are contents of a | single row's table cells, e.g. | | (list | (list "col1" "col2" "col3") | 'hline | (list 1 2 3) | (list 'x 'y 'z)) | | for a table with 3 columns and 4 rows, including one horizontal | line. | | TBLFM, if given, should be a list containing a table formula as | string. If TABLE-EL-P is non-nil, the table type will be | 'table.el, otherwise its is 'org by default. `---- usage: #+BEGIN_SRC emacs-lisp :results raw (org-dp-create-table (list ;; rows (list "col1" "col2" "col3") 'hline (list "a" "b" "c") (list 1 2 3) 'hline (list 'x 'y 'z)) ;; table-formula (list "x=y") ;; table type ; t) #+END_SRC #+results: | col1 | col2 | col3 | |------+------+------| | a | b | c | | 1 | 2 | 3 | |------+------+------| | x | y | z | #+TBLFM: x=y -- cheers, Thorsten