0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-19 20:09:54 +00:00
Commit graph

13 commits

Author SHA1 Message Date
Dan Davison af6af0b848 Tightening up org-babel-lob-one-liner-regexp. 2009-07-10 23:15:16 -04:00
Dan Davison 44adc98505 Enabling LoB to put results in buffer, and slowly moving towards more
unified concept of function calls.

Previously LoB calls were not able to produce results in the
buffer. These changes go some way to allowing them to do that. [There
are still some bugs to deal with]. That meant changing org-babel.el so
that there is a notion of the `source block name' for a LoB line, in
order to construct a #+resname (currently I've made the name the same
as the function call).

I'm also slowly moving towards unifying the notion of `function calls'
a bit more: I've changed the org-babel-lob-one-liner-regexp so that
instead of a monolithic match it now matches first the function name,
and second the function arguments in
parentheses. org-babel-lob-get-info makes that match, and although it
still concatenates them and returns the string, the two elements can
be accessed immediately afterwards using match-string. So that
situation is very similar to org-babel-get-src-block-name, whose
job (in this branch) is also to parse the function *name* and the
function *arguments*. In a few places in the code (esp. function
names), I think the word `info' should be replaced with `call' or
`function call', which I believe more accurately indicates what the
`info' is: a function definition, together with bound
arguments/references.

The function call syntax, i.e. function-name(arg1=ref1), originally
introduced for references (and thereby in LoB), and which I'm
proposing we use throughout, raises the question of default arguments,
and those being over-ridden by supplied arguments, as in e.g. python,
and R.
2009-07-10 22:59:10 -04:00
Eric Schulte 3920102905 Library of Babel should only try to ingest named source blocks 2009-06-15 12:54:29 -07:00
Eric Schulte d72b438f5e Library of Babel source blocks are now available from any org-mode file 2009-06-14 15:01:55 -07:00
Eric Schulte f1302d1cca implemented *much* simpler lob one-liner syntax 2009-06-14 14:18:58 -07:00
Eric Schulte fb2dcaf58a implemented infrastructure for loading source-blocks from files 2009-06-14 14:10:04 -07:00
Eric Schulte 82e9587c72 added alternate single-line syntax for Library of Babel evaluation 2009-06-14 07:54:55 -07:00
Dan Davison 04be81dfe4 Cleaner implementation of org-babel-execute:babel.
It now searches for a srcname first in the current buffer, and then in
the lob.
2009-06-14 01:11:04 -04:00
Dan Davison 81ee8944ae Correcting errors in previously untested code. 2009-06-13 22:48:44 -04:00
Dan Davison b300b62b9c OK, I'm getting confused in magit and committing only a single hunk
when I intended several. Hence, the commit note for this commit is the
commit note filed with the previous commit: da82dae939
2009-06-13 18:51:23 -04:00
Dan Davison 90094f9b7c Started again with lob implementation.
I'm now proposing to implement it, at least temporarily, as a
degenerate source block (has no body), with interpreter name
'babel'. These 'babel' blocks will use a :srcname header arg to refer
to the source code block that they will use for their body. This
source code block might be in the 'library of babel'. If so it will
use a conventional variable name for its 'main data argument' such as
__data__. Then the babel block (not to be confused with a code block
in the lob) would use :var __data__=ref, where ref is a resource
reference resolved as usual.
2009-06-12 23:45:14 -04:00
Dan Davison f5684b7deb Still getting started with lob.
I plan to get rid of much of this and just implement it as a new
language with a degenerate source block for now (i.e. no body).
2009-06-12 23:02:19 -04:00
Dan Davison 68c3fb2b52 Starting to create `library of babel' branch.
This is intended to provide off-the-shelf data plotting and analysis
functions. Current idea is to introduce a new line, perhaps something
like #+babel or #+babel_lib, which will reference (a) some data
and (b) a source block to apply to the data. Code being stolen from
org-babel.el (conceivably some abstraction of some of those functions
could be done to avoid code duplication).
2009-06-12 20:26:28 -04:00