emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [BUG] ob-shell :stdin is broken on the main branch
Date: Thu, 3 Nov 2022 23:17:48 +0700	[thread overview]
Message-ID: <tk0pjd$ebo$1@ciao.gmane.io> (raw)

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	other threads:[~2022-11-03 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 16:17 Max Nikulin [this message]
2022-11-04  2:42 ` [BUG] ob-shell :stdin is broken on the main branch Ihor Radchenko
2022-11-04  3:28   ` Max Nikulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='tk0pjd$ebo$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).