* [Babel] size limit of #+call
@ 2012-03-24 18:39 Martin Halder
2012-03-24 19:00 ` Nick Dokos
0 siblings, 1 reply; 4+ messages in thread
From: Martin Halder @ 2012-03-24 18:39 UTC (permalink / raw)
To: emacs-orgmode
Hi all,
trying to use a function to output a latex file using python with #+call.
The example below does work but when pycalltest gets too big it just output "nil".
When I call pycalltest directly with C-c C-c it works even with a big function.
Is there a size limit when I use #+call ?
Thanks for help,
Martin
#+name: pycalltest(trans=translation,items=items,cust=customer,deta=details,lang="german",cur="chf")
#+begin_src python :results output
execfile('latex.py')
print lx_config
#+end_src
#+call: pycalltest(translation,items,customer,details,"german","chf") :file "test.tex"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Babel] size limit of #+call
2012-03-24 18:39 [Babel] size limit of #+call Martin Halder
@ 2012-03-24 19:00 ` Nick Dokos
2012-03-24 20:46 ` Martin Halder
2012-03-24 21:00 ` Martin Halder
0 siblings, 2 replies; 4+ messages in thread
From: Nick Dokos @ 2012-03-24 19:00 UTC (permalink / raw)
To: Martin Halder; +Cc: nicholas.dokos, emacs-orgmode
Martin Halder <martin.halder@gmail.com> wrote:
> Hi all,
>
> trying to use a function to output a latex file using python with =
> #+call.
>
> The example below does work but when pycalltest gets too big it just =
> output "nil".
> When I call pycalltest directly with C-c C-c it works even with a big =
> function.
>
> Is there a size limit when I use #+call ?
>
> Thanks for help,
> Martin
>
> #+name: =
> pycalltest(trans=3Dtranslation,items=3Ditems,cust=3Dcustomer,deta=3Ddetail=
> s,lang=3D"german",cur=3D"chf")
> #+begin_src python :results output
> execfile('latex.py')
> print lx_config
> #+end_src
> #+call: pycalltest(translation,items,customer,details,"german","chf") =
> :file "test.tex"
Can you please provide all the pieces needed to run this? I presume at least
latex.py is needed - anything else?
Thanks,
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Babel] size limit of #+call
2012-03-24 19:00 ` Nick Dokos
@ 2012-03-24 20:46 ` Martin Halder
2012-03-24 21:00 ` Martin Halder
1 sibling, 0 replies; 4+ messages in thread
From: Martin Halder @ 2012-03-24 20:46 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode
Am 24.03.2012 um 20:00 schrieb Nick Dokos:
> Martin Halder <martin.halder@gmail.com> wrote:
>
>> Hi all,
>>
>> trying to use a function to output a latex file using python with =
>> #+call.
>>
>> The example below does work but when pycalltest gets too big it just =
>> output "nil".
>> When I call pycalltest directly with C-c C-c it works even with a big =
>> function.
>>
>> Is there a size limit when I use #+call ?
>>
>> Thanks for help,
>> Martin
>>
>> #+name: =
>> pycalltest(trans=3Dtranslation,items=3Ditems,cust=3Dcustomer,deta=3Ddetail=
>> s,lang=3D"german",cur=3D"chf")
>> #+begin_src python :results output
>> execfile('latex.py')
>> print lx_config
>> #+end_src
>> #+call: pycalltest(translation,items,customer,details,"german","chf") =
>> :file "test.tex"
>
> Can you please provide all the pieces needed to run this? I presume at least
> latex.py is needed - anything else?
could reduce the problem to a small example, seems the table is handled differently when using #+call.
direct evaluation:
[['country', 'Schweiz', 'Switzerland']]
using call:
[['field', 'german', 'english'], None, ['country', 'Schweiz', 'Switzerland']]
#+tblname: transl
| field | german | english |
|---------+---------+-------------|
| country | Schweiz | Switzerland |
#+name: pycalltest(trans=transl)
#+begin_src python :results output
print trans
#+end_src
#+call: pycalltest(transl) :file "test.tex"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Babel] size limit of #+call
2012-03-24 19:00 ` Nick Dokos
2012-03-24 20:46 ` Martin Halder
@ 2012-03-24 21:00 ` Martin Halder
1 sibling, 0 replies; 4+ messages in thread
From: Martin Halder @ 2012-03-24 21:00 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode
Am 24.03.2012 um 20:00 schrieb Nick Dokos:
> Martin Halder <martin.halder@gmail.com> wrote:
>
>> Hi all,
>>
>> trying to use a function to output a latex file using python with =
>> #+call.
>>
>> The example below does work but when pycalltest gets too big it just =
>> output "nil".
>> When I call pycalltest directly with C-c C-c it works even with a big =
>> function.
>>
>> Is there a size limit when I use #+call ?
>>
>> Thanks for help,
>> Martin
>>
>> #+name: =
>> pycalltest(trans=3Dtranslation,items=3Ditems,cust=3Dcustomer,deta=3Ddetail=
>> s,lang=3D"german",cur=3D"chf")
>> #+begin_src python :results output
>> execfile('latex.py')
>> print lx_config
>> #+end_src
>> #+call: pycalltest(translation,items,customer,details,"german","chf") =
>> :file "test.tex"
>
> Can you please provide all the pieces needed to run this? I presume at least
> latex.py is needed - anything else?
ok, found with options hlines and colnames I get the same result for direct evaluation
and call. Problem solved, thanks and sorry for the noise.
Martin
** input table translation
#+tblname: transl
| field | german | english |
|---------+---------+-------------|
| country | Schweiz | Switzerland |
#+name: pycalltest(trans=transl)
#+begin_src python :results output :hlines yes :colnames no
print trans
#+end_src
#+call: pycalltest(transl) :file "test.tex"
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-24 21:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-24 18:39 [Babel] size limit of #+call Martin Halder
2012-03-24 19:00 ` Nick Dokos
2012-03-24 20:46 ` Martin Halder
2012-03-24 21:00 ` Martin Halder
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).