From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: :session question Date: Wed, 27 Mar 2013 09:47:15 -0600 Message-ID: <877gks26bg.fsf@gmail.com> 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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKsZP-00084t-FW for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 11:47:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKsZN-0007tQ-Cv for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 11:47:23 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:57624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKsZN-0007tJ-5u for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 11:47:21 -0400 Received: by mail-pb0-f45.google.com with SMTP id ro8so5332116pbb.18 for ; Wed, 27 Mar 2013 08:47:20 -0700 (PDT) In-Reply-To: <871ub1m0mm.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Wed, 27 Mar 2013 14:29:53 +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: Andreas Leha Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=example.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: : 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 --=-=-= Content-Type: text/plain Best, > > Regards, > Andreas > > -- Eric Schulte http://cs.unm.edu/~eschulte --=-=-=--