-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 26/03/13 16:31, Eric Schulte wrote: > Achim Gratz <strom...@nexgo.de> 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
OK - that I see how this works. Although I would very much like to have a syntax to define this default language header as #+PROPERTY as it would be more consistent. But I remember there was a way of executing this code when opening but I can't find it anymore. > > #+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. >> I think that would be a very important and useful aspect to include. > > If you can think of a clean way to implement this then we should go for Just an idea: if one would add a second value to the :session argument, one could use that one th specify the language for the session. If none is given, it would apply to all languages (so nothing changes), but if one is given, it would only apply to this language: #+PROPERTY: :session R-test R #+PROPERTY: :session none would set the language specific header :session to R-test, and the "old" session argument to "none", > it. I doubt many existing configurations rely on this behavior. If implemented as above, the default behavior would not be changed, so no changes need to be done by the user. In addition, this could be extended to other language specific headers (the only problem could be header arguments which take anyway multiple arguments, like :results). Cheers, Rainer > >> >>> 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, > - -- 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: rai...@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRUqd0AAoJENvXNx4PUvmC/HAIAJhoWFi8/D84V0FKNw1Y7TOW /7BXZHB8sDZENdO+35lqjJuKEKECcjSiwQOpa8KPffI4QYIJlsQzEbMSbTgl2+3H CaVARcnuj1hil0J7+EjTfWewbulCMSIDr9GsVpwMVKxl5VxY52/SRtOXyl7Ci2Td yAKDaPshq6kV15FdRF8MF30XxoEt+IH4p/u6m71Iq8poI8E8rqWhPufgeOdvhuNR q6yz57L0FG2kww//Mv3VByDvTf94+gbcMMtZ8qbrl+z3Mk+6I9WYTb6lzl3qP6je zW58K7rzorl8ZbbNe7GCmv0OOrEXXkkwHI5Ji00Jb+JMyBOrxe1r8cssHkFUbTo= =uNE3 -----END PGP SIGNATURE-----