emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniele Pizzolli <dan@toel.it>
To: emacs-orgmode@gnu.org
Subject: [BUG] Shebang will cause shell and sh to fail over tramp
Date: Mon, 23 Feb 2015 18:30:55 +0100	[thread overview]
Message-ID: <86fv9wilgw.fsf@me.localhost.invalid> (raw)

Hello,

See the minimal example, the offending part is ":shebang "#!/bin/sh".

#+PROPERTY: header-args:shell  :dir /vagrant@127.0.0.1:/vagrant
#+PROPERTY: header-args:shell+ :exports both :results output verbatim replace
#+PROPERTY: header-args:shell+ :shebang "#!/bin/sh"

#+PROPERTY: header-args:sh  :dir /vagrant@127.0.0.1:/vagrant
#+PROPERTY: header-args:sh+ :exports both :results output verbatim replace
#+PROPERTY: header-args:sh+ :shebang "#!/bin/sh"

* setup
#+BEGIN_SRC sh
cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
# TODO accept the key automatically or use StrictHostKeyChecking no
#+END_SRC

#+BEGIN_SRC emacs-lisp
(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (python . t)
   (shell . t)
   (sh . t)))
#+END_SRC

* sh will fail

#+BEGIN_SRC sh
ls | wc -l
#+END_SRC

#+RESULTS:

Will show in *Org-Babel Error Output*:

/bin/bash: /scp:vagrant@127.0.0.1:/tmp/sh-script-1631VYi: No such file or directory

#+RESULTS:

* shell will fail

#+BEGIN_SRC shell
ls | wc -l
#+END_SRC

Will show in *Messages*

org-babel-execute:shell: Wrong number of arguments: #[(session body &optional params stdin) [... binary code cut ...]

* org version

#+BEGIN_SRC emacs-lisp
(org-version nil t)
#+END_SRC

#+RESULTS:
: Org-mode version 8.3beta (release_8.3beta-860-ge4da74 @ /home/vagrant/.emacs.d/el-get/org-mode/lisp/)

Best,
Daniele

                 reply	other threads:[~2015-02-23 17:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=86fv9wilgw.fsf@me.localhost.invalid \
    --to=dan@toel.it \
    --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).