emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Babel shell script issue
@ 2016-04-25  7:24 Jarmo Hurri
  0 siblings, 0 replies; 7+ messages in thread
From: Jarmo Hurri @ 2016-04-25  7:24 UTC (permalink / raw)
  To: emacs-orgmode


Greetings.

I have trouble running shell scripts in Babel. I can't even reproduce
examples from worg. For example, this piece of org

  #+begin_src sh :results drawer
  cat <<EOF
  | 1 | 2
  |--
  | a | b
  EOF
  #+end_src

from this page

http://orgmode.org/worg/org-contrib/babel/header-args.html

produces the following error:

org-babel-variable-assignments:sh: Symbol's function definition is void: org-babel-get-header

I have just pulled the most recent org, that is,
release_8.3.4-753-gda4db33.

Any tips?

Jarmo

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

* Re: Babel shell script issue
       [not found] <ac5a3ce85c5243c6b2d730e422922843@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-04-25  8:04 ` Eric S Fraga
  2016-04-25  8:20   ` Sylvain Rousseau
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Eric S Fraga @ 2016-04-25  8:04 UTC (permalink / raw)
  To: Jarmo Hurri; +Cc: emacs-orgmode@gnu.org

On Monday, 25 Apr 2016 at 07:24, Jarmo Hurri wrote:
> Greetings.
>
> I have trouble running shell scripts in Babel. I can't even reproduce
> examples from worg. For example, this piece of org
>
>   #+begin_src sh :results drawer
>   cat <<EOF
>   | 1 | 2
>   |--
>   | a | b
>   EOF
>   #+end_src
>
> from this page
>
> http://orgmode.org/worg/org-contrib/babel/header-args.html
>
> produces the following error:
>
> org-babel-variable-assignments:sh: Symbol's function definition is
> void: org-babel-get-header

