Commit Graph

46 Commits

Author SHA1 Message Date
Eric Schulte 7f7602e65b babel: assign copyright to FSF on ob-sh.el 2010-06-25 10:17:50 -07:00
Eric Schulte 05ac8eb8a8 babel: ensuring each language defined (possibly empty) default header arguments
this makes customization easier when users can assume that
  org-babel-default-header-args:foo will exist for every language
2010-06-25 10:12:54 -07:00
Eric Schulte 670b9899b9 babel: assigning copyright to the FSF for babel language files 2010-06-25 09:32:35 -07:00
Eric Schulte ae98b23ab9 babel: assigning copyright to the FSF for core babel files 2010-06-25 09:20:39 -07:00
Eric Schulte a969714755 babel: emacs-lisp no longer evaluates header argument references multiple times
* lisp/babel/langs/ob-emacs-lisp.el
  (org-babel-expand-body:emacs-lisp): removed extra call to
  `org-babel-process-params' which was causing referenced code blocks
  to be run multiple times

  (org-babel-execute:emacs-lisp): now passing processed-params through
  to `org-babel-expand-body:emacs-lisp' which keeps references from
  being evaluated multiple times
2010-06-24 14:05:34 -07:00
Eric Schulte b6e9c6a996 babel: variables can now accept null literal values
* lisp/babel/ob-exp.el (org-babel-exp-results): now checking to see if
  return value of `org-babel-ref-literal' is equal to the null
  indicator flag -- meaning it's now possible to accept a value of
  null

* lisp/babel/ob-ref.el (org-babel-ref-parse):  now checking to see if
  return value of `org-babel-ref-literal' is equal to the null
  indicator flag -- meaning it's now possible to accept a value of
  null

  (org-babel-ref-literal): now returning a null indicator flag when
  the value is *not* a literal value, meaning it is possible to pass
  in a literal value of null
2010-06-23 15:57:38 -07:00
Eric Schulte 6da29f1519 integrating org-babel into org.el 2010-06-23 13:41:20 -07:00
Eric Schulte b816a85ac0 babel: wrapped `org-babel-params-from-buffer' in `save-match-data'
* lisp/babel/ob.el (org-babel-params-from-buffer): wrapped in
  save-match-data
2010-06-22 11:46:49 -07:00
Eric Schulte 0d1aaf735f babel: declaring variable to satisfy compiler 2010-06-17 18:15:36 -07:00
Eric Schulte ffbeb7ffe6 babel: languages adding their extensions to `'org-babel-tangle-lang-exts' 2010-06-17 18:15:35 -07:00
Eric Schulte 752a59c58f babel: ensure no whitespace in language names
* lisp/babel/ob.el (org-babel-src-block-regexp):
  ensure no whitespace in language names

  (org-babel-inline-src-block-regexp):
  ensure no whitespace in language names
2010-06-17 18:15:35 -07:00
Eric Schulte 97ead27f78 babel: remove all language file reference to define language variables 2010-06-17 18:15:35 -07:00
Eric Schulte 9ae48928ca babel: removed ob-interpreters variable -- more natural evaluation decisions
Babel will now try to evaluate any source code block for which the
  required language-specific functions are defined.
2010-06-17 18:15:35 -07:00
Eric Schulte c981f6d697 babel: simplifying handling of tangle langs
- Removed the org-babel-tangle-langs variable.
  - Added the org-babel-tangle-lang-exts alist for associating
    languages with file extensions
  - Comments now only added when the :comments header argument is set
    to yes

* lisp/babel/ob-tangle.el (org-babel-tangle-w-comments):
  this is now a defcustom

  (org-babel-tangle-lang-exts): alist associating languages with file
  extension, this is also a defcustom

  (org-babel-spec-to-string): no longer using the complex tangle-lang
  variables
2010-06-17 18:15:35 -07:00
Eric Schulte 4482058c0c babel: some final compiler tweaks -- no more compiler warnings 2010-06-17 18:15:35 -07:00
Eric Schulte 32c985ffd9 babel: more compiler cleanup -- now only throwing 1 warning (which doesn't make sense anyways) 2010-06-17 18:15:35 -07:00
Eric Schulte a86734f526 babel: eliminated compiler warning about `org-babel-get-src-block-info' 2010-06-17 18:15:35 -07:00
Eric Schulte 5769cccd6a babel: ob-sqlite now handles column names
* lisp/babel/langs/ob-sqlite.el (org-babel-execute:sqlite):
  now handling column names

  (org-babel-sqlite-offset-colnames): now handling column names
2010-06-17 18:15:34 -07:00
Eric Schulte 7513cdb12a ob-sqlite.el -- sqlite3 support to org-babel
* lisp/babel/langs/ob-sqlite.el: sqlite3 support for org-babel
2010-06-17 18:15:34 -07:00
Eric Schulte b329b7a736 babel: uniform declare-function placement at the tops of files 2010-06-17 18:15:34 -07:00
Eric Schulte e853f11899 ob-sh: adding check of existence for session variable 2010-06-17 18:15:34 -07:00
Eric Schulte 292799681e babel: pre-setting variable for compiler
* lisp/babel/ob.el (call-process-region): declaring
  call-process-region as a variable so that we can set it's value
  later
2010-06-17 18:15:34 -07:00
Eric Schulte df5f954c79 babel: swapping function order to appease the compiler
* lisp/babel/ob-tangle.el (org-babel-spec-to-string): swap flet and
  let order to make compiler happy
