Commit graph

311 commits

Author SHA1 Message Date
Dan Davison 4f15280631 Bugfix: not assuming that we're in a source block when inserting result.
The o-b-insert-result code was assuming that we were in a source
block, where it could find the head, etc. However there are two
situations when this is not true LoB calls (although they can't output
results to buffer in this branch, they can in branch 'results'), and
org-babel-exp (which calls o-b-insert-result in an empty temp buffer).
2009-07-17 00:18:03 -04:00
Dan Davison 64a5c0e379 Merging master into results: required manual conflict resolution.
results had upgraded to using org-babel-merge-params (although
apparently not yet in org-babel-parse-inline-src-block-match).
2009-07-16 23:22:25 -04:00
Eric Schulte cdc46b8b74 added ability for languages to change their default header argument values 2009-07-16 18:52:31 -06:00
Eric Schulte 37d5edbad9 fleshing out the gnuplot task 2009-07-16 18:35:22 -06:00
Eric Schulte 5527d419a1 added support for ditaa source blocks 2009-07-16 18:23:19 -06:00
Eric Schulte 29d910c5e2 "file" results now correctly insert a file link 2009-07-16 18:17:51 -06:00
Eric Schulte b932d2ed76 ditaa evaluation is working (but still requires some more peripheral support) 2009-07-16 18:12:11 -06:00
Dan Davison 4fa9c162d9 More code streamlining: org-babel-execute:emacs-lisp. 2009-07-16 16:23:49 -04:00
Dan Davison d128662fa3 Eliminating duplicated code (take 2...).
This proposal for code tidying uses multiple-value-bind to satisfy:

1. The various parsed/resolved components of the param list (session,
   vars, result-type) are available in the org-babel-execute:LANG
   functions.
2. Those functions don't duplicate the code for parsing the params
   list and resolving references
3. The functions still have the params list available to them, should
   they need to implement language-specific behaviour using it.

If the org-babel-execute:LANG functions need to be called directly,
then that would now have to be via
(multiple-value-bind (session vars result-params result-type)
      (org-babel-process-params params) (funcall cmd body params))

