From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Henney Subject: Re: table export to same buffer Date: Mon, 12 Aug 2013 13:20:27 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=f46d0444e855bbbb9f04e3c42da8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8wjH-0007Qf-Go for emacs-orgmode@gnu.org; Mon, 12 Aug 2013 14:20:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8wjE-0003Iq-RG for emacs-orgmode@gnu.org; Mon, 12 Aug 2013 14:20:31 -0400 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:35874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8wjE-0003Ib-H0 for emacs-orgmode@gnu.org; Mon, 12 Aug 2013 14:20:28 -0400 Received: by mail-we0-f178.google.com with SMTP id u57so5668019wes.23 for ; Mon, 12 Aug 2013 11:20:27 -0700 (PDT) In-Reply-To: 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: Rustom Mody Cc: emacs-orgmode , Nicolas Goaziou --f46d0444e855bbbb9f04e3c42da8 Content-Type: multipart/alternative; boundary=f46d0444e855bbbb9a04e3c42da6 --f46d0444e855bbbb9a04e3c42da6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Rustom Sorry for the delay - I only check the list sporadically=85 On Sun, Aug 4, 2013 at 6:13 AM, Rustom Mody wrote: > > > On Sun, Aug 4, 2013 at 5:04 AM, William Henney wrote: > >> >> On Fri, Aug 2, 2013 at 11:52 PM, Rustom Mody wrot= e: >> >>> >>> [Snip] > I dont think so. >>> The context is writing C with C mode (or haskell with haskell-mode >>> python with python-mode etc) ie the user is not using orgmode. That is= why >>> I mentioned orgtbl, ie org table editing facilities are needed but the >>> major mode is something else. >>> >> >> What about a radio table using orgtbl-to-generic? >> >> See Appendix 6 of the Org manual >> >> Will >> > > This looks like a useful approach > > The variable names dont seem to match: > Appendix 6.2 talks of orgtbl-radio-tables > However org (8.0.7) seems to have orgtbl-radio-table-templates > > > Assuming they are the same, anywhere I can read about the documentation o= f > the template format? > Specifically I find that the name of the receiving function > (orgtbl-to-latex) seems to have a significance. The same in the template > seems to have none > > The template is not strictly necessary - you can just add the required lines by hand to your C source file. I think that orgtbl-to-generic should be able to do what you want out of the box. Maybe the attached example (orgtbl-test.c) might help you. The idea is that you edit the org table at the top, then "C-u C-u C-c C-c" will update all the formulae in the table and install the results in your C source code at the bottom. This is not quite what you originally asked for, since you have two copies of the data in the file and you have to remember to only edit the version in the org table. But it is pretty close. Cheers Will --=20 Dr William Henney, Centro de Radioastronom=EDa y Astrof=EDsica, Universidad Nacional Aut=F3noma de M=E9xico, Campus Morelia --f46d0444e855bbbb9a04e3c42da6 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
Hi Rustom

Sorry for the delay - I onl= y check the list sporadically=85

On Sun, = Aug 4, 2013 at 6:13 AM, Rustom Mody <rustompmody@gmail.com> wrote:

=
On Sun, Aug 4, 2013 at 5:04 AM, William Henn= ey <whenney@gmail.com> wrote:

On Fri, Aug 2, 2013 at 11:52 PM, Rustom Mody <rustompmody@gmail.c= om> wrote:


[Snip]
=A0=A0
I dont think so.
The context = is writing C with C mode (or haskell with haskell-mode python with python-m= ode etc) ie the user is not using orgmode.=A0 That is why I mentioned orgtb= l, ie org table editing facilities are needed but the major mode is somethi= ng else.

What about a radio table using orgtbl-to-gener= ic?

Se= e Appendix 6 of the Org manual

Will

This looks like a useful approach

The variab= le names dont seem to match:
Appendix 6.2 talks of orgtbl-radio-tablesHowever org (8.0.7) seems to have orgtbl-radio-table-templates

=A0
Assuming they are= the same, anywhere I can read about the documentation of the template form= at?
Specifically I find that the name of the receiving function (orgtbl-to-late= x) seems to have a significance.=A0 The same in the template seems to have = none


The template is not strictly necessary - you can just add the= required lines by hand to your C source file.=A0
I think that orgtbl-= to-generic should be able to do what you want out of the box. =A0Maybe the = attached example (orgtbl-test.c) might help you. =A0The idea is that you ed= it the org table at the top, then "C-u C-u C-c C-c" will update a= ll the formulae in the table and install the results in your C source code = at the bottom. =A0This is not quite what you originally asked for, since yo= u have two copies of the data in the file and you have to remember to only = edit the version in the org table. =A0But it is pretty close.=A0

Cheer= s

Will




--

=A0 Dr William Henney, Centro d= e Radioastronom=EDa y Astrof=EDsica,
=A0 Universidad Nacional Aut=F3noma= de M=E9xico, Campus Morelia
--f46d0444e855bbbb9a04e3c42da6-- --f46d0444e855bbbb9f04e3c42da8 Content-Type: text/x-csrc; charset=US-ASCII; name="orgtbl-test.c" Content-Disposition: attachment; filename="orgtbl-test.c" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hk9zrv9r0 LyogLSotIGV2YWw6IChvcmd0YmwtbW9kZSk7IC0qLSAqLwoKLyoKIytPUkdUQkw6IFNFTkQgbXl0 YWJsZSBvcmd0YmwtdG8tZ2VuZXJpYyA6bHN0YXJ0ICIgICAgY29uc3QgZmxvYXQgIiA6c2VwICIg PSAiIDpza2lwIDEgOmxlbmQgIjsiIDpza2lwY29scyAoMiAzKQp8IHBhcmFtZXRlciB8IG51bWVy YXRvciB8IGRlbm9taW5hdG9yIHwgICAgdmFsdWUgfAp8LS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0r LS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tfAp8IGEgICAgICAgICB8ICAgICAgIDMuMCB8ICAgICAg ICAgMy4wIHwgIDEuMDAwMDAgfAp8IGIgICAgICAgICB8ICAgICAgMTQuMCB8ICAgICAgICAgNy4w IHwgIDIuMDAwMDAgfAp8IGMgICAgICAgICB8ICAgICAgLTIuMCB8ICAgICAgICAxNS4wIHwgLTAu MTMzMzMgfAojK1RCTEZNOiAkND0kMi8kMztmNQoKV2l0aCBwb2ludCBpbiBhYm92ZSB0YWJsZSwg IkMtdSBDLXUgQy1jIEMtYyIgd2lsbCB1cGRhdGUgZm9ybXVsYWUgYW5kIGluc3RhbGwgaW50byBD IHNvdXJjZQoKKi8Kdm9pZCBtYWluKCkgewovLyBCRUdJTiBSRUNFSVZFIE9SR1RCTCBteXRhYmxl CiAgICBjb25zdCBmbG9hdCBhID0gMS4wMDAwMDsKICAgIGNvbnN0IGZsb2F0IGIgPSAyLjAwMDAw OwogICAgY29uc3QgZmxvYXQgYyA9IC0wLjEzMzMzOwovLyBFTkQgUkVDRUlWRSBPUkdUQkwgbXl0 YWJsZQp9CgoK --f46d0444e855bbbb9f04e3c42da8--