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

23 commits

Author SHA1 Message Date
Dan Davison b766b094a0 Using temp function definition to tidy R evaluation code. 2009-07-19 18:03:33 -04:00
Dan Davison 2b66de1c1b Reorganising R evaluation code.
With this change we avoid messing about extracting the output from the
comint buffer in the :results value case (the value has already been
written to file).
2009-07-19 17:45:00 -04:00
Dan Davison e4d14d41ec This should have been part of the parent commit (911e77a7c9) 2009-07-19 13:55:42 -04:00
Dan Davison 911e77a7c9 Code rearrangement: restrict R column names changes to org-babel-R.el.
On reflection this is (currently) R-specific functionality and should
not affect the code in org-babel.el.
2009-07-19 12:01:00 -04:00
Dan Davison 8294122f8f Trying to retain whitespace in output results from R.
I don't believe this solves it, but chomp is more the right thing to
do than trim. I'd like to retain all the whitespace so that alignment
of columns is correct in stdout.
2009-07-19 01:47:37 -04:00
Dan Davison 062bc09d84 Adding support for column names (header line) when using R.
Unlike the other languages, it's central to R to be able to index
columns of a data frame d, either by d[,"columnname"] of d$columnname.

With this change, if colnames are present in the *input* from
org-babel, the corresponding R variable is *always* constructed with
the colnames.

In addition, with the :colnames header arg, the *output* to elisp/org
buffer contains the colnames separated from the rest of the table by
'hline. This behaviour is not default because other languages may
expect a simple table without the 'hline.
2009-07-19 01:07:07 -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 c1f8de5eec Cosmetic changes only: shortening lines to fit my screen. 2009-07-11 23:59:04 -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 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 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 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 a06c910f37 cosmetic: removing commented debugging code; shortening some lines 2009-07-05 15:52:41 -04: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 112c7d9236 fixed non-session variable assignment in R 2009-06-15 12:17:58 -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 88048186ac R know how to prep and pop-to sessions 2009-06-14 11:48:11 -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 e39b5e848e applying org-babel-comint-with-output macro to org-babel-R.el 2009-06-13 17:34:51 -07:00
Eric Schulte b7c32fc5d8 passing almost all tests 2009-06-12 16:34:06 -07:00
Eric Schulte 5675e56585 sessions are now working in R 2009-06-12 15:31:52 -07:00
Eric Schulte b64be81363 moving language-specific files into their own directory 2009-06-12 08:59:38 -07:00
Renamed from lisp/org-babel-R.el (Browse further)