Commit Graph

6660 Commits

Author SHA1 Message Date
Dan Davison 84dd553936 babel: perl: New variable assignment and expansion scheme
* ob-perl.el (org-babel-execute:perl): Use generic expansion
	function
	(org-babel-expand-body:perl): Delete function
	(org-babel-variable-assignments:perl): New function
2010-10-21 13:06:02 +01:00
Dan Davison ee5d7af7b9 babel: org: Delete unnecessary language-specific expansion function
* ob-org.el (org-babel-expand-body:org): Delete
    function (automatically handled by generic version)
2010-10-21 13:06:02 +01:00
Dan Davison 58a24fa325 babel: octave and matlab: New variable assignment and expansion scheme
* ob-octave.el (org-babel-execute:octave): Use generic
	expansion function
	(org-babel-variable-assignments:octave): Change name of
	function
	(org-babel-variable-assignments:matlab): New defalias
	(org-babel-prep-session:octave): Change name of function
	(org-babel-expand-body:matlab): Delete function
	(org-babel-expand-body:octave): Delete function
2010-10-21 13:06:02 +01:00
Dan Davison 590fae34e1 babel: ocaml: New variable assignment and expansion scheme
* ob-ocaml.el (org-babel-execute:ocaml): Use generic expansion
	function
	(org-babel-variable-assignments:ocaml): New function
	(org-babel-expand-body:ocaml): Delete function
2010-10-21 13:06:02 +01:00
Dan Davison 42ddb16dbf babel: mscgen: Delete unnecessary language-specific expansion function
* ob-mscgen.el (org-babel-expand-body:mscgen): Delete
    function (automatically handled by generic version)
2010-10-21 13:06:02 +01:00
Dan Davison 67fd5e730e babel: javascript: New variable assignment and expansion scheme
* ob-js.el (org-babel-execute:js): Use new variable assignment
	function
	(org-babel-expand-body:js): Delete function
	(org-babel-prep-session:js): Use new variable assignment
	function
	(org-babel-variable-assignments:js): New function
2010-10-21 13:06:02 +01:00
Dan Davison 1ab30746dc babel: haskell: New variable assignment scheme
* ob-haskell.el (org-babel-execute:haskell): Use generic
	expansion function
	(org-babel-expand-body:haskell): Delete function
	(org-babel-prep-session:haskell): Use variable assignment function
	(org-babel-variable-assignments:haskell): New function
2010-10-21 13:06:02 +01:00
Dan Davison 02a10a2bdb babel: gnuplot: New variable assignment scheme
* ob-gnuplot.el (org-babel-expand-body:gnuplot): Use variable
	assignment function
	(org-babel-prep-session:gnuplot): Use variable assignment
	function
	(org-babel-variable-assignments:gnuplot): New function
2010-10-21 13:06:02 +01:00
Dan Davison b24139309d babel: ditaa: Delete unnecessary language-specific expansion function
* ob-ditaa.el (org-babel-expand-body:ditaa): Delete
    function (automatically handled by generic version)
2010-10-21 13:06:01 +01:00
Dan Davison b4cded9221 babel: css: Delete unnecessary language-specific expansion function
* ob-css.el (org-babel-expand-body:css): Delete
	function (automatically handled by generic version)
2010-10-21 13:06:01 +01:00
Dan Davison 4eee123e17 babel: asymptote: New variable assignment scheme
* ob-asymptote.el (org-babel-execute:asymptote): Use generic
	expansion function
	(org-babel-expand-body:asymptote): Delete function
	(org-babel-variable-assignments:asymptote): New function