as in org-babel-exp.el. (But is it actually necessary to by-pass
org-babel-execute-src-block?)
2009-07-16 16:21:07 -04:00
Dan Davison f74b084d99 Bringing org-babel-execute-[buffer/subtree] functions up-to-date. 2009-07-16 14:57:01 -04:00
Dan Davison c6b628d3ad Make org-babel-tangle comment with ;;*.
With a view to providing org-style folding with the outline-regexp
settings from Tassilo Horn / Michael Zeller / Sebastain Vauban.
2009-07-16 11:25:57 -04:00
Dan Davison 690ed664c6 Merging master into results.
In order to get new tangle load-file function. Had to resolve org-babel.org conflict manually and didn't know the 'proper' way to do so, so there may be weirdness in that file.
2009-07-16 01:28:15 -04:00
Dan Davison 2b273bce7d Different messages for :results output and value modes. 2009-07-16 01:16:49 -04:00
Eric Schulte f3050c17d6 removed debug statement 2009-07-15 17:52:28 -07:00
Dan Davison ad57e15afe Bugfix in org-babel-read (relevant to all branches).
I haven't managed to see why this is a 2. It breaks if cell is a
string of length 1. I'm changing it to a 1 (as it is in
org-collector.el), on the assumption that the 2 was erroneous.
2009-07-15 11:18:19 -04:00
Eric Schulte d37d148d3f DONE singe-function tangling and loading elisp from literate org-mode file [3/3] 2009-07-14 21:55:50 -07:00
Eric Schulte cdd73500d6 DONE ensure that org-babel-tangle returns the path to the tangled file(s) 2009-07-14 21:52:27 -07:00
Eric Schulte 07c919cb31 fleshing out actual loading of tangled files 2009-07-14 21:52:10 -07:00
Eric Schulte c3166dc093 now able to tangle files by language 2009-07-14 21:52:07 -07:00
Eric Schulte 8694253c9f getting started on automatic loading of elisp from org-mode files 2009-07-14 20:21:08 -07:00
Dan Davison c1f8de5eec Cosmetic changes only: shortening lines to fit my screen. 2009-07-11 23:59:04 -04:00
Dan Davison 08eba0ceea Bugfix: my regexp was not allowing whitespace inside function call. 2009-07-11 23:51:01 -04:00
Dan Davison a0e0fe17f4 A neutral bug (unnecessary, but no consequences I believe). 2009-07-11 23:49:51 -04:00
Dan Davison 21d058869d Bugfix in org-babel-read (relevant to all branches).
I haven't managed to see why this is a 2. It breaks if cell is a
string of length 1. I'm changing it to a 1 (as it is in
org-collector.el), on the assumption that the 2 was erroneous.
2009-07-11 22:45:57 -04:00
Dan Davison cd4c794af6 Bugfix: Use let* instead of let 2009-07-11 13:39:05 -04:00
Dan Davison f622d8d288 Bugfix: In org-babel-merge-params.
Using symbol instead of string so that assq-delete-all works. This
will break if a variable has a name that is not a valid elisp symbol
-- unlikely? Possible? Also, fixing the argument parsing regexp, which
had been very lazily written.
2009-07-11 03:07:37 -04:00
Dan Davison ee749f4d70 Bugfix:
I had made org-babel-get-src-block-name automatically check whether it
was on a lob line. I'm reverting that.
2009-07-11 03:04:41 -04:00
Dan Davison 0a6fa24cc5 bugfix: org-babel-parse-header-arguments was creating nonsense when passed an empty string. 2009-07-11 03:01:54 -04:00
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
Dan Davison 42fe3144b7 Some more bugs / TODOs, and some unimportant changes. 2009-07-10 21:13:21 -04:00
Dan Davison eb7206f744 Fixing function call-style source block arguments.
style syntax. There still needs to be work done on the regexps for
recognising #+srcname lines possibly with/without parenthesised
arguments. This change makes org-babel-block-name return nil rather
than fail when it doesn't find a src block head (e.g. in a #+lob
line), which seems sensible.

The sbe test table is failing half-way down at `simple ruby
arrays'. For some reason it is making a mini table ("| |") to the
right hand, and point keeps jumping out of the table. My ability to
debug sbe-related stuff is hampered by me not understanding the
code (I need to learn about macros).
2009-07-10 18:38:12 -04:00
Dan Davison 41381781bb Using function call() style source block arguments.
This is a rough, first-pass implementation using some code from
org-babel-ref.el. If we do go with this idea, I think we can find a
better implementation, hopefully using the same code for parsing
`function calls' (parameterised source block calls), whether they are
made directly at a source block, or as a reference in another function
call, or as a LoB call.
2009-07-10 01:35:15 -04:00
Dan Davison c1b72bfba8 Trivial typo fixing 2009-07-10 01:20:56 -04:00
Dan Davison 2bddc5fdf8 Revert "Moving non-language specific code out of language-specific files."
This reverts commit 0f541a680d.

See commit note for parent commit. Both reversions made for same reason.
2009-07-08 00:13:07 -04:00
Dan Davison 9772adef3e Revert "Altering org-babel-execute:emacs-lisp in accordance with preceding changes."
This reverts commit d8001facab.

Going back to original plan of simply passing (cmd body params) to the org-babel-execute:LANG functions.

The benefit of this is that languages will have access to the full params list. A downside is that code parsing the
params list and referencing variables is currently duplicated across the languages, so perhaps we can aim to reduce
that code duplication at some point.
2009-07-08 00:06:14 -04:00
Dan Davison 5cbc2d3803 Using the new org-babel-merge-params function to combine default args with header args provided. 2009-07-07 23:57:49 -04:00
Dan Davison 7e80d01571 Now we have a function for merging params lists, so in theory this reversion can be reverted.
Revert "Revert "making :results replace the default""

