Sebastien Vauban wrote
On Fri, Aug 2, 2013 at 10:53 PM, Rustom Mody <rustompmody@gmail.com> 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