From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Witte Subject: Re: How to end a :session? Date: Thu, 28 May 2015 12:07:24 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c1e3b6aaacbe05172186e3 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxuin-0004aq-LU for emacs-orgmode@gnu.org; Thu, 28 May 2015 06:07:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxuij-0007d9-Pz for emacs-orgmode@gnu.org; Thu, 28 May 2015 06:07:29 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:36765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxuij-0007cw-Hs for emacs-orgmode@gnu.org; Thu, 28 May 2015 06:07:25 -0400 Received: by paza2 with SMTP id a2so20177703paz.3 for ; Thu, 28 May 2015 03:07:24 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer M Krug Cc: Org Mode --001a11c1e3b6aaacbe05172186e3 Content-Type: text/plain; charset=UTF-8 perhaps what you want is a named session, see http://orgmode.org/manual/session.html On 28 May 2015 at 10:44, Rainer M Krug wrote: > Hi > > I can start a session as follow: > > --8<---------------cut here---------------start------------->8--- > #+begin_src R :session Test > cat("Session Test\n") > #+end_src > --8<---------------cut here---------------end--------------->8--- > > Now I hava an R session named *Test*. But how can I closes this session? > I thought about just quitting R > > --8<---------------cut here---------------start------------->8--- > #+begin_src R :session Test > q(save = "no) > #+end_src > --8<---------------cut here---------------end--------------->8--- > > but this does not return as ESS is waiting for the prompt (">"). > > Is there a way of closing the session *Test* and close the buffer? > > My reasoning is that I want to do different longer analysis in one org > file and start each in its own session, i.e. clean R. But as they > involve several steps, I don't want to put them into one code block. > > So I have several code blocks which I want to execute in a "throw away > session" which I would like to discard afterwards. > > So I am looking for something like > > #+CLOSE_SESSION Test > > which would then close the session *Test* > > Is something like this possible at the moment? > > Rainer > > -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation > Biology, UCT), Dipl. Phys. (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : +33 - (0)9 53 10 27 44 > Cell: +33 - (0)6 85 62 59 98 > Fax : +33 - (0)9 58 10 27 44 > > Fax (D): +49 - (0)3 21 21 25 22 44 > > email: Rainer@krugs.de > > Skype: RMkrug > > PGP: 0x0F52F982 > --001a11c1e3b6aaacbe05172186e3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
perhaps what you want is a named session, see http://orgmode.org/manual/session.ht= ml

O= n 28 May 2015 at 10:44, Rainer M Krug <Rainer@krugs.de> wrote:=
Hi

I can start a session as follow:

--8<---------------cut here---------------start------------->8---
#+begin_src R :session Test
cat("Session Test\n")
#+end_src
--8<---------------cut here---------------end--------------->8---

Now I hava an R session named *Test*. But how can I closes this session? I thought about just quitting R

--8<---------------cut here---------------start------------->8---
#+begin_src R :session Test
q(save =3D "no)
#+end_src
--8<---------------cut here---------------end--------------->8---

but this does not return as ESS is waiting for the prompt (">"= ).

Is there a way of closing the session *Test* and close the buffer?

My reasoning is that I want to do different longer analysis in one org
file and start each in its own session, i.e. clean R. But as they
involve several steps, I don't want to put them into one code block.
So I have several code blocks which I want to execute in a "throw away=
session" which I would like to discard afterwards.

So I am looking for something like

#+CLOSE_SESSION Test

which would then close the session *Test*

Is something like this possible at the moment?

Rainer

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

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :=C2=A0 =C2=A0 =C2=A0 =C2=A0+33 - (0)9 53 10 27 44
Cell:=C2=A0 =C2=A0 =C2=A0 =C2=A0+33 - (0)6 85 62 59 98
Fax :=C2=A0 =C2=A0 =C2=A0 =C2=A0+33 - (0)9 58 10 27 44

Fax (D):=C2=A0 =C2=A0 +49 - (0)3 21 21 25 22 44

email:=C2=A0 =C2=A0 =C2=A0 Rainer@krugs.= de

Skype:=C2=A0 =C2=A0 =C2=A0 RMkrug

PGP: 0x0F52F982

--001a11c1e3b6aaacbe05172186e3--