emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.com>
To: David Dynerman <emperordali@block-party.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Cannot tangle bash source blocks [9.0 (release_9.0-237-gccf2b9 @ /usr/local/share/emacs/site-lisp/org/)]
Date: Mon, 02 Jan 2017 13:03:36 -1000	[thread overview]
Message-ID: <m2h95h12uv.fsf@tsdye.com> (raw)
In-Reply-To: <m21swlgm8k.fsf@block-party.net>

Aloha David,

David Dynerman writes:

> I cannot tangle a bash source block (via ob-shell) that contains
> variables. To reproduce, enter this into an org file:
>
> #+BEGIN_SRC bash :var HELLO="world" :tangle
> echo $HELLO
> #+END_SRC
>
> Then C-c C-v t RET
>
> This error is reported:
>
> org-babel-tangle-single-block: Wrong number of arguments: (2 . 4)

The :tangle keyword requires an argument, one of 'yes', 'no', or a path.

But I think your error message (which I can reproduce) is due to using
'bash' instead of 'shell' for the language of the source code block.

This works for me:

#+BEGIN_SRC shell :var HELLO="world" :tangle bash.sh
echo $HELLO
#+END_SRC

hth,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com

  reply	other threads:[~2017-01-03  0:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-02 21:55 Bug: Cannot tangle bash source blocks [9.0 (release_9.0-237-gccf2b9 @ /usr/local/share/emacs/site-lisp/org/)] David Dynerman
2017-01-02 23:03 ` Thomas S. Dye [this message]
2017-01-03 17:30 ` Nicolas Goaziou

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=m2h95h12uv.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=emperordali@block-party.net \
    /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).