From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rustom Mody Subject: Re: table export to same buffer Date: Sat, 3 Aug 2013 10:22:20 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0122aa244f7fa904e303d84e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5Tpa-0005wL-Bm for emacs-orgmode@gnu.org; Sat, 03 Aug 2013 00:52:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5TpZ-0000RW-4o for emacs-orgmode@gnu.org; Sat, 03 Aug 2013 00:52:42 -0400 Received: from mail-ob0-x22c.google.com ([2607:f8b0:4003:c01::22c]:48623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5TpY-0000RC-V1 for emacs-orgmode@gnu.org; Sat, 03 Aug 2013 00:52:41 -0400 Received: by mail-ob0-f172.google.com with SMTP id er7so2594002obc.3 for ; Fri, 02 Aug 2013 21:52:40 -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: emacs-orgmode --089e0122aa244f7fa904e303d84e Content-Type: text/plain; charset=ISO-8859-1 Sebastien Vauban wrote > On Fri, Aug 2, 2013 at 10:53 PM, Rustom Mody wrote: > >> Is it possible to export an orgmode table not to a new file but >> overwriting the org table in the same buffer? >> >> Context is editing source code which contains a largeish table of (say) >> constants. >> Editing is done with orgtbl minor mode. >> When done it should become back the table in the natural format of the >> programming language >> [For simplicity lets just say csv will do] >> >> >> > Using an Org Babel code block (which you have to write, of course) taking as > input your table, and outputting your constants in the wished format should do > what you're looking for, right? > > 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. However here some pre and postprocessing is also probably required. Something like an automation of the following: 1. Editing a large struct spec in C -- major mode is C-mode 2. Select the region (may even be a rectangle) 3. Paste into an org-mode buffer 4. Run C-c | on region 5. Edit table as required 6. org-table-export in desired format to a file F 7. Visit F 8. Copy/Cut F (if necessary as rectangle) 9. Go back to original C-mode buffer and paste --089e0122aa244f7fa904e303d84e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Sebastien Vauban wrote
On Fri, Aug 2, 2013 at 10:53 PM, Ru= stom Mody <rustompmody@gmail.com> wrote:
Is it possible to export an orgmode table no= t to a new file but overwriting the org table in the same buffer?

Co= ntext is editing source code which contains a largeish table of (say) const= ants.
Editing is done with orgtbl minor mode.
When done it should become back the table in the natural format of the prog= ramming language
[For simplicity lets just say csv will do]



Using an Org Babel code block (which you have t=
o write, of course) taking as
input your table, and outputting your constants in the wished format should=
 do
what you're looking for, right?

I dont think so.<= br>The context is writing C with C mode (or haskell with haskell-mode pytho= n with python-mode etc) ie the user is not using orgmode.=A0 That is why I = mentioned orgtbl, ie org table editing facilities are needed but the major = mode is something else.

However here some pre and postprocessing is also probably required.
= Something like an automation of the following:

1. Editing a large st= ruct spec in C -- major mode is C-mode
2. Select the region (may even be= a rectangle)
3. Paste into an org-mode buffer
4. Run C-c | on region
5. Edit tabl= e as required
6. org-table-export in desired format to a file F
7. Vi= sit F
8. Copy/Cut F (if necessary as rectangle)
9. Go back to origina= l C-mode buffer and paste


--089e0122aa244f7fa904e303d84e--