emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] ob-shell :stdin is broken on the main branch


From: Max Nikulin
Subject: [BUG] ob-shell :stdin is broken on the main branch
Date: Thu, 3 Nov 2022 23:17:48 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]