From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Riedy Subject: [PATCH 3/4] Add an orgtbl-to-orgtbl transformation. Date: Sun, 4 May 2008 18:54:42 -0700 Message-ID: <1209952483-23714-4-git-send-email-jason@acm.org> References: <1209952483-23714-1-git-send-email-jason@acm.org> <1209952483-23714-2-git-send-email-jason@acm.org> <1209952483-23714-3-git-send-email-jason@acm.org> Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jspuw-0006Uh-2o for emacs-orgmode@gnu.org; Sun, 04 May 2008 21:55:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jspuu-0006TZ-5I for emacs-orgmode@gnu.org; Sun, 04 May 2008 21:55:01 -0400 Received: from [199.232.76.173] (port=33057 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jsput-0006TN-N3 for emacs-orgmode@gnu.org; Sun, 04 May 2008 21:54:59 -0400 Received: from b.mail.sonic.net ([64.142.19.5]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jsput-0004CM-B7 for emacs-orgmode@gnu.org; Sun, 04 May 2008 21:54:59 -0400 In-Reply-To: <1209952483-23714-3-git-send-email-jason@acm.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Jason Riedy Useful for documenting orgtbl transformation and formatting functions. Signed-off-by: Jason Riedy --- ChangeLog | 2 ++ lisp/org-table.el | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index d70bc98..d8f1a3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ when there is no other fmt available. (orgtbl-to-generic): Allow an explicitly nil :tstart or :tend to suppress the appropriate string. + (orgtbl-to-orgtbl): New function for translating to another orgtbl + table. 2008-05-02 Carsten Dominik diff --git a/lisp/org-table.el b/lisp/org-table.el index 19dd74a..af12a4c 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -3917,6 +3917,22 @@ this function is called." :hlstart "@headitem "))) (orgtbl-to-generic table (org-combine-plists params2 params)))) +(defun orgtbl-to-orgtbl (table params) + "Convert the orgtbl-mode TABLE into another orgtbl-mode table. +Useful when slicing one table into many. The :hline, :sep, +:lstart, and :lend provide orgtbl framing. The default nil :tstart +and :tend suppress strings without splicing; they can be set to +provide ORGTBL directives for the generated table." + (let* ((params2 + (list + :tstart nil :tend nil + :hline "|---" + :sep " | " + :lstart "| " + :lend " |")) + (params (org-combine-plists params2 params))) + (orgtbl-to-generic table params))) + (provide 'org-table) ;; arch-tag: 4d21cfdd-0268-440a-84b0-09237a0fe0ef -- 1.5.5.rc1.121.g1594