[Top][All Lists]

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

[O] Header Arguments of Code Blocks - problems and challenges

From: Rainer M Krug
Subject: [O] Header Arguments of Code Blocks - problems and challenges
Date: Fri, 26 Sep 2014 10:20:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin)


Based on several previous posts, it seems that the use of header
arguments, particularly

- different ways of setting these (from the manual)
|  - System-wide header arguments::  Set global default values
|  - Language-specific header arguments::  Set default values by language
|  - Header arguments in Org mode properties::  Set default values for a buffer 
or heading
|  - Language-specific header arguments in Org mode properties::  Set 
language-specific default values for a buffer or heading
|  - Code block specific header arguments::  The most common way to set values
|  - Header arguments in function calls::  The most specific level
- Inheritance of these
- how they interact

I now these as a problem of R, but I guess it is general for all
languages suported in org?

To make the usage of these header arguments easier, a proper outline
and description is needed how header arguments for source blocks can
be set and how these interact (inheritance, header-args versus
header-args+ at one and on different levels, different ways of setting
header arguments as above, ...). These header arguments are a *very*
powerful tool and you can do many things - but you can also break
things very easily.

In many cases, I resort to trial and error: 
- this is working, 
- now I want to have that behaviour for this code block, 
- normally I would do it like this, 
- not working,
- let's try out what is working,
- repeat from the beginning for the next change

But this is far from ideal and leads to spaghetti-code type property
setting which is quite fragile.

I don't think is it only me who has these problems.

So what could be done to remedy this?  I think a few aspects should be
tackeled (in no particular order):

1) a lot of information is in the manual - but spread out in many
   different locations / sections. The first would be to bring these
   sections together and to consolidate them into one section. I don't
   think this should go only into worg.
2) A set of simple and easily to understand examples which build on
   each other are needed. So starting with simple examples and expand
   these to complex examples.
3) These examples should be uaed as tests (maybe there are tests for
   this, but I am not at all familiar with the test framework of org).
4) based on these, the org code should be checked for
   - bugs (obviously)
   - inconsistencies in the approach used for header argument setting
     and inheritance and
   - possibly sugfgest to deprecate certain aspects to simplify it
     (but keep the flexibility which is there at the moment!
5) the property inheritance and hierarchy of different ways of setting
   these should be documented in a structured way. 

To make this happen, I would suggest to get a discussion going to

1) get a few interested users who are willing to activly participate
   in this (There is alread one: Thanks Grant!)
2) discuss how this can be tackled
3) and then, from there, get it going.

Before I end, I must thank the org developers for their hard work they
have put into org - and I am sure that the header arguments framework
has received quite a bit of attention. But (and please correct me if I
am wrong), there is a relatively small overlap between main org
developers and regular org babel users.

And this is where the babel user can contributing to org, even if
their elisp knowledge is not the best.

OK - I hope we can geth this going and make a usefull contribution to
org babel,


Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

Attachment: pgplf125vcuX_.pgp
Description: PGP signature

reply via email to

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