emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] List argument to a shell code block
@ 2013-07-15  9:02 Daniel Gerber
  2013-07-17 14:16 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Gerber @ 2013-07-15  9:02 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

It seems that passing a list to a shell code-block is broken:

#+CALL: echo-sh(arg-list)

#+RESULTS: echo-sh(arg-list)
|  97 |
|  98 |
|  99 |
| 120 |
| 121 |
| 122 |

#+NAME: arg-list
- abc
- xyz

#+NAME: echo-sh
#+BEGIN_SRC sh :var arg=arg-list
for a in $arg; do
     echo "$a"
done
#+END_SRC


Shouldn't it work the same as a table argument?

#+CALL: echo-sh(arg-table)

#+RESULTS: echo-sh(arg-table)
| ABC |
| XYZ |

#+TBLNAME: arg-table
| ABC |
| XYZ |


This is on Org-mode version 8.0.3 (8.0.3-32-g0c789f-elpa).

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] List argument to a shell code block
  2013-07-15  9:02 [BUG] List argument to a shell code block Daniel Gerber
@ 2013-07-17 14:16 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2013-07-17 14:16 UTC (permalink / raw)
  To: Daniel Gerber; +Cc: emacs-orgmode

Daniel Gerber <daniel.g.gerber@gmail.com> writes:

> Hello,
>
> It seems that passing a list to a shell code-block is broken:
>
> #+CALL: echo-sh(arg-list)
>
> #+RESULTS: echo-sh(arg-list)
> |  97 |
> |  98 |
> |  99 |
> | 120 |
> | 121 |
> | 122 |
>
> #+NAME: arg-list
> - abc
> - xyz
>
> #+NAME: echo-sh
> #+BEGIN_SRC sh :var arg=arg-list
> for a in $arg; do
>      echo "$a"
> done
> #+END_SRC
>
>
> Shouldn't it work the same as a table argument?
>
> #+CALL: echo-sh(arg-table)
>
> #+RESULTS: echo-sh(arg-table)
> | ABC |
> | XYZ |
>
> #+TBLNAME: arg-table
> | ABC |
> | XYZ |
>
>
> This is on Org-mode version 8.0.3 (8.0.3-32-g0c789f-elpa).
>
>

Hi Daniel,

Thanks for reporting this, I've just pushed up a fix.

Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-17 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-15  9:02 [BUG] List argument to a shell code block Daniel Gerber
2013-07-17 14:16 ` Eric Schulte

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).