[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: [babel] Executing sh-code
From: |
Sébastien Vauban |
Subject: |
[Orgmode] Re: [babel] Executing sh-code |
Date: |
Fri, 27 Nov 2009 11:43:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Hi Torsten,
Torsten Wagner wrote:
> I just tried quickly. I use org-babel with python, up to now never with
> shell scripting.
>
>> --8<---------------cut here---------------start------------->8---
>> * Prerequisites
>>
>> #+begin_src sh :session ecm
>> cd ~/Personal
>> #+end_src
>> --8<---------------cut here---------------end--------------->8---
>
> This works for me (I changed the folder name). There is a error line in my
> message buffer:
>
> executing Shell source code block
> ~/babel
> save-current-buffer: Wrong type argument: char-or-string-p, nil
>
> but the relevent part runs ok. My shell buffer depict to the new folder
> after execution:
>
> address@hidden ~ %
> cd ~/babel
> echo 'org_babel_sh_eoe'
> address@hidden ~ % cd ~/babel
> address@hidden ~/babel (git)-[master] %
>
>
> I used the same init like you
>
>> What am I doing wrong? Or have I set something wrong (or missing) in my
>> .emacs file?
>>
>> --8<---------------cut here---------------start------------->8---
>> (require 'org-babel-init)
>>
>> ;; activate a subset of languages
>> (require 'org-babel-R)
>> (require 'org-babel-sh)
>>
>> ;; make pre-built helper functions available
>> (org-babel-load-library-of-babel)
>> --8<---------------cut here---------------end--------------->8---
>
> However I didn't use the (org-babel-load-library-of-babel) function.
I removed it. No change.
> Which version of org-mode di you use ?
A version of somewhere last week.
> org-babel is young and change still heavily. I guess you have to use the
> latest git-version of org-mode.
Just did:
--8<---------------cut here---------------start------------->8---
git pull
make clean
make
--8<---------------cut here---------------end--------------->8---
No change (after Emacs restart).
> Furthermore, does the shell iteself (M-x shell) work in emacs as desired ?
Yep.
Though, there is one blank line in front:
--8<---------------cut here---------------start------------->8---
address@hidden ~>
^ cursor blinking here
--8<---------------cut here---------------end--------------->8---
I don't know if that's worth mentionning...
Tried as well this change:
--8<---------------cut here---------------start------------->8---
;; for single shell commands
(setq shell-file-name "zsh")
--8<---------------cut here---------------end--------------->8---
Same problem (after Emacs restart).
> Sorry not a big help at least a pointer that it should work...
Thanks anyway. It's helpful to know someone gets it working the same way (at
least, from a first observation).
Just note that the following works well:
--8<---------------cut here---------------start------------->8---
#+begin_src sh
cd ~/Personal
ls *.org
#+end_src
#+results:
| "Bookmarks.org" |
| "Home.org" |
| "refile.org" |
| "Scorpios.org" |
| "Succession.org" |
| "Tickler.org" |
| "Using-startx-for-Remote-Display.org" |
| "Voice-over-IP.org" |
--8<---------------cut here---------------end--------------->8---
It stops working only when I add `:session "whatever"' after the `sh'
specification.
That's the only difference between when it works and when it doesn't.
Maybe this can help?
Best regards,
Seb
--
Sébastien Vauban
- [Orgmode] [babel] Executing sh-code, Sébastien Vauban, 2009/11/25
- [Orgmode] Re: [babel] Executing sh-code, Sébastien Vauban, 2009/11/27
- Re: [Orgmode] [babel] Executing sh-code, Torsten Wagner, 2009/11/27
- [Orgmode] Re: [babel] Executing sh-code,
Sébastien Vauban <=
- Re: [Orgmode] Re: [babel] Executing sh-code, Eric Schulte, 2009/11/27
- Re: [Orgmode] Re: [babel] Executing sh-code, Dan Davison, 2009/11/27
- [Orgmode] Re: [babel] Executing sh-code, Sébastien Vauban, 2009/11/29
- Re: [Orgmode] Re: [babel] Executing sh-code, Eric Schulte, 2009/11/30
- Re: [Orgmode] Re: [babel] Executing sh-code, Nick Dokos, 2009/11/30
- Re: [Orgmode] Re: [babel] Executing sh-code, Eric Schulte, 2009/11/30