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
Eric Schulte
e0fe83c8d2
moving org-babel-lisp into the langs directory
2009-06-12 16:44:06 -07:00
Eric Schulte
b7c32fc5d8
passing almost all tests
2009-06-12 16:34:06 -07:00
Eric Schulte
d41466e5bc
now really passing all basic tests
2009-06-12 16:23:28 -07:00
Eric Schulte
8f9ae7314a
now passing basic-ruby test
2009-06-12 16:08:51 -07:00
Eric Schulte
5675e56585
sessions are now working in R
2009-06-12 15:31:52 -07:00
Eric Schulte
9623b16914
fixed some weird long-prompt issues with shell comint buffer
2009-06-12 15:20:23 -07:00
Eric Schulte
2dea1ea367
shell is now handling multiple sessions
2009-06-12 14:56:30 -07:00
Eric Schulte
f4798d3e83
python can now handle multiple sessions
2009-06-12 14:49:11 -07:00
Eric Schulte
39a4a85ba1
protecting against spurious spaces in header arguments
2009-06-12 13:46:40 -07:00
Eric Schulte
431715e6db
shell support is pretty much working
2009-06-12 13:09:20 -07:00
Eric Schulte
8ab8bf6ed4
quoting "%"s in messages
2009-06-12 13:07:56 -07:00
Eric Schulte
fe8393bf71
small documentation tweaks
2009-06-12 09:24:03 -07:00
Eric Schulte
b64be81363
moving language-specific files into their own directory
2009-06-12 08:59:38 -07:00
Eric Schulte
1be99d1b35
python is basically up to snuff (needs more work on sessions)
2009-06-12 08:46:00 -07:00
Eric Schulte
018a8fcb98
removed spurious "\t" in ruby variable assignation
2009-06-12 08:45:43 -07:00
Eric Schulte
190a66c6af
ruby now respects the scalar/vector :results header arguments
2009-06-12 08:33:51 -07:00
Eric Schulte
82e7c86ea3
R evaluation is pretty much up to snuff
2009-06-12 08:29:21 -07:00
Eric Schulte
86e4597a7a
R results now obey the scalar/vector :results header arguments
2009-06-12 08:10:54 -07:00
Eric Schulte
e0dcbce75e
evaluation is working in R capturing both outputs and values
2009-06-12 07:55:33 -07:00
Eric Schulte
005e682948
making progress bringing org-babel-R.el into the new evaluation schema
2009-06-11 17:04:42 -07:00
Eric Schulte
0e8ae41dfc
tweak variable name in org-babel-ruby
2009-06-11 16:28:21 -07:00
Eric Schulte
2c1b04eecb
ruby is now working with sessions, output-based-results, and value(functional)-based-results
2009-06-11 15:34:34 -07:00
Eric Schulte
6698edbe83
finally think I'm on the right track for output vs. values, mostly working w/ruby
...
- moved ruby functions into their own buffer
- removed org-babel-sessions.el
- drastically scaled down org-babel-comint.el (may grow later if we
find duplication between language buffers)
- removed org-babel-script.el
- adjusted org-babel-init.el to reflect new file layout
For the big breakthrough see `org-babel-ruby-evaluate' in
org-babel-ruby.el. This will be the model upon which all future
language evaluations will be built.
2009-06-11 15:15:59 -07:00
Eric Schulte
8620cc414c
generalizing command to read results from a file into elisp
2009-06-11 15:04:10 -07:00
Eric Schulte
9040ad657b
adding string manipulation functions to org-babel.el
2009-06-11 14:31:37 -07:00
Eric Schulte
2081b95410
Revert "org-babel-comint-with-output is now fully self-contained and side-effect free"
...
This seems to be causing problems...
This reverts commit 0573fc4d9c
.
2009-06-11 12:55:39 -07:00
Eric Schulte
dc551fab04
beefed up org-babel-comint-wait-for-output but it still sometimes misses multiple outputs
2009-06-11 12:44:14 -07:00
Eric Schulte
f5481ab666
looks like out comint waiting function needs some work...
2009-06-11 12:35:48 -07:00
Eric Schulte
0573fc4d9c
org-babel-comint-with-output is now fully self-contained and side-effect free
2009-06-11 12:16:37 -07:00
Eric Schulte
eacce7b29d
`org-babel-comint-in-buffer' now declares it's indentation
2009-06-11 07:32:31 -07:00
Eric Schulte
aa410df722
added nice little macro to capture output
2009-06-10 22:18:59 -07:00
Eric Schulte
8d0fd18933
working on org-babel-comint for automatically keeping a ring
2009-06-10 17:27:06 -07:00
Eric Schulte
23c61abf90
more robust org-babel-chomp
2009-06-10 16:17:04 -07:00
Eric Schulte
9c70974391
started working on ruby 'script' execution
2009-06-09 16:33:36 -07:00
Eric Schulte
f3da4d0321
functional results now working with org-babel-comint and org-babel-script
2009-06-09 16:10:43 -07:00
Eric Schulte
39d1674f30
org-babel-R is now able to assign variables
2009-06-09 15:28:59 -07:00
Eric Schulte
d3f1d07066
org-babel-R can now run in 'script' mode
2009-06-09 15:02:01 -07:00
Eric Schulte
4da3ddc623
Merge branch 'session' of git@github.com:eschulte/org-babel into session
2009-06-08 15:05:08 -07:00
Eric Schulte
cdb41f5106
working on org-babel-script.el (winnowing, and using org-babel-comint.el)
2009-06-08 15:03:04 -07:00
Dan Davison
1e4c3389b6
As was just done for branch master, removing all support for hlines/colnames -- they persist in branch rowcolnames. Also removing comments. These should never have been present in this branch.
2009-06-06 18:12:42 -04:00
Eric Schulte
b533d9d446
cleaned up org-babel-comint and removed helper functions
2009-06-03 20:52:01 -07:00
Eric Schulte
fe75562a64
org-babel-comint is basically working
2009-06-03 20:51:36 -07:00
Eric Schulte
e1aeec8ab1
begun implementing org-babel-comint
...
a collection of functions to simplify interaction with comint-mode
buffers
2009-06-03 20:18:18 -07:00
Eric Schulte
c175d3ce0d
playing with org-babel-script and comint buffers/functions
2009-06-03 17:37:50 -07:00
Eric Schulte
2a663b9e09
R is now using last output (with default session) and passing all tests
2009-06-03 15:59:27 -07:00
Eric Schulte
49db1e523c
Merge branch 'master' into session
...
Conflicts:
org-babel.org
2009-06-03 15:30:10 -07:00
Eric Schulte
39f7174884
Revert "Revert "Make org table result have header row and hline when appropriate...""
...
This reverts commit dff01091dc
.
Yes, this is a reversion of a reversion, as the original commit has
been reverted in the master branch, I'm now just going to revert the
reversion and then merge with master to maintain inter-branch
cohesion.
oh, did I mention... "revert"
2009-06-03 15:26:32 -07:00
Dan Davison
02b265b2e3
Reverted tentative and hackish support for hline in R output. I have left a commented line and an unused function while I am thinking about this, and pending me learning git better. However I haven't yet reverted the ability of R to recognise hlines in var references, so the grades example still works. All sbe tests are passed.
2009-06-03 12:09:52 -04:00
Eric Schulte
dff01091dc
Revert "Make org table result have header row and hline when appropriate..."
...
This reverts commit e4263daf76
.
I'm reverting this commit in the sesion branch because it is breaking
the tests for R, as it no longer allows R source code blocks to return
scalar values. Hopefully this issue will be fixed in the master
branch before I merge the session branch back in.
2009-06-02 16:29:30 -07:00
Eric Schulte
bba80bb837
working on sessions
2009-06-02 16:26:57 -07:00
Eric Schulte
c38294d21f
DONE Remove protective commas from # comments before evaluating
2009-06-01 16:56:59 -07:00
Dan Davison
e4263daf76
Make org table result have header row and hline when appropriate. (This should have been included with commit a39d68640e
). The approach I've taken is to make R always write the column names into the tsv file. If the result does not have user-supplied column-names, then R writes default column names of the form V1,V2,...,V$numcols. After reading the tsv back into lisp, we check whether it has "real" column names or the R defaults. If it has real column names, then I give the org table an hline.
...
I expect this will conflict with Eric's work on sessions, but we can deal with that.
There is a remaining quoting issue that needs to be dealt
with. E.g. with an unquoted string in the input, it comes out as
quoted in the result. This seems bad, since if you use the output as
new input you get something different (with extra
quoting). (non-idempotence if that's the right term).
| col1 | col2 | col3 |
|------+---------+------|
| 1 | 2 | 3 |
| 4 | schulte | 6 |
tabel
| "col1" | "col2" | "col3" |
|--------+-----------+--------|
| 1 | 2 | 3 |
| 4 | "schulte" | 6 |
2009-05-30 16:45:26 -04:00
Dan Davison
eb29bef93f
Made org-babel-remove-result interactive. Eric if you agree do you want to decide on a binding?
2009-05-30 15:59:46 -04:00
Dan Davison
a39d68640e
Allowing org-tables with hline to be referred to and passed into R. If hline is present, the first row of the table becomes the column names in R. This allows the grades example to run for me which was not true before. Eric: any commits I make should be viewed as tentative -- feel free to reject or recode them.
2009-05-30 15:00:06 -04:00
Dan Davison
2ca59eaa0f
Preventing end of buffer error when no newline after #+end_src
2009-05-29 23:34:50 -04:00
Eric Schulte
d49084b73d
small additions to org-babel-comint.el
2009-05-29 17:45:40 -07:00
Eric Schulte
c5a58ad6aa
moving generalized comint functions to new file org-babel-comint.el
2009-05-27 19:00:13 -07:00
Eric Schulte
2c3c91ed12
removed org-babel-ui (tabbing blocks) as the functionality will be included in org-mode core
2009-05-27 16:34:48 -07:00
Eric Schulte
9aa713be8c
updated tag line
2009-05-24 14:10:03 -07:00
Eric Schulte
6614df037f
now passing all tests with new name "org-babel"
2009-05-24 14:08:02 -07:00
Eric Schulte
9247200bb0
renaming the org-babel/ directory to the lisp/ directory
2009-05-24 13:56:20 -07:00