[Orgmode] [babel] passing strings in

2010-03-25 Thread Maurizio Vitale
In the table/block pair below, I'm trying to pass an IP number to some shell code. It seems like in the table formula I can only have numbers. Is that right? #+TBLNAME: system-host-ping :var host=system-hosts | name | ip | ping | |---++| | host

Re: [Orgmode] [babel] passing strings in

2010-03-25 Thread Eric Schulte
Hi Maurizio, The ip addresses in your table are being interpreted as source/reference names which org-babel is trying to resolve. In order to differentiate between strings and reference names, we either must surround all strings in double quotes (as below) or we must end all references with ()

Re: [Orgmode] [babel] passing strings in

2010-03-25 Thread Dan Davison
Maurizio Vitale m...@cuma.i-did-not-set--mail-host-address--so-tickle-me writes: In the table/block pair below, I'm trying to pass an IP number to some shell code. Hi Maurizio, I think you've forgotten to specify that 'ip' is an argument of the system-ping block. So either add e.g. :var ip=0

Re: [Orgmode] [babel] passing strings in

2010-03-25 Thread Dan Davison
Eric Schulte schulte.e...@gmail.com writes: Hi Maurizio, The ip addresses in your table are being interpreted as source/reference names which org-babel is trying to resolve. In order to differentiate between strings and reference names, we either must surround all strings in double quotes

Re: [Orgmode] [babel] passing strings in

2010-03-25 Thread Eric Schulte
Hi Maurizio, Thanks for the $$ suggestion, I think that sounds like the simplest solution. I've just applied it, so your original table should now work if you double the $ before the column number. Dan, I think this is preferable to forcing the addition of () for interpretation as a reference

Re: [Orgmode] [babel] passing strings in

2010-03-25 Thread Maurizio Vitale
Eric == Eric Schulte schulte.e...@gmail.com writes: Eric Hi Maurizio, The ip addresses in your table are being Eric interpreted as source/reference names which org-babel is Eric trying to resolve. In order to differentiate between strings Eric and reference names, we either must

Re: [Orgmode] [babel] passing strings in

2010-03-25 Thread Maurizio Vitale
Dan == Dan Davison davi...@stats.ox.ac.uk writes: Dan Maurizio Vitale Dan m...@cuma.i-did-not-set--mail-host-address--so-tickle-me Dan writes: In the table/block pair below, I'm trying to pass an IP number to some shell code. Dan Hi Maurizio, Dan I think you've

Re: [Orgmode] [babel] passing strings in

2010-03-25 Thread Thomas S. Dye
On Mar 25, 2010, at 6:49 AM, Dan Davison wrote: Eric Schulte schulte.e...@gmail.com writes: Hi Maurizio, The ip addresses in your table are being interpreted as source/ reference names which org-babel is trying to resolve. In order to differentiate between strings and reference names,

Re: [Orgmode] [babel] passing strings in

2010-03-25 Thread Dan Davison
Dan Davison davi...@stats.ox.ac.uk writes: Eric Schulte schulte.e...@gmail.com writes: Hi Maurizio, The ip addresses in your table are being interpreted as source/reference names which org-babel is trying to resolve. In order to differentiate between strings and reference names, we either

Re: [Orgmode] [babel] passing strings in

2010-03-25 Thread Eric Schulte
Dan Davison davi...@stats.ox.ac.uk writes: Dan Davison davi...@stats.ox.ac.uk writes: [...] Hi Eric, Thanks for the much better answer. I think my vote goes for your second option. Actually, although I think what I said below is valid, it's much less obvious what a good solution is