Re: [O] Cannot get exported a correctly-recalculated table generated by org-babel

2013-01-30 Thread Bastien
Hi Miguel,

Miguel Ruiz rbeni...@yahoo.es writes:

 How can I get recalculated tables through org-export:

 a) Switch-off org-babel-execute-buffer in org-export?
 b) Switch-on org-tables recalculate-buffer-tables AFTER 
 org-babel-execute-buffer?

 I cannot figure out the sequence in org-export or the multiple hooks
 available.

I would use this one (not tested though):

(add-hook 'org-export-preprocess-hook
  'org-table-recalculate-buffer-tables)

HTH,

-- 
 Bastien



Re: [O] Cannot get exported a correctly-recalculated table generated by org-babel

2013-01-30 Thread Miguel Ruiz
 
  How can I get recalculated tables through org-export:
 
  a) Switch-off org-babel-execute-buffer in org-export?
  b) Switch-on org-tables recalculate-buffer-tables AFTER
 org-babel-execute-buffer?
 
  I cannot figure out the sequence in org-export or the
 multiple hooks
  available.
 
 I would use this one (not tested though):
 
 (add-hook 'org-export-preprocess-hook         
'org-table-recalculate-buffer-tables)
 

That goes perfect!!!

I also found

(add-hook 'org-babel-after-execute-hook 
  'org-table-recalculate-buffer-tables) 


Thanks a lot,

Miguel.

 HTH,
 
 -- 
  Bastien




[O] Cannot get exported a correctly-recalculated table generated by org-babel

2013-01-27 Thread Miguel Ruiz
Problem: I cannot get exported a correctly-recalculated table generated by 
org-babel.

Hi,

0. Windoze 7 x64, Emacs 24.pre3 r99, Org-mode 7.9.3d (commit 08f5b0ad)
(I cannot show the results with Emacs 24.1release or Emacs 24.2release because 
of the Windoze heap bug#13065

 
http://emacs.1067599.n5.nabble.com/bug-13065-Bug-in-x-file-dialog-with-GetOpenFileName-td271410.html)

1. Load:

# start-of-org-file

#+name: table1
| C1 | C2 | C3 |
|++|
| A  |  1 |  1 |
| B  |  2 |  2 |
| C  |  3 |  3 |


#+name: table2
| C1 | C4 | C5 |
|++|
| A  |  1 |  1 |
| B  |  2 |  2 |
| C  |  3 |  3 |


#+call: table-operations-combine-merge(table1,table2) :colnames yes
#+tblfm: $6=$5+$4+$3+$2


# end-of-org-file

2. M-: (require 'cl) RET

3. M-: (org-babel-lob-ingest 'path/to/lob-table-operations.org') RET

4. M-x org-babel-execute-buffer RET yes RET yes RET

5. M-x org-table-recalculate-buffer-tables RET

Results: tables merged and new column calculated correctly.

--
Now let's export the file:

6. M-x org-export RET b yes RET yes RET

Results: tables merged correctly and new column empty

I presume that org-export re-execute babel but does not recalculate tables.

How can I get recalculated tables through org-export:

a) Switch-off org-babel-execute-buffer in org-export?
b) Switch-on org-tables recalculate-buffer-tables AFTER 
org-babel-execute-buffer?

I cannot figure out the sequence in org-export or the multiple hooks available.

Thanks for this wonderful piece of software.

Miguel Ruiz.
Sevilla, Spain.