emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] :session question


From: Eric Schulte
Subject: Re: [O] :session question
Date: Tue, 26 Mar 2013 09:31:00 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Achim Gratz <address@hidden> writes:

> Am 26.03.2013 13:37, schrieb Eric Schulte:
>> This can be done system wide by setting the language-specific header
>> arguments.
>
> I've yet to see an example on how to do this.
>

    #+begin_src emacs-lisp
      (setq org-babel-default-header-args:R
            '((:session . "org-R")))
    #+end_src

    #+RESULTS:
    | (:session . org-R) |

    #+begin_src R
    x <- 1
    x
    #+end_src

    #+RESULTS:
    : 1

    #+begin_src R
    x
    #+end_src

    #+RESULTS:
    : 1

>
>>  This can also be done file-wide through the use of file
>> local variables (instead of the property line above).
>
> Still, language specific properties should exists.
>

If you mean that there should be new syntax for setting header arguments
on a file or sub-tree basis w/o using file local variables, I'd be happy
to apply a patch.

>
> But importantly, there should be no way to set a default session name
> without also specifying the language, regardless of which way one
> tries to set this up.
>

If you can think of a clean way to implement this then we should go for
it.  I doubt many existing configurations rely on this behavior.

>
>> Please read through the header argument documentation to see the many
>> different ways in which header arguments may be set.
>>
>> http://orgmode.org/manual/Using-header-arguments.html
>
> This sends you off to Worg (which tries to send you back to where you
> came from),

Clearly this portion of the manual should be improved.

> where you'll learn that there are no language specific header
> arguments for R and no further documentation on how to set defaults
> specific to R can easily be found (if it exists).
>

Every language can specify default header arguments through setting a
defvar.  The syntax is `org-babel-default-header-args:lang'.  This
should not be hard to find through apropos, simple tab completion or
searching the archives of this mailing list.  However I agree the manual
should be improved wrt this topic.

Best,

>
>
> Regards,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



reply via email to

[Prev in Thread] Current Thread [Next in Thread]