2010-06-17 18:15:34 -07:00
Eric Schulte 0751f2ebfa fixes 2010-06-17 18:15:34 -07:00
Eric Schulte 892292c2d9 better initialization for call-process-region 2010-06-17 18:15:33 -07:00
Eric Schulte ca3f3baca6 remember the ob-comint-with-output is a macro 2010-06-17 18:15:33 -07:00
Eric Schulte 116d9cfa85 ob: adding ob-init.el to load everything 2010-06-17 18:15:33 -07:00
Eric Schulte b746686dfe ob-sh: should say declare-function not defun-function 2010-06-17 18:15:33 -07:00
Eric Schulte 0e939a7df5 babel: more compiler satisfaction 2010-06-17 18:15:33 -07:00
Eric Schulte b9a8df9d1c babel: defvar'ing `org-babel-library-of-babel' for compiler 2010-06-17 18:15:33 -07:00
Eric Schulte 0dabebc444 babel: eval-when-compile for 'cl in more babel files 2010-06-17 18:15:33 -07:00
Eric Schulte 6fa2ab7eac babel: replacing functions like "fifth" with "nth 4" 2010-06-17 18:15:33 -07:00
Eric Schulte defa2dcb2f babel: declaring functions and variables for the compiler 2010-06-17 18:15:33 -07:00
Eric Schulte 75a82240c6 babel: correct function name in reference resolution
* lisp/babel/ob-ref.el (org-babel-ref-resolve-reference): correcting
  mis-named function org-babel-read-file to org-babel-read-link
2010-06-17 18:15:33 -07:00
Eric Schulte 49e90002dc babel: define variables before their first use
* lisp/babel/ob.el (org-babel-interpreters): define this before it is
  first used

* lisp/babel/ob.el (org-babel-call-process-region-original): define
  this before it is first used
2010-06-17 18:15:33 -07:00
Eric Schulte 2dc30adf15 babel: call-process-region-original is no longer a free variable
* lisp/babel/ob.el (org-babel-execute-src-block):
  call-process-region-original is no longer free

  (org-babel-org-babel-call-process-region-original):
  call-process-region-original is no longer free and is now renamed
  org-babel-call-process-region-original
  (org-babel-tramp-handle-call-process-region):
  call-process-region-original is no longer free
2010-06-17 18:15:32 -07:00
Eric Schulte ea8565e2ed babel: replaced `save-excursion' with `with-current-buffer'
* lisp/babel/ob.el (org-babel-expand-noweb-references):
  `save-excursion' is not longer defeated by `set-buffer'
2010-06-17 18:15:32 -07:00
Eric Schulte e0b71bf8e2 babel: wrapping free language variable in result insertion code
* lisp/babel/ob.el (org-babel-execute-src-block): now passing
  additional optional argument to `org-babel-inert-results'

  (org-babel-insert-result): now accepting additional language
  variable
2010-06-17 18:15:32 -07:00
Eric Schulte 45841a8a9d babel: ensure `org-babel-interpreters' is defined before `org-babel-add-interpreter'
* lisp/babel/ob.el: ensure `org-babel-interpreters' is defined before `org-babel-add-interpreter'
2010-06-17 18:15:32 -07:00
Eric Schulte 6be47552ea babel: `org-babel-comint-with-output' no longer assumes `full-body' variable
* lisp/babel/ob-comint.el (org-babel-comint-with-output):
  Fixed egregious oversight in which we were assuming that the
  `full-body' variable would be in scope at the time of macro
  execution.  Thanks to the compiler for finding this bug.

* lisp/babel/langs/ob-R.el (org-babel-R-evaluate): now using the fixed
  `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-haskell.el (org-babel-execute:haskell): now
  using the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-ocaml.el (org-babel-execute:ocaml): now using
  the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-octave.el (org-babel-octave-evaluate-session):
  now using the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-python.el (org-babel-python-evaluate): now using
  the fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-ruby.el (org-babel-ruby-evaluate): now using the
  fixed `org-babel-comint-with-output' macro

* lisp/babel/langs/ob-sh.el (org-babel-sh-evaluate): now using the
  fixed `org-babel-comint-with-output' macro
2010-06-17 18:15:32 -07:00
Eric Schulte 8e0faf35de ensuring the existence of a complete first sentence in the documentation of each babel function 2010-06-17 18:15:32 -07:00
Eric Schulte 0738893160 updating require and provide boilerplate for new ob* files 2010-06-17 18:15:32 -07:00
Eric Schulte 904bdaff9a ob.el now adds the lisp/langs/ directory to the load path 2010-06-17 18:15:32 -07:00
Eric Schulte 96e396ba77 new header for ob.el 2010-06-17 18:15:32 -07:00
Eric Schulte e0e4d76094 renaming all org-babel* function to ob* to conform with Emacs conventions 2010-06-17 18:15:32 -07:00
Eric Schulte 04152d3a06 moving org-babel into the main org-mode lisp directory
we are keeping two things in the contrib directory

  1) the library-of-babel.org file, this is with the goal of lowering
     the barrier of entry for contribution of functions to the library
     of babel

  2) we are also keeping a langs directory in the contrib directory
     because some language files do not have FSF copyright assignment
     -- current org-babel-oz.el is the only such file
2010-06-17 18:15:32 -07:00