emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] ob-shell :stdin is broken on the main branch
@ 2022-11-03 16:17 Max Nikulin
  2022-11-04  2:42 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Max Nikulin @ 2022-11-03 16:17 UTC (permalink / raw)
  To: emacs-orgmode

Try the following source code blocks:

#+begin_src elisp
   (require 'ob-shell)
#+end_src

#+name: lbl
#+begin_example
line 1
line 2
#+end_example

#+begin_src bash :stdin lbl
   cat
#+end_src

Second one signals "Wrong number of arguments" at least in Emacs-26 with 
Org main HEAD.

Org bugfix branch works and yields

#+RESULTS:
| line | 1 |
| line | 2 |

I was going to suggest

#+begin_src bash :stdin lbl
   while read -r -a arr ; do
       echo "${arr[0]}"
   done
#+end_src
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html

in response to Greg Minshall. processing a literal example line by line 
in a shell source block? Wed, 02 Nov 2022 11:17:25 -0700. 
https://list.orgmode.org/122789.1667413045@archlinux




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

end of thread, other threads:[~2022-11-04  3:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 16:17 [BUG] ob-shell :stdin is broken on the main branch Max Nikulin
2022-11-04  2:42 ` Ihor Radchenko
2022-11-04  3:28   ` Max Nikulin

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