This reverts commit dc702a3152.
2009-07-07 19:48:19 -04:00
Dan Davison 9d79afb3b3 Merge branch 'working-on-combining-params' into results 2009-07-07 19:46:10 -04:00
Dan Davison 5280e5ea4f Attempt at a working version of the org-babel-merge-params function. 2009-07-07 19:44:27 -04:00
Dan Davison d8001facab Altering org-babel-execute:emacs-lisp in accordance with preceding changes. 2009-07-05 23:09:28 -04:00
Dan Davison 0f541a680d Moving non-language specific code out of language-specific files.
Moved reference resolution out of language-specific files; changed
things so that we parse the header args list in org-babel.el, and
changed the argument list of the org-babel-execute:LANG functions
accordingly. In addition to hopefully resulting in easier maintenance,
this results in more streamlined org-babel-execute:LANG functions, and
hence less work to do when adding interpreters.
2009-07-05 22:36:51 -04:00
Dan Davison 6143bb7aad Streamlining/fiddling with org-babel-execute-src-block.
This includes an explicit implementation of the idea that no result is
returned in the case of :results output.
2009-07-05 21:57:42 -04:00
Dan Davison f7ea8ccb2e Added comment to org-babel-process-result explaining
results-processing changes and state they are currently in. Here's the
comment:

  You can see below the various fragments of results-processing
  code that were present in the language-specific files. Out of
  those fragments, I've moved the
  org-babel-python-table-or-results and
  org-babel-import-elisp-from-file functionality into the
  org-babel-*-evaluate functions. I think those should only be
  used in the :results value case, as in the 'output case we are
  not concerned with creating elisp versions of results.

  The rest of the functionality below, concerned with vectorising
  or scalarising results is commented out, has not yet been
  replaced, and may need to be reinstated in this function
2009-07-05 21:37:00 -04:00
Dan Davison dc702a3152 Revert "making :results replace the default"
This reverts commit a13cbf64b6.