Have you done this:

  (require 'ob-shell)
  
?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-739-g789412

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

* Re: Babel shell script issue
  2016-04-25  8:04 ` Eric S Fraga
@ 2016-04-25  8:20   ` Sylvain Rousseau
  2016-04-25  8:40     ` Jarmo Hurri
       [not found]   ` <a93d2d3d412d434ca9fc2e9652c2c6b4@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  2016-04-25 13:17   ` Jarmo Hurri
  2 siblings, 1 reply; 7+ messages in thread
From: Sylvain Rousseau @ 2016-04-25  8:20 UTC (permalink / raw)
  To: Eric S Fraga, Jarmo Hurri, emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]

Hi,

I had the same problem. You actually need to use:

    #+begin_src shell :results drawer
    #+end_src

Using sh loads an org function that comes with your emacs and is outdated...

Btw could these functions be marked as deprecated but aliased to the new
ones?

Sylvain.

2016-04-25 10:04 GMT+02:00 Eric S Fraga <e.fraga@ucl.ac.uk>:

> On Monday, 25 Apr 2016 at 07:24, Jarmo Hurri wrote:
> > Greetings.
> >
> > I have trouble running shell scripts in Babel. I can't even reproduce
> > examples from worg. For example, this piece of org
> >
> >   #+begin_src sh :results drawer
> >   cat <<EOF
> >   | 1 | 2
> >   |--
> >   | a | b
> >   EOF
> >   #+end_src
> >
> > from this page
> >
> > http://orgmode.org/worg/org-contrib/babel/header-args.html
> >
> > produces the following error:
> >
> > org-babel-variable-assignments:sh: Symbol's function definition is
> > void: org-babel-get-header
>
> Have you done this:
>
>   (require 'ob-shell)
>
> ?
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-739-g789412
>
>

[-- Attachment #2: Type: text/html, Size: 1896 bytes --]

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

* Re: Babel shell script issue
       [not found]   ` <a93d2d3d412d434ca9fc2e9652c2c6b4@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-04-25  8:26     ` Eric S Fraga
  2016-04-25  8:37       ` Loris Bennett
  0 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2016-04-25  8:26 UTC (permalink / raw)
  To: Sylvain Rousseau; +Cc: Jarmo Hurri, emacs-orgmode@gnu.org

On Monday, 25 Apr 2016 at 08:20, Sylvain Rousseau wrote:
> Hi,
>
> I had the same problem. You actually need to use:
>
>     #+begin_src shell :results drawer
>     #+end_src
>
> Using sh loads an org function that comes with your emacs and is outdated...

Interestingly, "sh" worked for me with quite a recent org from git but I
do think you are correct that the proper usage is with "shell".

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-739-g789412

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

* Re: Babel shell script issue
  2016-04-25  8:26     ` Eric S Fraga
@ 2016-04-25  8:37       ` Loris Bennett
  0 siblings, 0 replies; 7+ messages in thread
From: Loris Bennett @ 2016-04-25  8:37 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Monday, 25 Apr 2016 at 08:20, Sylvain Rousseau wrote:
>> Hi,
>>
>> I had the same problem. You actually need to use:
>>
>>     #+begin_src shell :results drawer
>>     #+end_src
>>
>> Using sh loads an org function that comes with your emacs and is outdated...
>
> Interestingly, "sh" worked for me with quite a recent org from git but I
> do think you are correct that the proper usage is with "shell".

If I change 'sh' to 'shell', I loose the syntax highlighting of the
code.  Is 'sh' really deprecated and, if so, how can I get the code back
in colour?

Cheers,

Loris

Org-mode version 8.3.4 (8.3.4-31-gcb683e-elpaplus), GNU Emacs 24.4.1

-- 
This signature is currently under construction.

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

* Re: Babel shell script issue
  2016-04-25  8:20   ` Sylvain Rousseau
@ 2016-04-25  8:40     ` Jarmo Hurri
  0 siblings, 0 replies; 7+ messages in thread
From: Jarmo Hurri @ 2016-04-25  8:40 UTC (permalink / raw)
  To: emacs-orgmode

Sylvain Rousseau <thisirs@gmail.com> writes:

> Hi,
>
> I had the same problem. You actually need to use:
>
>     #+begin_src shell :results drawer
>     #+end_src
>

Ok, this removes the error, but I still get no reasonable output from
the example from worg:

  #+begin_src shell :results drawer
  cat <<EOF
  | 1 | 2
  |--
  | a | b
  EOF
  #+end_src

It only prints a bunch of cryptic stuff in the echo area and produces no
other output. (The same happens in my own code.)

Jarmo

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

* Re: Babel shell script issue
  2016-04-25  8:04 ` Eric S Fraga
  2016-04-25  8:20   ` Sylvain Rousseau
       [not found]   ` <a93d2d3d412d434ca9fc2e9652c2c6b4@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2016-04-25 13:17   ` Jarmo Hurri
  2 siblings, 0 replies; 7+ messages in thread
From: Jarmo Hurri @ 2016-04-25 13:17 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Monday, 25 Apr 2016 at 07:24, Jarmo Hurri wrote:
>> Greetings.
>>
>> I have trouble running shell scripts in Babel. I can't even reproduce
>> examples from worg. For example, this piece of org
>>
>>   #+begin_src sh :results drawer
>>   cat <<EOF
>>   | 1 | 2
>>   |--
>>   | a | b
>>   EOF
>>   #+end_src
>>
>> from this page
>>
>> http://orgmode.org/worg/org-contrib/babel/header-args.html
>>
>> produces the following error:
>>
>> org-babel-variable-assignments:sh: Symbol's function definition is
>> void: org-babel-get-header
>
> Have you done this:
>
>   (require 'ob-shell)

Yes I have, and it doesn't solve the issue.

I am currently exchanging emails with Sylvain in order to resolve the
issue.

Thanks,

Jarmo

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

end of thread, other threads:[~2016-04-25 13:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25  7:24 Babel shell script issue Jarmo Hurri
     [not found] <ac5a3ce85c5243c6b2d730e422922843@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-04-25  8:04 ` Eric S Fraga
2016-04-25  8:20   ` Sylvain Rousseau
2016-04-25  8:40     ` Jarmo Hurri
     [not found]   ` <a93d2d3d412d434ca9fc2e9652c2c6b4@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2016-04-25  8:26     ` Eric S Fraga
2016-04-25  8:37       ` Loris Bennett
2016-04-25 13:17   ` Jarmo Hurri

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