emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* how send babel source code to shell?
@ 2011-03-03 13:20 Piter_
  2011-03-03 13:33 ` Rainer M Krug
  0 siblings, 1 reply; 5+ messages in thread
From: Piter_ @ 2011-03-03 13:20 UTC (permalink / raw)
  To: emacs-orgmode

Hi all.
I have a source code (in matlab or python). It cosists of two blocks
(using noweb).
I can evaluate it.
But I want to send it to matlab or python shell. And inspect the
result there (variable values and so on).
Can I do it?
Thanks.
Petro.

-- 
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: how send babel source code to shell?
  2011-03-03 13:20 how send babel source code to shell? Piter_
@ 2011-03-03 13:33 ` Rainer M Krug
  2011-03-03 13:58   ` Piter_
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer M Krug @ 2011-03-03 13:33 UTC (permalink / raw)
  To: Piter_; +Cc: emacs-orgmode

On Thu, Mar 3, 2011 at 2:20 PM, Piter_ <x.piter@gmail.com> wrote:
> Hi all.
> I have a source code (in matlab or python). It cosists of two blocks
> (using noweb).
> I can evaluate it.
> But I want to send it to matlab or python shell. And inspect the
> result there (variable values and so on).
> Can I do it?

Yes - use the :session header argument.

Although I have never used in matlab or python ( I used in in R and
sh), it should work there as well.

e.g:

#+begin_src python :session WHATEVER
  DO SOMETHING
#+end_src

Cheers,

Rainer

> Thanks.
> Petro.
>
> --
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>



-- 
NEW GERMAN FAX NUMBER!!!

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:           +27 - (0)83 9479 042
Fax:            +27 - (0)86 516 2782
Fax:            +49 - (0)321 2125 2244
email:          Rainer@krugs.de

Skype:          RMkrug
Google:         R.M.Krug@gmail.com

--
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: how send babel source code to shell?
  2011-03-03 13:33 ` Rainer M Krug
@ 2011-03-03 13:58   ` Piter_
  2011-03-03 14:04     ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Piter_ @ 2011-03-03 13:58 UTC (permalink / raw)
  To: Rainer M Krug, emacs-orgmode

Hi.
unfortunately it   does not work.
It does not recognize "noweb blocks"
it  sends it literally to the shell
 <<heterogeneous_fit>>
Error: Unexpected MATLAB operator.
Any advice to handle it?
Thanks.
Petro







On Thu, Mar 3, 2011 at 2:33 PM, Rainer M Krug <r.m.krug@gmail.com> wrote:
> On Thu, Mar 3, 2011 at 2:20 PM, Piter_ <x.piter@gmail.com> wrote:
>> Hi all.
>> I have a source code (in matlab or python). It cosists of two blocks
>> (using noweb).
>> I can evaluate it.
>> But I want to send it to matlab or python shell. And inspect the
>> result there (variable values and so on).
>> Can I do it?
>
> Yes - use the :session header argument.
>
> Although I have never used in matlab or python ( I used in in R and
> sh), it should work there as well.
>
> e.g:
>
> #+begin_src python :session WHATEVER
>  DO SOMETHING
> #+end_src
>
> Cheers,
>
> Rainer
>
>> Thanks.
>> Petro.
>>
>> --
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
>
>
> --
> NEW GERMAN FAX NUMBER!!!
>
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Natural Sciences Building
> Office Suite 2039
> Stellenbosch University
> Main Campus, Merriman Avenue
> Stellenbosch
> South Africa
>
> Cell:           +27 - (0)83 9479 042
> Fax:            +27 - (0)86 516 2782
> Fax:            +49 - (0)321 2125 2244
> email:          Rainer@krugs.de
>
> Skype:          RMkrug
> Google:         R.M.Krug@gmail.com
>

--
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: how send babel source code to shell?
  2011-03-03 13:58   ` Piter_
@ 2011-03-03 14:04     ` Eric Schulte
  2011-03-03 15:31       ` Piter_
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2011-03-03 14:04 UTC (permalink / raw)
  To: Piter_; +Cc: emacs-orgmode, Rainer M Krug

You will need to combine multiple header arguments, try something like

#+begin_src python :session *py* :noweb yes
  <<heterogeneous_fit>>
#+end_src

Please see this chapter of the manual for more information on code block
syntax and header arguments.
http://orgmode.org/manual/Working-With-Source-Code.html

Best -- Eric

Piter_ <x.piter@gmail.com> writes:

