Updated notes on implementation of library functions.
This commit is contained in:
parent
b300b62b9c
commit
f1ba541bf3
|
@ -3,7 +3,12 @@
|
|||
#+OPTIONS: H:3 num:nil toc:t
|
||||
#+STARTUP: odd hideblocks
|
||||
|
||||
[[http://downlode.org/Etext/library_of_babel.html][Full text of Borges short story]]
|
||||
(setq lob (org-babel-lob-parse-buffer))
|
||||
(setq x (gethash 'plot lob))
|
||||
(hash-table-count lob)
|
||||
(maphash (lambda (key val) (insert key)) lob)
|
||||
|
||||
[[http://downlode.org/Etext/library_of_babel.html][Full text of the Borges short story]]
|
||||
|
||||
* Plotting code
|
||||
Plot column 2 (y axis) against column 1 (x axis). Columns 3 and beyond, if present, are ignored.
|
||||
|
|
|
@ -116,6 +116,12 @@ and the results to be collected in the same table.
|
|||
|
||||
* Tasks [22/41]
|
||||
** TODO add a function to jump to a source-block by name
|
||||
I've had an initial stab at that in org-babel-find-named-block
|
||||
(library-of-babel branch).
|
||||
|
||||
At the same time I introduced org-babel-named-src-block-regexp, to
|
||||
match src-blocks with srcname.
|
||||
|
||||
** TODO Create objects in top level (global) environment [3/5]
|
||||
*sessions*
|
||||
|
||||
|
@ -882,11 +888,11 @@ msg + " y python"
|
|||
one that comes to mind is the ability to treat a source-code block
|
||||
like a function which accepts arguments and returns results. Actually
|
||||
this can be it's own TODO (see [[* source blocks as functions][source blocks as functions]]).
|
||||
*** Objectives
|
||||
*** Objectives [Dan]
|
||||
- We want to provide convenient off-the-shelf actions
|
||||
(e.g. plotting data) that make use of our new code evaluation
|
||||
environment but do not require any actual coding.
|
||||
*** Design proposal
|
||||
*** Initial Design proposal [Dan]
|
||||
- *Input data* will be specified using the same mechanism as :var
|
||||
references, thus the input data may come from a table, or
|
||||
another source block, and it is initially available as an elisp
|
||||
|
@ -909,6 +915,21 @@ msg + " y python"
|
|||
be executed with the :data referent passed in using a :var arg.
|
||||
- :showcode or something controlling whether to show the code
|
||||
|
||||
*** Modification to design
|
||||
I'm implementing this, at least initially, as a new interpreter
|
||||
named 'babel', which has an empty body. 'babel' blocks take
|
||||
a :srcname header arg, and look for the source-code block with
|
||||
that name. They then execute the referenced block, after first
|
||||
appending their own header args on to the target block's header
|
||||
args.
|
||||
|
||||
If the target block is in the library of babel (a.o.t. e.g. the
|
||||
current buffer), then the code in the block will refer to the
|
||||
input data with a name dictated by convention (e.g. __data__
|
||||
(something which is syntactically legal in all languages...). Thus
|
||||
the babel block will use a :var __data__ = whatever header arg to
|
||||
reference the data to be plotted.
|
||||
|
||||
** TODO share org-babel
|
||||
how should we share org-babel?
|
||||
|
||||
|
|
Loading…
Reference in New Issue