I'm in favour of this change, but it seems that we need a more sophisticated way of combining plists before we can
change the default header args in this way. Otherwise, we get two entries for :results (one from the defaults and one
from the header args), whereas what we want is a single entry for :results with space-separated values.
2009-07-05 21:23:47 -04:00
Dan Davison df3b1b7223 Fixing results processing code.
When :results is 'value, the org-babel-LANG-evaluate functions are
responsible for returning an elisp representation of the *value* of
the block. This stage is maintained in the language-specific code
because different languages have different ways of doing it: python
and ruby use org-babel-LANG-table-or-string, whereas R and shell write
to file and then use org-babel-import-elisp-from-file. It could
however be put in the org-babel-execute:LANG function.
2009-07-05 21:23:17 -04:00
Dan Davison 9750226de7 Ruby version of previous commit.
Bug fix: I was missing out org-babel-table-or-string with external
    process evaluation (non-session).

    Also, I have renamed org-babel-ruby-table-or-results to org-babel-ruby-table-or-string.

    (the previous commit's message should have read org-babel-python-table-or-results...)
2009-07-05 19:59:24 -04:00
Dan Davison e45cf15b06 Bug fix: I was missing out org-babel-table-or-string with external
process evaluation (non-session).

Also, I have renamed org-babel-table-or-results to org-babel-table-or-string.
2009-07-05 19:55:54 -04:00
Dan Davison 305c90b892 First stage of results code simplification.
Results processing code has been moved out of language-specific
files (which all contained similar versions of essentially the same
code) and into the central org-babel.el. This commit maintains the
removed language-specific fragments commented out in org-babel.el. It
does not make an attempt to replace their functionality (the new
function org-babel-process-result currently does nothing).

Similarly, I intend to move the reference resolution code out of
language-specific files.
2009-07-05 19:23:32 -04:00
Dan Davison 07b69e8646 Removing results processing code from org-babel-R.el.
And removing default results-type case (results-type must always be
either output or value)
2009-07-05 19:19:14 -04:00
Dan Davison a285289603 Simplifying ruby results code.
Moving org-babel-ruby-table-or-results into the :results value branch of org-babel-evaluate-ruby
2009-07-05 19:17:47 -04:00
Dan Davison 500285da97 Removing results processing code from org-babel-ruby.el. 2009-07-05 19:16:44 -04:00
Dan Davison 93a964d236 Simplifying python results code.
Move org-babel-python-table-or-results into the :results value branch
of org-babel-python-evaluate, and get rid of default case (result-type
must always be either output or value). I wonder if the org-babel-trim
s are necessary: they don't seem to be needed in the code for ruby.
2009-07-05 19:16:08 -04:00
Dan Davison f4eaee5b46 Trivial cosmetic: shortening lines to fit screen 2009-07-05 19:12:06 -04:00
Dan Davison 337f77c10c Removing results processing from org-babel-python.el 2009-07-05 19:11:40 -04:00
Dan Davison afdf02b910 Removing results processing from org-babel-sh.el 2009-07-05 19:10:45 -04:00
Dan Davison 2fb922aaa7 Trivial cosmetic: shortening a line to make it fit on screen 2009-07-05 16:08:07 -04:00
Dan Davison a06c910f37 cosmetic: removing commented debugging code; shortening some lines 2009-07-05 15:52:41 -04:00
Dan Davison 3c932ad603 removing mention of 'babel' as a supported interpreter 2009-07-05 13:53:52 -04:00
Dan Davison 6087aa7c31 Making some lines shorter and other trivial cosmetics 2009-07-05 13:52:21 -04:00
Dan Davison a13cbf64b6 making :results replace the default 2009-07-05 13:50:25 -04:00
Dan Davison adcfa3c54b Some todos/bug notes in org-babel.org 2009-06-30 20:46:51 -04:00
Eric Schulte 74b9c8f125 slight simplification 2009-06-27 17:26:07 -07:00
Eric Schulte 978104f1ae broke tangled source block collection out into it's own function 2009-06-27 17:25:01 -07:00
Eric Schulte 87e07ee66d added completion message to `org-babel-tangle' 2009-06-27 13:36:51 -07:00
Eric Schulte e9c2c6a590 removing debugging statements from org-babel-tangle.el, and beefing up test-tangle.org 2009-06-27 13:24:49 -07:00
Eric Schulte 6518065f28 now working with multiple source-blocks 2009-06-27 13:13:37 -07:00
Eric Schulte 5621c105bf removed org-babel-alist-pop 2009-06-27 13:12:30 -07:00
Eric Schulte 50abb08479 misc tweaks 2009-06-27 12:44:12 -07:00
Eric Schulte 760e811c8c org-babel-alist-pop now actually does modify alist 2009-06-27 12:44:05 -07:00
Eric Schulte 0d3952ecf6 inserting links in a comment before source-code blocks 2009-06-27 11:58:13 -07:00
Eric Schulte e05ddae2f7 now requiring cl 2009-06-27 11:58:00 -07:00
Eric Schulte fba47f3651 now able to generate source files (not really tested or complete) 2009-06-26 12:12:23 -07:00
Eric Schulte c09041b785 more fleshing out of writing to file 2009-06-26 11:43:50 -07:00
Eric Schulte e16c896c80 some more work on writing out to files 2009-06-26 10:25:31 -07:00
Eric Schulte 89f4d92829 Merge branch 'master' into tangle 2009-06-26 10:20:17 -07:00
Eric Schulte 2014a95767 now loading utility files before language-specific files 2009-06-26 10:10:29 -07:00
Eric Schulte fed7056833 stubbed out functions for inserting source-blocks into files 2009-06-25 20:17:21 -07:00
Eric Schulte d469181978 org-babel-tangle is collecting blocks by language->session 2009-06-25 20:12:12 -07:00
Eric Schulte 3ab7412410 started on implementation 2009-06-15 15:35:11 -07:00
Eric Schulte 1c1b40636a now using org-babel-tangle-langs to track file extensions and shebang lines 2009-06-15 15:25:46 -07:00
Eric Schulte dd7ba333a7 Library of Babel should only try to ingest named source blocks 2009-06-15 12:55:02 -07: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 9e5f634135 Merge branch 'master' into tangle 2009-06-15 12:53:00 -07:00
Eric Schulte c678059deb passing all tests 2009-06-15 12:47:10 -07:00
Eric Schulte a5f6423a76 Merge branch 'jumping-to-source-blocks' 2009-06-15 12:43:23 -07:00
Eric Schulte 793f5205e2 org-babel-goto-named-source-block is working 2009-06-15 12:43:15 -07:00
Eric Schulte aa5c9985bd fixed bug in ruby session evaluation 2009-06-15 12:30:36 -07:00
Eric Schulte a902b62c29 better parsing of argument headers 2009-06-15 12:26:58 -07:00
Eric Schulte 112c7d9236 fixed non-session variable assignment in R 2009-06-15 12:17:58 -07:00
Eric Schulte a44c98b376 cleaning up debugging messages in python 2009-06-15 12:14:02 -07:00
Eric Schulte 0cd60d5c5a removing message debugging statements 2009-06-15 11:49:35 -07:00
Eric Schulte 82ecab19fb R is working with no session 2009-06-15 11:49:06 -07:00
Eric Schulte e2d3cc7830 shell commands are working 2009-06-15 11:29:25 -07:00
Eric Schulte f2aaba8ca6 adding support for python with :session none 2009-06-15 11:14:32 -07:00
Eric Schulte 2fd494477b cleaned up ruby 2009-06-15 10:54:14 -07:00
Eric Schulte 00365e1fbe ruby can now be run with NO session 2009-06-15 10:13:48 -07:00
Eric Schulte ce1726713a expanding 2009-06-15 09:35:02 -07:00
Eric Schulte b60d873724 just getting started 2009-06-15 09:28:01 -07:00
Eric Schulte f7c002bcb7 partial 2009-06-15 09:22:36 -07:00
Eric Schulte e7591f5a14 removing the org-babel-named-src-block-regexp variable which is not used 2009-06-15 09:06:14 -07:00
Eric Schulte ec38cffff0 not yet working 2009-06-14 22:06:11 -07:00
Eric Schulte 08565fd5c7 Merge branch 'master' into tangle
Conflicts:
	lisp/org-babel-init.el
2009-06-14 18:58:25 -07:00
Eric Schulte 623831ddab added util directory, including newest inf-ruby.el, should fix ruby bug 2009-06-14 18:42:44 -07:00
Eric Schulte d71ee1116b adding shell of org-babel-tangle.el 2009-06-14 18:30:29 -07:00
Eric Schulte 8605c848bf Merge branch 'master' into library-of-babel
Conflicts:
	lisp/org-babel-ref.el
	org-babel.org
2009-06-14 15:24:41 -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 0866961436 Merge branch 'session' of git@github.com:eschulte/org-babel into session
Conflicts:
	lisp/langs/org-babel-sh.el
	org-babel.org
2009-06-14 12:16:17 -07:00
Eric Schulte 8360a676b9 passing all tests 2009-06-14 12:09:36 -07:00
Eric Schulte a85cadced8 *** DONE function to bring up inferior-process buffer [4/4] 2009-06-14 12:02:25 -07:00
Eric Schulte 4fd1abecc5 move lisp/langs/org-babel-shell.el to lisp/langs/org-babel-sh.el 2009-06-14 11:54:31 -07:00
Eric Schulte e962e83741 adding pop/prep session commands to org-babel-shell.el 2009-06-14 11:53:56 -07:00
Eric Schulte 88048186ac R know how to prep and pop-to sessions 2009-06-14 11:48:11 -07:00
Eric Schulte f2444e39e9 added some `sit-for' statements to make ruby inf session prep more reliable 2009-06-14 11:44:29 -07:00
Dan Davison 70cc6cb90f A couple of bug reports.
(1) Shell evaluation is broken by weird escape chars in prompt;
(2) ruby evaluation not working for me as run-ruby expects one argument on my system.

Also fixed a harmless copy-paste error and whitespace adjustment to shorten lines.
2009-06-14 14:38:15 -04:00
Eric Schulte 2212742c54 python can now pop-to-session 2009-06-14 11:34:06 -07:00
Eric Schulte d1bcb5e425 cleaned version of body is now added to kill ring 2009-06-14 11:10:09 -07:00
Eric Schulte 1b39a64fbe ruby blocks can now pop to session buffer (optionally evaluating header-args) 2009-06-14 11:08:12 -07:00
Eric Schulte 7d063efd28 removed debugging statement from org-babel.el 2009-06-14 10:27:29 -07:00
Eric Schulte 0019cc9c14 all tests seem to be passing 2009-06-14 10:23:44 -07:00
Eric Schulte ba2756447d correctly using the ARTIFICIAL flag with comint-send-input 2009-06-14 10:21:14 -07:00
Eric Schulte 3cd99d0c2f ** DONE defunct R sessions
turns out I just had to use inferior-ess-send-input instead of comint-send-input
2009-06-14 10:20:59 -07:00
Eric Schulte f31b3b2af2 fixed problem with new ruby sessions sometimes not initializing 2009-06-14 09:12:19 -07:00
Eric Schulte 0b75d89ccf fixed error parsing empty results from ruby 2009-06-14 08:41:52 -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 66b27cb951 Added get-all-src-block-infos, which creates a hash of the 'info' lists
for all source blocks in a buffer, keyed by srcname.
2009-06-14 01:08:27 -04:00
Dan Davison 81ee8944ae Correcting errors in previously untested code. 2009-06-13 22:48:44 -04:00
Eric Schulte 08f92aebe5 passing some session tests, but still failing some tests 2009-06-13 19:35:48 -07:00
Eric Schulte 391f677fc7 `org-babel-comint-with-output' is now robust to errors 2009-06-13 18:28:06 -07:00
Eric Schulte da08c26d33 applying org-babel-comint-with-output macro to org-babel-shell.el 2009-06-13 17:39:19 -07:00
Eric Schulte 7d1cbd43ea removing debugging statements from org-babel-ref.el 2009-06-13 17:35:39 -07:00
Eric Schulte cd5fb8460d slightly more graceful use of let* 2009-06-13 17:35:01 -07:00
Eric Schulte e39b5e848e applying org-babel-comint-with-output macro to org-babel-R.el 2009-06-13 17:34:51 -07:00
Eric Schulte f4a1193a6e now using org-babel-comint-with-output in org-babel-python.el 2009-06-13 17:30:02 -07:00
Eric Schulte 47810f8e14 references to #+resname lines are now working 2009-06-13 17:08:43 -07:00
Eric Schulte dd0392a4f2 extracted the "capture all output from comint session" behavior into a macro 2009-06-13 17:08:42 -07:00
Dan Davison b3afff4392 Merge branch 'session' into library-of-babel 2009-06-13 18:57:34 -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 da82dae939 Implementing library functions as a new (pseudo) interpreter called
'babel'. Added a speculative function which creates a hash table
containing parsed versions of all source blocks in a buffer -- I was
wondering whether we should 'load' the library-of-babel into memory in
this fashion, rather than searching for code blocks in buffers /
files.
2009-06-13 18:49:24 -04:00
Dan Davison 317a062a9a New variable org-babel-named-src-block-regexp to match src block with
srcname, and function org-babel-named-src-block-regexp-for-name
returning regexp matching a block with a particular
name. org-babel-named-src-block-regexp is set by
org-babel-set-interpreters.
2009-06-13 18:46:26 -04:00
Dan Davison e0909d8458 New variable org-babel-named-src-block-regexp, to match a block with its srcname, and simple version of function org-babel-find-named-block. 2009-06-13 18:43:24 -04:00
Eric Schulte 3b026b806e shell source blocks no longer hang 2009-06-13 14:49:57 -07: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
Eric Schulte b56e6b0285 removing Austin F. Frank from copyright and author lines 2009-06-12 16:55:42 -07:00
Eric Schulte d261e178e9 passing all but one test 2009-06-12 16:50:53 -07:00