From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: :session question Date: Wed, 27 Mar 2013 21:20:22 +0100 Message-ID: <87wqsslhmh.fsf@med.uni-goettingen.de> References: <51501AF2.1070405@easy-emacs.de> <8738vjugwd.fsf@gmail.com> <51516699.6090604@gmail.com> <87ip4ezf93.fsf@med.uni-goettingen.de> <87fvzi72ve.fsf@gmail.com> <87ip4e5gai.fsf@gmail.com> <5152B34E.4020004@easy-emacs.de> <87fvzhmbul.fsf@med.uni-goettingen.de> <5152D9F8.3040404@easy-emacs.de> <10996.1364384905@alphaville> <5152E38A.4050602@easy-emacs.de> <87hajx109o.fsf@gmail.com> <871ub1m0mm.fsf@med.uni-goettingen.de> <877gks26bg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKwq3-0005ag-Gh for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 16:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKwq1-0007Uw-7f for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 16:20:51 -0400 Received: from plane.gmane.org ([80.91.229.3]:39250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKwq0-0007UR-Ku for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 16:20:49 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UKwqK-0007SV-4M for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 21:21:08 +0100 Received: from vpn-2027.gwdg.de ([134.76.2.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Mar 2013 21:21:08 +0100 Received: from andreas.leha by vpn-2027.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Mar 2013 21:21:08 +0100 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: emacs-orgmode@gnu.org Hi Eric, Eric Schulte writes: > Andreas Leha writes: > >> Hi Eric, >> >> [...] >> >>> As a side note, if >>> one wants to set these R defaults for a single file the following syntax >>> at the top of the file will suffice. >>> >>> # -*- org-babel-default-header-args:R: ((:session . "foo")) -*- >>> >> >> That does not work for me. (I am on GNU Emacs 24.3.50.1, org-mode >> version 8.0-pre (release_8.0-pre-97-gffdd9e)) >> > > That's weird, it works perfectly for me. I'm using the same version of > Emacs, but an earlier version of Org-mode. > > Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/) > >> >> When I open an org-file containing that line, I get >> ,---- >> | Malformed mode-line >> `---- >> and have to answer >> ,---- >> | The local variables list contains values that may not be safe(*). >> | >> | (*) org-babel-default-header-args : R: >> | >> | Please type y, n, or !: y >> `---- >> >> When I accept and try to actually evaluate R-code, I get >> ,---- >> | Wrong type argument: sequencep, R: | >> `---- >> >> >> What am I missing? >> > > I'm not sure. For some reason Emacs thinks the variable ends at the ":" > in the variable name. I'm attaching the complete example file I've used > locally, please retry with that and see if the problem persists. > > # -*- org-babel-default-header-args:R: ((:session . "foo")) -*- > #+Title: Example > #+Author: Eric Schulte > > For more information on file local variables see [[info:elisp#File%20Local%20Variables][info:elisp#File Local > Variables]]. > > Because there is a default :session values assigned locally for R > blocks we have the following. > > #+begin_src R > x <- 1 > x > #+end_src > > #+RESULTS: > : 1 > > #+begin_src R > x > #+end_src > > #+RESULTS: > : 1 > > But non-R code blocks do not have a default session value. > > #+begin_src sh > date > #+end_src > > #+RESULTS: > : Wed Mar 27 09:45:47 MDT 2013 > > Thanks for your answer! I tested with your file. I only get the 'Malformed mode-line'. (The questions about unsave variables was my mistake.) But the session 'foo' is still not started, but the code blocks are evaluated as if there was no session specified: #+begin_org # -*- org-babel-default-header-args:R: ((:session . "foo")) -*- #+Title: Example #+Author: Eric Schulte For more information on file local variables see [[info:elisp#File%20Local%20Variables][info:elisp#File Local Variables]]. Because there is a default :session values assigned locally for R blocks we have the following. #+begin_src R x <- 1 x #+end_src #+RESULTS: : 1 #+begin_src R x #+end_src #+RESULTS: But non-R code blocks do not have a default session value. #+begin_src sh date #+end_src #+RESULTS: : Mi 27. Mär 21:18:49 CET 2013 #+end_org Is that just not working for me? And any ideas, what I could do about it? Regards, Andreas