2010-10-21 13:06:01 +01:00
Dan Davison e3d9d21802 babel: R: New variable assignment scheme
* ob-R.el (org-babel-expand-body:R): Use new function
	`org-babel-variable-assignments:R'; don't trim body.
	(org-babel-execute:R): Respond to changes in
	`org-babel-expand-body:R'
	(org-babel-prep-session:R): Called function is now named
	`org-babel-variable-assignments:R'
	(org-babel-variable-assignments:R): Receives processed-params
	as new optional argument
2010-10-21 13:06:01 +01:00
Dan Davison 86418567cd babel: C: Don't trim body when expanding
* ob-C.el (org-babel-C-expand): Don't trim body
2010-10-21 13:06:01 +01:00
Dan Davison bdbc4961c8 babel: scheme: Fix bug in obtaining variable references
* ob-scheme.el (org-babel-expand-body:scheme): Fix bug in
	obtaining variable references
2010-10-21 13:06:01 +01:00
Dan Davison a6720e38a3 babel: tangle: Respond to changes in generic expansion function
* ob-tangle.el (org-babel-tangle-collect-blocks): Supply
	variable assignment lines to generic expansion command
2010-10-21 13:06:01 +01:00
Dan Davison 83332fb69c babel: New version of generic expansion function
* ob.el (org-babel-expand-src-block): Supply variable
	assignment lines to generic expansion function
	(org-babel-expand-body:generic): Prepend body with optional
	variable assignment lines
2010-10-21 13:06:01 +01:00
Eric Schulte 43c712fccb unifying ob-process-params and ob-expand-variables
* lisp/ob-exp.el (org-babel-exp-results): replaced old function call

* lisp/ob-lob.el (org-babel-lob-execute): replaced old function call

* lisp/ob-ref.el (org-babel-ref-parse): removed obsolete optional
  params argument, also no longer chokes when handed an
  already-resolved reference

  (org-babel-ref-resolve): removed obsolete optional params argument

* lisp/ob.el (org-babel-ref-parse): updated function declaration
  (org-babel-get-src-block-info): replaced old function call
  (org-babel-header-arg-names): indentation
  (org-babel-execute-src-block): now expanding all parameters using
  the newly combined org-babel-process-params
  (org-babel-switch-to-session-with-code): indentation
  (org-mode-hook): indentation
  (org-babel-process-params): now packages all results into the
  parameter alist and does variable expansion, this should no longer
  be called from inside of language functions
  (org-babel-expand-noweb-references): updated function call for newly
  removed obsolete function parameter
2010-10-21 13:06:01 +01:00
Eric Schulte fd97cb9386 ob-lob: now working with the new variable resolution setup
* lisp/ob-lob.el (org-babel-lob-execute): now expanding variable
  references before execution

* lisp/ob.el (org-babel-merge-params): better indentation, and finally
  sorted out the proper replacement of conflicting variable
  definitions
2010-10-21 13:06:00 +01:00
Eric Schulte 71d50277b5 ob: only sort parameters if it's required for caching
* lisp/ob.el (org-babel-execute-src-block): only sort parameters if
  it's required for caching
2010-10-21 13:06:00 +01:00
Eric Schulte 1412447d61 babel evaluation once again working in tables
* lisp/ob-table.el (sbe): reworking for better indentation and to
  integrate the new variable resolution
2010-10-21 13:06:00 +01:00
Eric Schulte 9587cdc0d0 ob-ref: now expanding variables when resolving references
* lisp/ob-ref.el (org-babel-ref-resolve-reference): now expanding
  variables when resolving references
2010-10-21 13:06:00 +01:00
Eric Schulte 1aed27c104 ob-merge-params: fixed order or precedence for variables
* lisp/ob.el (org-babel-merge-params): fixed order or precedence for
  variables
2010-10-21 13:06:00 +01:00
Eric Schulte 2ddcf9e255 removing obsoleted optional third argument from org-babel-expand-body:LANG
* lisp/ob-C.el (org-babel-expand-body:c++): removing obsoleted
  optional third argument
  (org-babel-expand-body:c++): removing obsoleted optional third
  argument
  (org-babel-C-expand): removing obsoleted optional third argument
* lisp/ob-R.el:
  (org-babel-expand-body:R): removing obsoleted optional third
  argument
  (org-babel-execute:R): removing obsoleted optional third argument
  (org-babel-R-variable-assignments): removing obsoleted optional
  third argument
* lisp/ob-asymptote.el:
  (org-babel-expand-body:asymptote): removing obsoleted optional third
  argument
  (org-babel-execute:asymptote): removing obsoleted optional third
  argument
* lisp/ob-clojure.el:
  (org-babel-expand-body:clojure): removing obsoleted optional third
  argument
  (org-babel-execute:clojure): removing obsoleted optional third
  argument
* lisp/ob-css.el:
  (org-babel-expand-body:css): removing obsoleted optional third
  argument
* lisp/ob-ditaa.el:
  (org-babel-expand-body:ditaa): removing obsoleted optional third
  argument
* lisp/ob-dot.el:
  (org-babel-expand-body:dot): removing obsoleted optional third
  argument
  (org-babel-execute:dot): removing obsoleted optional third argument
* lisp/ob-emacs-lisp.el:
  (org-babel-expand-body:emacs-lisp): removing obsoleted optional
  third argument
  (org-babel-execute:emacs-lisp): removing obsoleted optional third
  argument
* lisp/ob-gnuplot.el:
  (org-babel-expand-body:gnuplot): removing obsoleted optional third
  argument
* lisp/ob-haskell.el:
  (org-babel-expand-body:haskell): removing obsoleted optional third
  argument
  (org-babel-execute:haskell): removing obsoleted optional third
  argument
  (org-babel-load-session:haskell): removing obsoleted optional third
  (org-babel-prep-session:haskell): removing obsoleted optional third
* lisp/ob-js.el:
  (org-babel-expand-body:js): removing obsoleted optional third
  argument
  (org-babel-execute:js): removing obsoleted optional third argument
* lisp/ob-latex.el:
  (org-babel-expand-body:latex): removing obsoleted optional third
  argument
* lisp/ob-lisp.el:
  (org-babel-expand-body:lisp): removing obsoleted optional third
  argument
  (org-babel-execute:lisp): removing obsoleted optional third argument
* lisp/ob-mscgen.el:
  (org-babel-expand-body:mscgen): removing obsoleted optional third
  argument
* lisp/ob-ocaml.el:
  (org-babel-expand-body:ocaml): removing obsoleted optional third
  argument
  (org-babel-execute:ocaml): removing obsoleted optional third
  argument
* lisp/ob-octave.el:
  (org-babel-expand-body:matlab): removing obsoleted optional third
  argument
  (org-babel-expand-body:octave): removing obsoleted optional third
  argument
  (org-babel-execute:octave): removing obsoleted optional third
  argument
  (org-babel-octave-variable-assignments): removing obsoleted optional
  third
* lisp/ob-org.el:
  (org-babel-expand-body:org): removing obsoleted optional third
  argument
* lisp/ob-perl.el:
  (org-babel-expand-body:perl): removing obsoleted optional third
  argument
  (org-babel-execute:perl): removing obsoleted optional third argument
* lisp/ob-plantuml.el:
  (org-babel-expand-body:plantuml): removing obsoleted optional third
  argument
* lisp/ob-python.el:
  (org-babel-expand-body:python): removing obsoleted optional third
  argument
  (org-babel-execute:python): removing obsoleted optional third
  argument
  (org-babel-python-variable-assignments): removing obsoleted optional
  third
* lisp/ob-ruby.el:
  (org-babel-expand-body:ruby): removing obsoleted optional third
  argument
  (org-babel-execute:ruby): removing obsoleted optional third argument
* lisp/ob-sass.el:
  (org-babel-expand-body:sass): removing obsoleted optional third
  argument
* lisp/ob-scheme.el:
  (org-babel-expand-body:scheme): removing obsoleted optional third
  argument
  (org-babel-execute:scheme): removing obsoleted optional third
  argument
* lisp/ob-screen.el:
  (org-babel-expand-body:screen): removing obsoleted optional third
  argument
* lisp/ob-sh.el:
  (org-babel-expand-body:sh): removing obsoleted optional third
  argument
  (org-babel-execute:sh): removing obsoleted optional third argument
  (org-babel-sh-variable-assignments): removing obsoleted optional
  third
* lisp/ob-sql.el:
  (org-babel-expand-body:sql): removing obsoleted optional third
  argument
* lisp/ob-sqlite.el:
  (org-babel-expand-body:sqlite): removing obsoleted optional third
  argument
  (org-babel-execute:sqlite): removing obsoleted optional third
  argument
* lisp/ob.el:
  (org-babel-expand-body:generic): removing obsoleted optional third
  argument
2010-10-21 13:06:00 +01:00
Eric Schulte f16c46c856 babel: purging all calls to removed org-babel-ref-variables
* lisp/ob-clojure.el (org-babel-prep-session:clojure): purging all
  calls to removed org-babel-ref-variables

* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars): purging all
  calls to removed org-babel-ref-variables

* lisp/ob-ruby.el (org-babel-prep-session:ruby): purging all calls to
  removed org-babel-ref-variables

* lisp/ob-scheme.el (org-babel-prep-session:scheme): purging all calls
  to removed org-babel-ref-variables

* lisp/ob-sqlite.el (org-babel-expand-body:sqlite): purging all calls
  to removed org-babel-ref-variables

  (org-babel-execute:sqlite): purging all calls to removed
  org-babel-ref-variables
2010-10-21 13:06:00 +01:00
Eric Schulte 832dc71f31 ob-lob: now working with the new ob-get-src-block-info
ob-get-src-block-info wasn't correctly returning the name of the
  code block

* lisp/ob-lob.el (org-babel-lob-ingest): now returns the count of
  ingested code blocks

* lisp/ob.el (org-babel-get-src-block-info): walks up possible
  additional header arg lines before checking for the code block name

  (org-babel-merge-params): can now handle empty variables gracefully
2010-10-21 13:06:00 +01:00
Eric Schulte 3ab7f12792 org-test is now ready for the newyears 2010-10-21 13:06:00 +01:00
Eric Schulte 9931dae20a babel: exporting now working with the new ob-get-src-block-info schema
includes a simple export test

* lisp/ob-exp.el (org-babel-exp-in-export-file): wrapper for
  collecting information from within the original export file

  (org-babel-exp-src-blocks): simplified through use of the above
  macro

  (org-babel-exp-code): simplified through the use of new functions
  for parsing header arguments

  (org-babel-exp-results): simpler high-level organization, also this
  is now where the expansion of variable references takes place during
  export

* lisp/ob.el (org-babel-expand-variables): broke variable replacement
  in a parameter list into it's own function

  (org-babel-get-src-block-info): now using the above function
2010-10-21 13:05:59 +01:00
Eric Schulte 9ba9ef99a6 babel: now allows multi-line header arguments with #+headers: before code block
for example, from the test of this functionality
* multi-line header arguments
  :PROPERTIES:
  :ID:       b77c8857-6c76-4ea9-8a61-ddc2648d96c4
  :END:

  (map 'list #'list numbers letters)

| 1 | a |
| 2 | b |
| 3 | c |
| 4 | d |
| 5 | e |
| 6 | f |
| 7 | g |

* lisp/ob.el (org-babel-multi-line-header-regexp): new variable for
  matching header lines preceding code blocks

  (org-babel-src-name-w-name-regexp): now includes possible header
  lines between source name and code block

  (org-babel-get-src-block-info): now also collecting header arguments
  from preceding header lines

  (org-babel-src-block-names): updated match-string to reflect new
  value of org-babel-src-name-w-name-regexp

  (org-babel-merge-params): fixed error in variable string regexp
2010-10-21 13:05:59 +01:00
Eric Schulte 05054d5227 ensure ob-get-src-block-info returns nil if not matches
* lisp/ob.el (org-babel-get-src-block-info): small but crucial fix,
  this should return nil if not match found
2010-10-21 13:05:59 +01:00
Eric Schulte 3d2aec3588 adding simple test of variable resolution 2010-10-21 13:05:59 +01:00
Eric Schulte a9f3c9fe11 now using newer version of jump.el -- run $ git submodule update 2010-10-21 13:05:59 +01:00
Eric Schulte 529e7c98fd nominally working 2010-10-21 13:05:59 +01:00
Eric Schulte 9c0aae1814 more lightening -- resolving foreign functions between ob-ref and ob 2010-10-21 13:05:59 +01:00
Eric Schulte 539c804457 ob-emacs-lisp: whitespace cleanup <=80 columns
* lisp/ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp): whitespace
  (org-babel-execute:emacs-lisp): whitespace
2010-10-21 13:05:58 +01:00
Eric Schulte c2dce939e8 more lightening 2010-10-21 13:05:58 +01:00
Dan Davison 07b45a64f2 Missing parenthesis 2010-10-21 13:05:58 +01:00
Dan Davison a06ea76c53 babel: Provide missing docstrings
* ob-sh.el (org-babel-sh-variable-assignments):
	Provide missing docstring
	* ob-python.el (org-babel-python-variable-assignments):
	Provide missing docstring
2010-10-21 13:05:58 +01:00
Dan Davison a59c4d7896 babel: octave: Fix variable assignments made by `org-babel-prep-session:octave'
* ob-octave.el (org-babel-expand-body:octave): Refactor: break variable
    assignment part out into a separate function
    (org-babel-octave-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:octave): Use new function
    `org-babel-octave-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 8e151c066e babel: sh: Fix variable assignments made by `org-babel-prep-session:sh'