> Hi.
> unfortunately it   does not work.
> It does not recognize "noweb blocks"
> it  sends it literally to the shell
>  <<heterogeneous_fit>>
> Error: Unexpected MATLAB operator.
> Any advice to handle it?
> Thanks.
> Petro
>
>
>
>
>
>
>
> On Thu, Mar 3, 2011 at 2:33 PM, Rainer M Krug <r.m.krug@gmail.com> wrote:
>> On Thu, Mar 3, 2011 at 2:20 PM, Piter_ <x.piter@gmail.com> wrote:
>>> Hi all.
>>> I have a source code (in matlab or python). It cosists of two blocks
>>> (using noweb).
>>> I can evaluate it.
>>> But I want to send it to matlab or python shell. And inspect the
>>> result there (variable values and so on).
>>> Can I do it?
>>
>> Yes - use the :session header argument.
>>
>> Although I have never used in matlab or python ( I used in in R and
>> sh), it should work there as well.
>>
>> e.g:
>>
>> #+begin_src python :session WHATEVER
>>  DO SOMETHING
>> #+end_src
>>
>> Cheers,
>>
>> Rainer
>>
>>> Thanks.
>>> Petro.
>>>
>>> --
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>
>>
>>
>> --
>> NEW GERMAN FAX NUMBER!!!
>>
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
>> Biology, UCT), Dipl. Phys. (Germany)
>>
>> Centre of Excellence for Invasion Biology
>> Natural Sciences Building
>> Office Suite 2039
>> Stellenbosch University
>> Main Campus, Merriman Avenue
>> Stellenbosch
>> South Africa
>>
>> Cell:           +27 - (0)83 9479 042
>> Fax:            +27 - (0)86 516 2782
>> Fax:            +49 - (0)321 2125 2244
>> email:          Rainer@krugs.de
>>
>> Skype:          RMkrug
>> Google:         R.M.Krug@gmail.com
>>

--
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: how send babel source code to shell?
  2011-03-03 14:04     ` Eric Schulte
@ 2011-03-03 15:31       ` Piter_
  0 siblings, 0 replies; 5+ messages in thread
From: Piter_ @ 2011-03-03 15:31 UTC (permalink / raw)
  To: Eric Schulte, emacs-orgmode

Thanks to everybody.
Everything is working. Somehow between yesterday (when everithing was
working) and today I made a switch from ":noweb yes" to matlab style
":noweb on" . Shame on me.


On Thu, Mar 3, 2011 at 3:04 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
> You will need to combine multiple header arguments, try something like
>
> #+begin_src python :session *py* :noweb yes
>  <<heterogeneous_fit>>
> #+end_src
>
> Please see this chapter of the manual for more information on code block
> syntax and header arguments.
> http://orgmode.org/manual/Working-With-Source-Code.html
>
> Best -- Eric
>
> Piter_ <x.piter@gmail.com> writes:
>
>> Hi.
>> unfortunately it   does not work.
>> It does not recognize "noweb blocks"
>> it  sends it literally to the shell
>>  <<heterogeneous_fit>>
>> Error: Unexpected MATLAB operator.
>> Any advice to handle it?
>> Thanks.
>> Petro
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Mar 3, 2011 at 2:33 PM, Rainer M Krug <r.m.krug@gmail.com> wrote:
>>> On Thu, Mar 3, 2011 at 2:20 PM, Piter_ <x.piter@gmail.com> wrote:
>>>> Hi all.
>>>> I have a source code (in matlab or python). It cosists of two blocks
>>>> (using noweb).
>>>> I can evaluate it.
>>>> But I want to send it to matlab or python shell. And inspect the
>>>> result there (variable values and so on).
>>>> Can I do it?
>>>
>>> Yes - use the :session header argument.
>>>
>>> Although I have never used in matlab or python ( I used in in R and
>>> sh), it should work there as well.
>>>
>>> e.g:
>>>
>>> #+begin_src python :session WHATEVER
>>>  DO SOMETHING
>>> #+end_src
>>>
>>> Cheers,
>>>
>>> Rainer
>>>
>>>> Thanks.
>>>> Petro.
>>>>
>>>> --
>>>> Emacs-orgmode mailing list
>>>> Please use `Reply All' to send replies to the list.
>>>> Emacs-orgmode@gnu.org
>>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>>
>>>
>>>
>>>
>>> --
>>> NEW GERMAN FAX NUMBER!!!
>>>
>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
>>> Biology, UCT), Dipl. Phys. (Germany)
>>>
>>> Centre of Excellence for Invasion Biology
>>> Natural Sciences Building
>>> Office Suite 2039
>>> Stellenbosch University
>>> Main Campus, Merriman Avenue
>>> Stellenbosch
>>> South Africa
>>>
>>> Cell:           +27 - (0)83 9479 042
>>> Fax:            +27 - (0)86 516 2782
>>> Fax:            +49 - (0)321 2125 2244
>>> email:          Rainer@krugs.de
>>>
>>> Skype:          RMkrug
>>> Google:         R.M.Krug@gmail.com
>>>
>

--
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2011-03-03 15:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-03 13:20 how send babel source code to shell? Piter_
2011-03-03 13:33 ` Rainer M Krug
2011-03-03 13:58   ` Piter_
2011-03-03 14:04     ` Eric Schulte
2011-03-03 15:31       ` Piter_

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