* [babel] Cannot use R and sh
@ 2011-10-20 18:31 Bernd Weiss
2011-10-20 18:49 ` Nick Dokos
0 siblings, 1 reply; 5+ messages in thread
From: Bernd Weiss @ 2011-10-20 18:31 UTC (permalink / raw)
To: emacs-orgmode
Hi all,
when using R and shell commands, the shell commands are sent to the R
buffer. I guess this has something to do with the session argument?!
############# test.org #####################
#+property: session *R*
#+BEGIN_SRC R
## comment
1+1
#+END_SRC
#+results:
: 2
#+BEGIN_SRC sh
ls -a
#+END_SRC
#+results:
: Error: object 'a' not found
############# test.org #####################
Thanks,
Bernd
Org-mode version 7.7 (release_7.7.393.g8caa)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [babel] Cannot use R and sh
2011-10-20 18:31 [babel] Cannot use R and sh Bernd Weiss
@ 2011-10-20 18:49 ` Nick Dokos
2011-10-20 18:58 ` Bernd Weiss
0 siblings, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2011-10-20 18:49 UTC (permalink / raw)
To: Bernd Weiss; +Cc: nicholas.dokos, emacs-orgmode
Bernd Weiss <bernd.weiss@uni-koeln.de> wrote:
> Hi all,
>
> when using R and shell commands, the shell commands are sent to the R
> buffer. I guess this has something to do with the session argument?!
>
> ############# test.org #####################
>
> #+property: session *R*
>
> #+BEGIN_SRC R
> ## comment
> 1+1
> #+END_SRC
>
> #+results:
> : 2
>
>
> #+BEGIN_SRC sh
> ls -a
> #+END_SRC
>
> #+results:
> : Error: object 'a' not found
>
> ############# test.org #####################
>
AFAIK, the syntax is (note the BABEL and the :session)
#+BABEL: :session *R*
With that, I can certainly reproduce what you get and it
is indeed the global session that causes it. If you
want a global session for all the other code blocks but
want to override it for the single shell block, you can do:
#+BEGIN_SRC sh :session *SH*
ls -a
#+END_SRC
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [babel] Cannot use R and sh
2011-10-20 18:49 ` Nick Dokos
@ 2011-10-20 18:58 ` Bernd Weiss
2011-10-20 19:10 ` [babel] Specifying buffer-wide header arguments: #+property vs #+babel (was: Cannot use R and sh) Bernd Weiss
0 siblings, 1 reply; 5+ messages in thread
From: Bernd Weiss @ 2011-10-20 18:58 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode
On 20.10.2011 14:49, Nick Dokos wrote:
[...]
> AFAIK, the syntax is (note the BABEL and the :session)
>
> #+BABEL: :session *R*
>
> With that, I can certainly reproduce what you get and it
> is indeed the global session that causes it. If you
> want a global session for all the other code blocks but
> want to override it for the single shell block, you can do:
>
> #+BEGIN_SRC sh :session *SH*
> ls -a
> #+END_SRC
Thanks, Nick, for your reply! I hadn't thought about overriding the "R
session". Good idea!
With respect to the "#+BABEL..." syntax, I vaguely remember that this is
deprecated. The Org Mode Manual, however, (still) mentions both ways...
<http://orgmode.org/org.html#Header-arguments-in-Org_002dmode-properties>.
Again, thanks,
Bernd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [babel] Specifying buffer-wide header arguments: #+property vs #+babel (was: Cannot use R and sh)
2011-10-20 18:58 ` Bernd Weiss
@ 2011-10-20 19:10 ` Bernd Weiss
2011-10-20 19:21 ` [babel] Specifying buffer-wide header arguments: #+property vs #+babel Eric Schulte
0 siblings, 1 reply; 5+ messages in thread
From: Bernd Weiss @ 2011-10-20 19:10 UTC (permalink / raw)
To: nicholas.dokos, emacs-orgmode
On 20.10.2011 14:58, Bernd Weiss wrote:
[...]
> With respect to the "#+BABEL..." syntax, I vaguely remember that this is
> deprecated. The Org Mode Manual, however, (still) mentions both ways...
> <http://orgmode.org/org.html#Header-arguments-in-Org_002dmode-properties>.
Earlier this year, Dan Davison wrote:
"Please note that it is possible to make an equivalent setting using
#+PROPERTY: session *R*
In fact, I suspect we are going to drop #+BABEL entirely, so please
consider it deprecated and use this form instead."
<http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg00672.html>
I am wondering if this statement still holds true?
Bernd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [babel] Specifying buffer-wide header arguments: #+property vs #+babel
2011-10-20 19:10 ` [babel] Specifying buffer-wide header arguments: #+property vs #+babel (was: Cannot use R and sh) Bernd Weiss
@ 2011-10-20 19:21 ` Eric Schulte
0 siblings, 0 replies; 5+ messages in thread
From: Eric Schulte @ 2011-10-20 19:21 UTC (permalink / raw)
To: Bernd Weiss; +Cc: nicholas.dokos, emacs-orgmode
Bernd Weiss <bernd.weiss@uni-koeln.de> writes:
> On 20.10.2011 14:58, Bernd Weiss wrote:
>
> [...]
>
>> With respect to the "#+BABEL..." syntax, I vaguely remember that this is
>> deprecated. The Org Mode Manual, however, (still) mentions both ways...
>> <http://orgmode.org/org.html#Header-arguments-in-Org_002dmode-properties>.
>
> Earlier this year, Dan Davison wrote:
>
> "Please note that it is possible to make an equivalent setting using
>
> #+PROPERTY: session *R*
>
> In fact, I suspect we are going to drop #+BABEL entirely, so please
> consider it deprecated and use this form instead."
>
> <http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg00672.html>
>
>
> I am wondering if this statement still holds true?
>
Yes, I would hope to drop #+BABEL: this at some point. In fact perhaps
this should happen sooner rather than later i.e., before the last merge
of Org-mode into Emacs before the release of Emacs24.
If there is no complaint I may make this change in the Org-mode git
repository now.
Best -- Eric
>
>
> Bernd
>
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-20 19:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-20 18:31 [babel] Cannot use R and sh Bernd Weiss
2011-10-20 18:49 ` Nick Dokos
2011-10-20 18:58 ` Bernd Weiss
2011-10-20 19:10 ` [babel] Specifying buffer-wide header arguments: #+property vs #+babel (was: Cannot use R and sh) Bernd Weiss
2011-10-20 19:21 ` [babel] Specifying buffer-wide header arguments: #+property vs #+babel Eric Schulte
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.