* ob-sh.el (org-babel-expand-body:sh): Refactor: break variable
    assignment part out into a separate function
    (org-babel-sh-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:sh): Use new function
    `org-babel-sh-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 24a5f8b4e5 babel: python: Fix variable assignments made by `org-babel-prep-session:python'
* ob-python.el (org-babel-expand-body:python): Refactor: break variable
    assignment part out into a separate function
    (org-babel-python-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:python): Use new function
    `org-babel-python-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 1bc914cd7a babel: R: Fix variable assignments made by `org-babel-prep-session:R'
* ob-R.el (org-babel-expand-body:R): Refactor: break variable
    assignment part out into a separate function
    (org-babel-R-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:R): Use new function
    `org-babel-R-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 21e6738593 babel: Better variable names in `org-babel-initiate-session'
* ob.el (org-babel-initiate-session): Better variable names
2010-10-21 13:03:36 +01:00
Dan Davison 68b810dab5 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-21 13:03:09 +01:00
Eric Schulte e290e9e2f4 fixed some compilation warnings
* lisp/ob.el (org-number-sequence): declared
* lisp/ob-R.el (org-number-sequence): declared
2010-10-20 14:49:41 -06:00
Bastien Guerry 4cd56cfa7b org.texi: add a menu description. 2010-10-20 14:10:46 +02:00
Christian Egli 9542f8fa98 Fix an error in org-taskjuggler-get-unique-id
Don't try to pop from an empty list and downcase the result
2010-10-20 14:07:17 +02:00
Dan Davison 92531f3049 typo in variable name: org-inlinetask-defaut-state 2010-10-20 14:06:59 +02:00
Andreas Röhler 3829447296 20101020_texi-command-names.patch
BTW can't see where the meaning of key "S" is told...

Cheers
2010-10-20 14:05:43 +02:00
Carsten Dominik 33f947dcb5 Fix typos 2010-10-20 07:36:48 +02:00
Dan Davison ba9236054a babel: Bug fix in `org-babel-map-src-blocks'
* ob.el (org-babel-map-src-blocks): Store correct value of `end-block'
2010-10-19 13:20:35 +01:00