* [babel] passing strings in
@ 2010-03-25 15:21 Maurizio Vitale
2010-03-25 16:00 ` Eric Schulte
2010-03-25 16:09 ` Dan Davison
0 siblings, 2 replies; 10+ messages in thread
From: Maurizio Vitale @ 2010-03-25 15:21 UTC (permalink / raw)
To: emacs-orgmode
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 1 | 192.168.10.200 | #ERROR |
| host 2 | 192.168.10.24 | #ERROR |
| host 3 | 192.168.42.24 | #ERROR |
#+TBLFM: $3='(sbe system-ping (ip $2))'
#+source: system-ping
#+begin_src sh
# This is what I eventually want
#ping -w 10 -c 1 -q $ip >/dev/null 2>&1
#echo $?
# Testing
echo $ip
#+end_src
Any way to pass arbitrary strings?
Thanks a lot,
Maurizio
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [babel] passing strings in
2010-03-25 15:21 [babel] passing strings in Maurizio Vitale
@ 2010-03-25 16:00 ` Eric Schulte
2010-03-25 16:17 ` Maurizio Vitale
2010-03-25 16:49 ` Dan Davison
2010-03-25 16:09 ` Dan Davison
1 sibling, 2 replies; 10+ messages in thread
From: Eric Schulte @ 2010-03-25 16:00 UTC (permalink / raw)
To: maurizio.vitale; +Cc: emacs-orgmode
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 "()" and
disallow any strings which end in "()". Currently we are taking the
former approach, which means your table will require the following to
work...
#+TBLNAME: system-host-ping :var host=system-hosts
| name | ip | ping |
|--------+------------------+----------------|
| host 1 | "192.168.10.200" | 192.168.10.200 |
| host 2 | "192.168.10.24" | 192.168.10.24 |
| host 3 | "192.168.42.24" | 192.168.42.24 |
#+TBLFM: $3='(sbe system-ping (ip $2))'
#+source: system-ping
#+begin_src sh :var ip=0
# This is what I eventually want
#ping -w 10 -c 1 -q $ip >/dev/null 2>&1
#echo $?
# Testing
echo $ip
#+end_src
I'd be open to discussion on this issue. I suppose if reference
resolution fails we could try using the name as a string literal, but
that could lead to debugging nightmares...
Cheers -- Eric
Maurizio Vitale
<mav@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. 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 1 | 192.168.10.200 | #ERROR |
> | host 2 | 192.168.10.24 | #ERROR |
> | host 3 | 192.168.42.24 | #ERROR |
> #+TBLFM: $3='(sbe system-ping (ip $2))'
>
> #+source: system-ping
> #+begin_src sh
> # This is what I eventually want
> #ping -w 10 -c 1 -q $ip >/dev/null 2>&1
> #echo $?
>
> # Testing
> echo $ip
> #+end_src
>
> Any way to pass arbitrary strings?
>
> Thanks a lot,
>
> Maurizio
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [babel] passing strings in
2010-03-25 16:00 ` Eric Schulte
@ 2010-03-25 16:17 ` Maurizio Vitale
2010-03-25 17:12 ` Eric Schulte
2010-03-25 16:49 ` Dan Davison
1 sibling, 1 reply; 10+ messages in thread
From: Maurizio Vitale @ 2010-03-25 16:17 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode
>>>>> "Eric" == Eric Schulte <schulte.eric@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 surround all strings in
Eric> double quotes (as below) or we must end all references with
Eric> "()" and disallow any strings which end in "()". Currently we
Eric> are taking the former approach, which means your table will
Eric> require the following to work...
That was a quick replay! Thanks.
If I understand you, the problem is not with org-babel, but with
org-mode itself expanding column references. In this case, wouldn't it
be possible to consider a general "quoting" mechanism preventing that
expansion? obviously "'" cannot be used, but maybe $$2 could be made to
mean "threat the value literally".
I'd be ok with the quotes in the source, but they look terrible in
exported documents.
Anyhow, I can live with the workaround you suggested.
Thanks again,
Maurizio
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [babel] passing strings in
2010-03-25 16:17 ` Maurizio Vitale
@ 2010-03-25 17:12 ` Eric Schulte
0 siblings, 0 replies; 10+ messages in thread
From: Eric Schulte @ 2010-03-25 17:12 UTC (permalink / raw)
To: Maurizio Vitale; +Cc: emacs-orgmode
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 both for reasons of backwards
compatibility, and also I somehow feel that reference interpretation by
default and string interpretation only in the presence of double quotes
is somehow more intuitive and natural. Definitely an open area for
discussion...
Thanks -- Eric
Maurizio Vitale <maurizio.vitale@polymath-solutions.com> writes:
>>>>>> "Eric" == Eric Schulte <schulte.eric@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 surround all strings in
> Eric> double quotes (as below) or we must end all references with
> Eric> "()" and disallow any strings which end in "()". Currently we
> Eric> are taking the former approach, which means your table will
> Eric> require the following to work...
>
> That was a quick replay! Thanks.
>
> If I understand you, the problem is not with org-babel, but with
> org-mode itself expanding column references. In this case, wouldn't it
> be possible to consider a general "quoting" mechanism preventing that
> expansion? obviously "'" cannot be used, but maybe $$2 could be made to
> mean "threat the value literally".
>
> I'd be ok with the quotes in the source, but they look terrible in
> exported documents.
>
> Anyhow, I can live with the workaround you suggested.
> Thanks again,
>
> Maurizio
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [babel] passing strings in
2010-03-25 16:00 ` Eric Schulte
2010-03-25 16:17 ` Maurizio Vitale
@ 2010-03-25 16:49 ` Dan Davison
2010-03-25 19:05 ` Thomas S. Dye
2010-03-25 19:23 ` Dan Davison
1 sibling, 2 replies; 10+ messages in thread
From: Dan Davison @ 2010-03-25 16:49 UTC (permalink / raw)
To: Eric Schulte; +Cc: maurizio.vitale, emacs-orgmode
"Eric Schulte" <schulte.eric@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 (as below) or we must end all references with "()" and
> disallow any strings which end in "()".
Hi Eric,
Thanks for the much better answer. I think my vote goes for your second
option. In other words, :var x=blockname passes the string "blockname",
whereas :var x=blockname() passes the result of evaluating a block
called "blockname".
One argument for this is that in order to pass arguments to a block
being evaluated as a reference, users are already obliged to use the
parenthetic function call syntax:
:var x=blockname(arg1=val1)
so demanding the parentheses in the absence of arguments is natural (and
perhaps even serves to remind users of the possibility of passing
arguments).
Also I think that users will probably pass strings more often than they
will pass the results of block reference evaluations, so
interpreting :var=blockname as a string literal may also be justified by
Least Surprise for naive users (e.g. apparently me...).
Dan
> Currently we are taking the
> former approach, which means your table will require the following to
> work...
>
> #+TBLNAME: system-host-ping :var host=system-hosts
> | name | ip | ping |
> |--------+------------------+----------------|
> | host 1 | "192.168.10.200" | 192.168.10.200 |
> | host 2 | "192.168.10.24" | 192.168.10.24 |
> | host 3 | "192.168.42.24" | 192.168.42.24 |
> #+TBLFM: $3='(sbe system-ping (ip $2))'
>
> #+source: system-ping
> #+begin_src sh :var ip=0
> # This is what I eventually want
> #ping -w 10 -c 1 -q $ip >/dev/null 2>&1
> #echo $?
>
> # Testing
> echo $ip
> #+end_src
>
> I'd be open to discussion on this issue. I suppose if reference
> resolution fails we could try using the name as a string literal, but
> that could lead to debugging nightmares...
>
> Cheers -- Eric
>
> Maurizio Vitale
> <mav@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. 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 1 | 192.168.10.200 | #ERROR |
>> | host 2 | 192.168.10.24 | #ERROR |
>> | host 3 | 192.168.42.24 | #ERROR |
>> #+TBLFM: $3='(sbe system-ping (ip $2))'
>>
>> #+source: system-ping
>> #+begin_src sh
>> # This is what I eventually want
>> #ping -w 10 -c 1 -q $ip >/dev/null 2>&1
>> #echo $?
>>
>> # Testing
>> echo $ip
>> #+end_src
>>
>> Any way to pass arbitrary strings?
>>
>> Thanks a lot,
>>
>> Maurizio
>>
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [babel] passing strings in
2010-03-25 16:49 ` Dan Davison
@ 2010-03-25 19:05 ` Thomas S. Dye
2010-03-25 19:23 ` Dan Davison
1 sibling, 0 replies; 10+ messages in thread
From: Thomas S. Dye @ 2010-03-25 19:05 UTC (permalink / raw)
To: Dan Davison; +Cc: maurizio.vitale, emacs-orgmode
On Mar 25, 2010, at 6:49 AM, Dan Davison wrote:
> "Eric Schulte" <schulte.eric@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 (as below) or we must end all references with "()"
>> and
>> disallow any strings which end in "()".
>
> Hi Eric,
>
> Thanks for the much better answer. I think my vote goes for your
> second
> option. In other words, :var x=blockname passes the string
> "blockname",
> whereas :var x=blockname() passes the result of evaluating a block
> called "blockname".
>
> One argument for this is that in order to pass arguments to a block
> being evaluated as a reference, users are already obliged to use the
> parenthetic function call syntax:
>
> :var x=blockname(arg1=val1)
>
> so demanding the parentheses in the absence of arguments is natural
> (and
> perhaps even serves to remind users of the possibility of passing
> arguments).
>
> Also I think that users will probably pass strings more often than
> they
> will pass the results of block reference evaluations, so
> interpreting :var=blockname as a string literal may also be
> justified by
> Least Surprise for naive users (e.g. apparently me...).
>
> Dan
>
>
>
>
>> Currently we are taking the
>> former approach, which means your table will require the following to
>> work...
>>
>> #+TBLNAME: system-host-ping :var host=system-hosts
>> | name | ip | ping |
>> |--------+------------------+----------------|
>> | host 1 | "192.168.10.200" | 192.168.10.200 |
>> | host 2 | "192.168.10.24" | 192.168.10.24 |
>> | host 3 | "192.168.42.24" | 192.168.42.24 |
>> #+TBLFM: $3='(sbe system-ping (ip $2))'
>>
>> #+source: system-ping
>> #+begin_src sh :var ip=0
>> # This is what I eventually want
>> #ping -w 10 -c 1 -q $ip >/dev/null 2>&1
>> #echo $?
>>
>> # Testing
>> echo $ip
>> #+end_src
>>
>> I'd be open to discussion on this issue. I suppose if reference
>> resolution fails we could try using the name as a string literal, but
>> that could lead to debugging nightmares...
>>
>> Cheers -- Eric
>>
>> Maurizio Vitale
>> <mav@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. 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 1 | 192.168.10.200 | #ERROR |
>>> | host 2 | 192.168.10.24 | #ERROR |
>>> | host 3 | 192.168.42.24 | #ERROR |
>>> #+TBLFM: $3='(sbe system-ping (ip $2))'
>>>
>>> #+source: system-ping
>>> #+begin_src sh
>>> # This is what I eventually want
>>> #ping -w 10 -c 1 -q $ip >/dev/null 2>&1
>>> #echo $?
>>>
>>> # Testing
>>> echo $ip
>>> #+end_src
>>>
>>> Any way to pass arbitrary strings?
>>>
>>> Thanks a lot,
>>>
>>> Maurizio
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Aloha all,
Would it be useful to interpret arguments like this?
arg -> interpretation
-------------------
"string" -> string
"reference()" -> string
reference -> string
reference() - reference
If reference resolution fails then an error could be raised
unambiguously.
All the best,
Tom
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [babel] passing strings in
2010-03-25 16:49 ` Dan Davison
2010-03-25 19:05 ` Thomas S. Dye
@ 2010-03-25 19:23 ` Dan Davison
2010-03-25 19:48 ` Eric Schulte
1 sibling, 1 reply; 10+ messages in thread
From: Dan Davison @ 2010-03-25 19:23 UTC (permalink / raw)
To: Eric Schulte; +Cc: maurizio.vitale, emacs-orgmode
Dan Davison <davison@stats.ox.ac.uk> writes:
> "Eric Schulte" <schulte.eric@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 (as below) or we must end all references with "()" and
>> disallow any strings which end in "()".
>
> 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 because I completely ignored the
(common) possibility of referring to a table:
:var x=tablename
In that case it is less appealing, although a possibility, to demand
that we write :var x=tablename() [1]
However, I do still feel that having to quote the strings in Maurizio's
example is unfortunate -- so my current position is not very helpful:
I'm not sure what a good solution is.
Dan
Footnotes:
[1] There are two cases:
1. Normal org table not associated with code block
2. Table created by code block
In the case of (2) it makes some sense to use the name() notation
because the same name is used to name the results table as is used to
name the code block which generates the table.
> In other words, :var x=blockname passes the string "blockname",
> whereas :var x=blockname() passes the result of evaluating a block
> called "blockname".
>
> One argument for this is that in order to pass arguments to a block
> being evaluated as a reference, users are already obliged to use the
> parenthetic function call syntax:
>
> :var x=blockname(arg1=val1)
>
> so demanding the parentheses in the absence of arguments is natural (and
> perhaps even serves to remind users of the possibility of passing
> arguments).
>
> Also I think that users will probably pass strings more often than they
> will pass the results of block reference evaluations, so
> interpreting :var=blockname as a string literal may also be justified by
> Least Surprise for naive users (e.g. apparently me...).
>
> Dan
>
>
>
>
>> Currently we are taking the
>> former approach, which means your table will require the following to
>> work...
>>
>> #+TBLNAME: system-host-ping :var host=system-hosts
>> | name | ip | ping |
>> |--------+------------------+----------------|
>> | host 1 | "192.168.10.200" | 192.168.10.200 |
>> | host 2 | "192.168.10.24" | 192.168.10.24 |
>> | host 3 | "192.168.42.24" | 192.168.42.24 |
>> #+TBLFM: $3='(sbe system-ping (ip $2))'
>>
>> #+source: system-ping
>> #+begin_src sh :var ip=0
>> # This is what I eventually want
>> #ping -w 10 -c 1 -q $ip >/dev/null 2>&1
>> #echo $?
>>
>> # Testing
>> echo $ip
>> #+end_src
>>
>> I'd be open to discussion on this issue. I suppose if reference
>> resolution fails we could try using the name as a string literal, but
>> that could lead to debugging nightmares...
>>
>> Cheers -- Eric
>>
>> Maurizio Vitale
>> <mav@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. 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 1 | 192.168.10.200 | #ERROR |
>>> | host 2 | 192.168.10.24 | #ERROR |
>>> | host 3 | 192.168.42.24 | #ERROR |
>>> #+TBLFM: $3='(sbe system-ping (ip $2))'
>>>
>>> #+source: system-ping
>>> #+begin_src sh
>>> # This is what I eventually want
>>> #ping -w 10 -c 1 -q $ip >/dev/null 2>&1
>>> #echo $?
>>>
>>> # Testing
>>> echo $ip
>>> #+end_src
>>>
>>> Any way to pass arbitrary strings?
>>>
>>> Thanks a lot,
>>>
>>> Maurizio
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [babel] passing strings in
2010-03-25 19:23 ` Dan Davison
@ 2010-03-25 19:48 ` Eric Schulte
0 siblings, 0 replies; 10+ messages in thread
From: Eric Schulte @ 2010-03-25 19:48 UTC (permalink / raw)
To: Dan Davison; +Cc: maurizio.vitale, emacs-orgmode
Dan Davison <davison@stats.ox.ac.uk> writes:
> Dan Davison <davison@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 because I completely ignored the
> (common) possibility of referring to a table:
>
> :var x=tablename
>
> In that case it is less appealing, although a possibility, to demand
> that we write :var x=tablename() [1]
>
My problem with this path is that then we can't pass a string value into
a variable in which the last two characters are "(" and ")" because it
would be interpreted as a reference. I'm liking the current solution at
http://eschulte.github.com/babel-dev/DONE-literal-values-from-tables.html
Cheers -- Eric
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [babel] passing strings in
2010-03-25 15:21 [babel] passing strings in Maurizio Vitale
2010-03-25 16:00 ` Eric Schulte
@ 2010-03-25 16:09 ` Dan Davison
2010-03-25 16:21 ` Maurizio Vitale
1 sibling, 1 reply; 10+ messages in thread
From: Dan Davison @ 2010-03-25 16:09 UTC (permalink / raw)
To: maurizio.vitale; +Cc: emacs-orgmode
Maurizio Vitale
<mav@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 or use
#+source: system-ping(ip=0) (You can of course use any default argument value other than 0)
Additionally, I'm finding that the ip column needs to be single-quoted
(whether it is an IP number or a human-readable alias). I'm rushing a
bit at the moment, but that looks like a bug.
So in any case, this works for me (also works with single-quoted IP
numbers)
| name | ip | ping |
|--------+----------------+------|
| host 1 | 'orgmode.org' | 0 |
| host 2 | 'xorgmode.org' | 2 |
#+TBLFM: $3='(sbe system-ping (ip $2))
#+source: system-ping(ip=0)
#+begin_src sh
ping -w 10 -c 1 -q $ip >/dev/null 2>&1
echo $?
#+end_src
Dan
> 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 1 | 192.168.10.200 | #ERROR |
> | host 2 | 192.168.10.24 | #ERROR |
> | host 3 | 192.168.42.24 | #ERROR |
> #+TBLFM: $3='(sbe system-ping (ip $2))'
>
> #+source: system-ping
> #+begin_src sh
> # This is what I eventually want
> #ping -w 10 -c 1 -q $ip >/dev/null 2>&1
> #echo $?
>
> # Testing
> echo $ip
> #+end_src
>
> Any way to pass arbitrary strings?
>
> Thanks a lot,
>
> Maurizio
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [babel] passing strings in
2010-03-25 16:09 ` Dan Davison
@ 2010-03-25 16:21 ` Maurizio Vitale
0 siblings, 0 replies; 10+ messages in thread
From: Maurizio Vitale @ 2010-03-25 16:21 UTC (permalink / raw)
To: Dan Davison; +Cc: emacs-orgmode
>>>>> "Dan" == Dan Davison <davison@stats.ox.ac.uk> writes:
Dan> Maurizio Vitale
Dan> <mav@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 forgotten to specify that 'ip' is an argument of
Dan> the system-ping block. So either add e.g. :var ip=0 or use
Dan> #+source: system-ping(ip=0) (You can of course use any default
Dan> argument value other than 0)
I used to have the argument specification. But then discovered it was
working without and since I didn't have a need for a default value, I
removed it.
Maybe this work accidentally and it is not supported.
Dan> Additionally, I'm finding that the ip column needs to be
Dan> single-quoted (whether it is an IP number or a human-readable
Dan> alias). I'm rushing a bit at the moment, but that looks like a
Dan> bug.
Dan> So in any case, this works for me (also works with
Dan> single-quoted IP numbers)
Thanks!
Maurizio
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-03-25 19:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-25 15:21 [babel] passing strings in Maurizio Vitale
2010-03-25 16:00 ` Eric Schulte
2010-03-25 16:17 ` Maurizio Vitale
2010-03-25 17:12 ` Eric Schulte
2010-03-25 16:49 ` Dan Davison
2010-03-25 19:05 ` Thomas S. Dye
2010-03-25 19:23 ` Dan Davison
2010-03-25 19:48 ` Eric Schulte
2010-03-25 16:09 ` Dan Davison
2010-03-25 16:21 ` Maurizio Vitale
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).