emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rainer M Krug <r.m.krug@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>, Achim Gratz <Stromeko@Nexgo.DE>
Cc: emacs-orgmode@gnu.org
Subject: Re: :session question - header argument setting
Date: Wed, 27 Mar 2013 09:01:57 +0100	[thread overview]
Message-ID: <5152A775.90000@gmail.com> (raw)
In-Reply-To: <87ip4e5gai.fsf@gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 26/03/13 16:31, Eric Schulte wrote:
> Achim Gratz <Stromeko@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:      Rainer@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-----

  reply	other threads:[~2013-03-27  8:02 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  9:37 :session question Andreas Röhler
2013-03-25 23:58 ` Michael Gauland
2013-03-26  0:46   ` Eric Schulte
2013-03-26  8:37     ` Andreas Röhler
2013-03-26  9:12     ` Rainer M Krug
2013-03-26  9:23       ` Andreas Leha
2013-03-26 12:37         ` Eric Schulte
2013-03-26 12:44           ` Andreas Leha
2013-03-26 12:55           ` Achim Gratz
2013-03-26 15:31             ` Eric Schulte
2013-03-27  8:01               ` Rainer M Krug [this message]
2013-03-27  8:35                 ` :session question - header argument setting Sebastien Vauban
2013-03-27  8:52               ` :session question Andreas Röhler
2013-03-27  9:27                 ` Andreas Leha
2013-03-27 11:37                   ` Andreas Röhler
2013-03-27 11:48                     ` Nick Dokos
2013-03-27 12:18                       ` Andreas Röhler
2013-03-27 12:22                         ` Rainer M Krug
2013-03-27 12:47                           ` Andreas Röhler
2013-03-27 12:43                         ` Eric Schulte
2013-03-27 13:26                           ` Andreas Röhler
2013-03-27 13:29                           ` Andreas Leha
2013-03-27 15:47                             ` Eric Schulte
2013-03-27 20:20                               ` Andreas Leha
2013-03-27 20:35                                 ` Eric Schulte
2013-03-28 10:25                                   ` Andreas Leha
2013-03-28 13:06                                     ` John Hendy
2013-03-28 19:35                                       ` :session question - a simple PATCH Andreas Leha
2013-03-29  9:59                                         ` Achim Gratz
2013-03-29 14:38                                           ` Eric Schulte
2013-03-28 13:22                                   ` :session question John Hendy
2013-03-27 20:59                                 ` Andreas Röhler
2013-03-27 11:19               ` Andreas Leha
2013-04-28 15:46               ` Achim Gratz
2013-05-01 17:18                 ` Eric Schulte
2013-05-01 17:36                   ` Achim Gratz
2013-05-09 18:52                   ` Achim Gratz
2013-06-07 16:15                     ` Achim Gratz
2013-06-07 19:07                       ` :session question -- and changes to #+Property: syntax Eric Schulte
2013-06-07 19:49                         ` Achim Gratz
2013-06-07 20:22                           ` Andreas Leha
2013-06-10  8:16                             ` Rainer M Krug
2013-06-08  7:47                         ` Achim Gratz
2013-06-08 18:08                           ` Eric Schulte
2013-06-08 20:48                             ` Achim Gratz
2013-06-10  8:21                               ` Rainer M Krug
2013-06-10 19:16                                 ` Achim Gratz
2013-06-18 20:41                         ` Achim Gratz
2013-06-19 10:10                           ` Michael Brand
2013-06-20 16:27                           ` Eric Schulte
2013-06-20 17:47                             ` Achim Gratz
2013-06-20 18:31                               ` Eric Schulte
2013-06-20 19:14                                 ` Achim Gratz
2013-06-20 19:28                                   ` Eric Schulte
2013-06-23 17:50                                   ` Achim Gratz
2013-06-25 14:20                                     ` Eric Schulte
2013-06-25 18:28                                       ` Achim Gratz
2013-06-10  8:14                       ` :session question Rainer M Krug
2013-06-10  8:12                   ` Rainer M Krug
2013-03-27  8:26           ` Andreas Röhler
2013-03-26  6:41   ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5152A775.90000@gmail.com \
    --to=r.m.krug@gmail.com \
    --cc=Rainer@krugs.de \
    --cc=Stromeko@Nexgo.DE \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).