From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: One table, multiple radio targets? Date: Fri, 29 Feb 2008 11:09:34 +0100 Message-ID: <27C4F608-C27A-4E97-B20F-907F7134CDC6@science.uva.nl> References: <87prugs4jy.fsf@sparse.yi.org> Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JV2BQ-0005JK-9C for emacs-orgmode@gnu.org; Fri, 29 Feb 2008 05:09:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JV2BP-0005HH-9P for emacs-orgmode@gnu.org; Fri, 29 Feb 2008 05:09:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JV2BP-0005H3-0K for emacs-orgmode@gnu.org; Fri, 29 Feb 2008 05:09:39 -0500 Received: from ug-out-1314.google.com ([66.249.92.171]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JV2BO-0001MA-OG for emacs-orgmode@gnu.org; Fri, 29 Feb 2008 05:09:38 -0500 Received: by ug-out-1314.google.com with SMTP id a2so224814ugf.48 for ; Fri, 29 Feb 2008 02:09:37 -0800 (PST) In-Reply-To: <87prugs4jy.fsf@sparse.yi.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: Jason Riedy Cc: emacs-orgmode@gnu.org On Feb 29, 2008, at 6:41 AM, Jason Riedy wrote: > Anyone have a clever way to generate multiple outputs from one > table? It's pretty clear that orgtbl-send-table doesn't handle > multiple ORGTBL lines, and I'm not clever enough to hack in a > loop over multiple clauses on one ORGTBL line. > > The context is a probably too clever mechanism to generate both > code and documentation at once. I'm using noweb to document a > SQL schema, and a few tables are pre-loaded with data. I'd like > to send one orgtbl-mode table to LaTeX and SQL insert statements. I think the easiest would be to write a little lisp program that switches the SEND lines above the table through a number of states and then calls the exporter. The different lines could all be in the buffer, all above the table. So it is basically #+ORGTBL: SEND LATEXCAPTURETAG orgtbl-to-latex #+ORGTBL: SEND HTMLCAPTURETAG orgtbl-to-html | here | is | the | table | then call orgtbl-ctrl-c-ctrl-c, then transpose-lines on the two send lines, then call orgtbl-ctrl-c-ctrl-c again.... - Carsten