Commit Graph

74 Commits

Author SHA1 Message Date
Nicolas Goaziou 346c978939 Remove useless data in test file
* testing/examples/macro-templates.org: Remove time-stamp.
2012-10-10 22:46:50 +02:00
Nicolas Goaziou 89d6a26f8d org-export: Expand include keywords before macros
* contrib/lisp/org-export.el (org-export-as): Expand include keywords
  before macros.  This allows to specify macro templates in the
  included file.
* testing/examples/macro-templates.org: New file for testing purposes.
* testing/lisp/test-org-export.el: Add test.
2012-10-10 13:52:54 +02:00
Bastien Guerry 00e5c278fd testing/: Update two tests
The current Emacs trunk bumped to version >24.2.50 because a new
release Emacs 24.2 has been decided.  `cl-map' is not an alias for
`map' in Emacs < 24.2.50 -- so take this into account in some tests.
2012-08-20 14:24:14 +02:00
Eric Schulte 16b2af9fdb passing all tests 2012-08-10 10:56:14 -06:00
Bastien Guerry 6c911234ac Remove files coming from maint. 2012-03-20 01:50:59 +01:00
Bastien Guerry df82832fb7 Merge maint fixup and finish master fixup 2012-03-20 00:35:55 +01:00
Bastien Guerry 4e5c24ea81 Delete files that sneaked in while fixing the master branch. 2012-03-19 23:48:07 +01:00
Bastien Guerry ecd0562c5f Fix the master branch.
I started from the 78ec8e commit then cherry-picked and squashed
commits that have been done in master since then, except the bad
commits that overwrote the tree (in master) with the tree in maint.

This commit also bumps the version number to 7.8.06.

The only "fix" that was made between 78ec8e and the previous commit
is e0072f which has been reported to break stuff.
2012-03-19 22:01:29 +01:00
Bastien Guerry c44e07a4fa Fix the maint branch.
Thanks to Achim Gratz for his precious help on this.
2012-03-19 20:27:28 +01:00
Bastien Guerry de42649f7b Manually revert maint to e85080.
e85080 is the last correct commit in the maint branch
before releasing 7.8.04.  The 7.8.05 release should be
done from this commit.
2012-03-17 16:28:46 +01:00
Bastien Guerry 73bb18ba37 Manually revert to the Release 7.8.04 tag. 2012-03-17 15:52:24 +01:00
Bastien Guerry 6e534f9c61 Manually revert back to commit e85080.
This fixes a wrong merge that should not have happened:
commit 7e903a merges the master branch into the maint branch,
while we really want to keep the maint branch a bugfix-only
branch.

This commit reverts back the maint branch to its state before
merging the master branch.  From there, we will fix remaining
problems with the maint branch (e.g. copyright issues) then
release this maint branch as Org-mode 7.8.05.
2012-03-17 14:34:01 +01:00
Nicolas Goaziou 94185eac92 org-export: Fix bug with recursive file inclusion and relative paths
* contrib/lisp/org-export.el (org-export-expand-include-keyword): Use
  another optional argument to specify the current working directory.
(org-export-as): Apply changes.
* testing/contrib/lisp/test-org-export.el: Add tests.
* testing/examples/include.org: New test file.
* testing/examples/include2.org: New test file.
2012-02-23 21:28:15 +01:00
Eric Schulte 47eb35bb89 tests of fixed subtree property accumulated behavior 2012-02-15 08:12:35 -07:00
Eric Schulte a3e5f97ee7 New strip-export noweb header argument value
* lisp/ob-exp.el (org-babel-exp-src-block): Strip noweb references on
  export when "strip-export".
* lisp/ob.el (org-babel-common-header-args-w-values): New noweb
  header value.
  (org-babel-merge-params): New noweb header value.
  (org-babel-noweb-p): New noweb header value.
* testing/examples/babel.org (an): Testing new noweb header value.
* testing/lisp/test-ob-exp.el (ob-exp/noweb-strip-export-ensure-strips):
  Testing new noweb header value.
* doc/org.texi (noweb): Document new noweb header value.
2012-02-01 08:19:29 -07:00
Eric Schulte 2395c3eff1 Merge branch 'origin-maint' 2012-01-24 00:02:52 -07:00
Eric Schulte a706f42403 update tests 2012-01-24 00:02:33 -07:00
Eric Schulte 527e6844cc optionally export additional information with call lines
* lisp/ob-exp.el (org-babel-exp-call-line-template): Control export of
  additional call line information.
  (org-babel-exp-non-block-elements): Fancier call line export.
* testing/examples/babel.org (an): Example data to test new call line
  export.
* testing/lisp/test-ob-exp.el (ob-exp/export-call-line-information):
  Test new call line export.
2012-01-23 12:53:15 -07:00
Eric Schulte d3538624e7 Merge branch 'origin-maint'
Conflicts:
	lisp/ob-exp.el
	testing/examples/babel.org
2012-01-23 10:46:03 -07:00
Eric Schulte 43abeaa488 evaluate all executables in buffer order on export
* lisp/ob-exp.el (org-babel-exp-non-block-elements): Map over both
  inline src blocks and call lines on export.
2012-01-23 10:39:38 -07:00
Eric Schulte 10f26fb805 Merge branch 'origin-maint' 2012-01-20 12:00:31 -07:00
Litvinov Sergey f92facd890 Map "screen" to shell-script-mode 2012-01-20 11:47:13 -07:00
Eric Schulte 94f10ddfd7 don't always replace <<noweb>> references when :exports both
* lisp/ob-exp.el (org-babel-exp-results): Alter a copy of info.
* testing/examples/babel.org (an): Example data for test behavior.
* testing/lisp/test-ob-exp.el (ob-exp/noweb-no-export-and-exports-both):
  Confirm proper behavior.
2012-01-16 20:39:12 -07:00
Eric Schulte 4ce9b8044c test for customizable code block export 2012-01-14 12:41:40 -07:00
Bastien Guerry 6e10d36d92 Fix trailing whitespaces. 2012-01-05 18:17:29 +01:00
Martyn Jago b37be0237a Fixed and suplemented pending tests in `test-ob-exp.el'. * testing/examples/babel.org: examples altered and added to * testing/lisp/test-ob-exp.el: tests fixed and added to 2012-01-05 18:16:57 +01:00
Bastien Guerry 07e31dfa0d Delete trailing whitespaces. 2012-01-04 20:02:10 +01:00
Martyn Jago 2ef6100af5 Modify tests to avoid writing to non-temp test-example files.
* testing/examples/babel.org:
* testing/examples/table.org:
* testing/lisp/test-ob.el:
* testing/lisp/test-org-table.el:

Tests that used to write to a test-example file (ie testing/babel.org)
have been modified to write to temp files instead.

This avoids leaving open and /modified/ tests in Emacs when tests are
run by `org-test-run-all-tests'.
2012-01-04 20:00:08 +01:00
Litvinov Sergey 0b7ae6ffb9 ob-octave.el: Add graphical output
* lisp/ob-octave.el: add graphical output to png file

    * testing/examples/ob-octave-test.org: add a test for graphical
      output, and a test for session
2011-12-17 09:04:20 -07:00
Litvinov Sergey e6377a8295 Add string input variables to ob-octave.el. Add tests for ob-octave.el 2011-12-10 06:12:29 -07:00
Eric Schulte 3af89e696a property names ending in plus accumulate
This results in the following behavior.

  #+property: var  foo=1
  #+property: var+ bar=2

  #+begin_src emacs-lisp
    (+ foo bar)
  #+end_src

  #+results:
  : 3

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2

  * overwriting a file-wide property
    :PROPERTIES:
    :var:      foo=7
    :END:

  #+begin_src emacs-lisp
    foo
  #+end_src

  #+results:
  : 7

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=7

  * appending to a file-wide property
    :PROPERTIES:
    :var+:      baz=3
    :END:

  #+begin_src emacs-lisp
    (+ foo bar baz)
  #+end_src

  #+results:
  : 6

  #+begin_src emacs-lisp
    (org-entry-get (point) "var" t)
  #+end_src

  #+results:
  : foo=1 bar=2 baz=3

* lisp/org.el (org-update-property-plist): Updates a given property
  list with a property name and a property value.
  (org-set-regexps-and-options): Use org-update-property-plist.
  (org-entry-get): Use org-update-property-plist.
* testing/examples/property-inheritance.org: Example file for testing
  appending property behavior.
* testing/lisp/test-property-inheritance.el: Tests of appending
  property behavior.
* lisp/ob.el (org-babel-balanced-split): Allow splitting on single
  characters as well as groups of two characters.
  (org-babel-parse-multiple-vars): Split variables on single spaces.
2011-11-15 08:56:24 -07:00
Eric Schulte 7e93b90f88 Standardized code block keywords
Nick Dokos <nicholas.dokos@hp.com> writes:

> Eric Schulte <schulte.eric@gmail.com> wrote:
>
>> The attached updated patch fixes a bug in the original.
>>
>
> Minor problem in applying:
>
> ,----
> | $ git apply ~/Mail/inbox/724
> | /home/nick/Mail/inbox/724:671: trailing whitespace.
> | #+name:
> | /home/nick/Mail/inbox/724:599: new blank line at EOF.
> | +
> | warning: 2 lines add whitespace errors.
> `----

The attached version fixes these issues, Thanks -- Eric

>From 0e43d59ee8d46a63f86780a502de726271bc39de Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Fri, 28 Oct 2011 10:44:21 -0600
Subject: [PATCH] removing code block, results and call-line synonyms -- BREAKING CHANGE

Following a round of on-list discussion many code block synonyms have
been removed, moving forward the following syntax is valid.

- call lines are specified with #+call:
- code blocks are named with #+name:
- results are named with #+name:, however results generated by a code
  block may still be labeled with #+results:, and tables named with
  #+tblname: will be considered to be named results

The following function may be used to update an existing Org-mode
buffer to the new syntax.

  (defun update-org-buffer ()
    "Update an Org-mode buffer to the new data, code block and call line syntax."
    (interactive)
    (save-excursion
      (flet ((to-re (lst) (concat "^[ \t]*#\\+" (regexp-opt lst t)
                                  "\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:[ \t]*"))
             (update (re new)
                     (goto-char (point-min))
                     (while (re-search-forward re nil t)
                       (replace-match new nil nil nil 1))))
        (let ((old-re (to-re '("RESULTS" "DATA" "SRCNAME" "SOURCE")))
              (lob-re (to-re '("LOB")))
              (case-fold-search t))
          (update old-re "name")
          (update lob-re "call")))))

Note: If an old version of Org-mode (e.g., the one shipped with Emacs)
      is installed on your system many of the important variables will
      be pre-defined with a defvar and *will not* have their values
      automatically updated, these include the following.
      - org-babel-data-names
      - org-babel-result-regexp
      - org-babel-src-block-regexp
      - org-babel-src-name-regexp
      - org-babel-src-name-w-name-regexp
      It may be necessary to either remove the source code of older
      versions of Org-mode, or to explicitly evaluate the ob.el file.

* lisp/ob-exp.el (org-exp-res/src-name-cleanup): Updated
  Documentation.
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated
  regular expression.
  (org-babel-inline-lob-one-liner-regexp): Updated regular expression.
* lisp/ob-ref.el (org-babel-ref-resolve): Notice when something that
  looks like a data results may actually be a code block.
* lisp/ob-table.el: Updated documentation.
* lisp/ob.el (org-babel-src-name-regexp): Simplified regexp.
  (org-babel-get-src-block-info): Updated match strings.
  (org-babel-data-names): Simplified acceptable names.
  (org-babel-find-named-block): Indentation.
  (org-babel-find-named-result): Updated to not return a code block as
  a result.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Removing
  references to old syntactic elements.
  (org-additional-option-like-keywords): Removing references to old
  syntactic elements.
* contrib/babel/library-of-babel.org: Updated to make use of the new
  syntax.
* testing/examples/babel-dangerous.org: Updated to make use of the new
  syntax.
* testing/examples/babel.org: Updated to make use of the new syntax.
* testing/examples/ob-awk-test.org: Updated to make use of the new
  syntax.
* testing/examples/ob-fortran-test.org: Updated to make use of the new
  syntax.
* testing/lisp/test-ob.el: Removed two bad tests which tested the
  literal values of old regular expressions rather than their
  behavior.
2011-11-15 08:56:24 -07:00
Eric Schulte 7720786c41 fix whitespace errors 2011-11-08 13:52:11 -07:00
Litvinov Sergey fddd85a172 construct a table from the output of maxima code block
Please consider a patch to construct a table from the output of maxima
code block.

>From a0305117f4e793c93d7d10bc7aab04f96bd62e9c Mon Sep 17 00:00:00 2001
From: Litvinov Sergey <slitvinov@gmail.com>
Date: Sat, 1 Oct 2011 22:29:18 +0200
Subject: [PATCH] [ob-maxima] Construct a table from the output of the code block. Add
 ert tests.
2011-11-08 13:51:27 -07:00
Eric Schulte 7e7ecb6db9 fix whitespace errors 2011-11-08 13:44:23 -07:00
Litvinov Sergey 9154641593 cpp->c++-mode, ob-C mode tests
The first patch maps cpp language code to c++-mode. The second patch
adds tests for ob-C.

>From fba6eef6944766e675e4abe1d11d347b9a728031 Mon Sep 17 00:00:00 2001
From: Sergey Litvinov <slitvinov@gmail.com>
Date: Wed, 3 Aug 2011 22:03:19 +0200
Subject: [PATCH 2/2] Add tests for ob-C.el
2011-11-08 13:41:43 -07:00
Litvinov Sergey 8d3a4da034 Extend ob-maxima: add input variables and graphic output
* lisp/ob-maxima.el (org-babel-tangle-lang-exts): Maxima extension.
  (org-babel-maxima-expand): Add input variables and graphic output.
  (org-babel-execute:maxima): Add input variables and graphic output.
  (org-babel-maxima-var-to-maxima): Add input variables and graphic
  output.
  (org-babel-maxima-graphical-output-file): Add input variables and
  graphic output.
  (org-babel-maxima-elisp-to-maxima): Add input variables and graphic
  output.
* testing/examples/ob-maxima-test.org: Examples for new Maxima
  behavior.
2011-11-08 13:40:23 -07:00
Eric Schulte 15a9eac67e isolating dangerous testing examples
* testing/examples/babel-dangerous.org: To house the dangerous.
* testing/examples/babel.org (an): Removed a trouble maker.
2011-09-16 09:52:34 -06:00
Sebastien Vauban cd05d152cf Add test checking that any variable declared with no default value will generate a proper error message. 2011-09-16 09:52:34 -06:00
Eric Schulte 7eaa67260b test the combination of code block results wrapper and type
* testing/examples/babel.org (an): Test the combination of code block
  results wrapper and type.
* testing/lisp/test-ob.el (test-org-babel/combining-scalar-and-raw-result-types):
  Test the combination of code block results wrapper and type.
2011-09-15 15:29:10 -06:00
Eric Schulte f1746a5118 test of comma stripping behavior
* testing/examples/org-exp.org: Example file for export tests.
* testing/lisp/test-org-exp.el (test-org-exp/stripping-commas): List
  file for export tests.
2011-09-06 21:58:51 -06:00
Martyn Jago 223ac13486 Inline source block and test fixes * lisp/ob.el: Fixed late night refactoring error * testing/examples/babel.org: whitespace * testing/lisp/test-ob.el: Fixed test-org-babel/inline-src-block-regexp (regression error) Renamed test-org-babel/parse-header-args2 since duplicate test heading Made test-org-babel/parse-header-args less brittle 2011-09-06 08:53:07 -06:00
Martyn Jago d7d052ec7c Bug fixes to inline source block execution triggering. * lisp/ob.el: Created org-babel-get-inline-src-block-matches() to fix problems with org-ctrl-c-ctrl-c not triggering inline src block execution when point is on or after a space within the inline src block body. Also fixed execution problems where inline src block is on buffer line 1. * testing/examples/babel.org: Test data for org-babel-get-inline-src-block-matches()
* testing/lisp/test-ob.el: Tests for
  org-babel-get-inline-src-block-matches()
2011-09-06 08:52:59 -06:00
Eric Schulte 14c635450a test inline src blocks
* testing/examples/babel.org (an): Adding example inline code blocks.
* testing/lisp/test-ob.el (test-org-babel/inline-src-blocks): Test
  inline code blocks.
2011-08-29 16:14:13 -06:00
Litvinov Sergey 6b6ab13810 Awk can be called with no in-file: and no :stdin 2011-07-24 14:05:55 -06:00
Litvinov Sergey c65df4aa01 ob-fortran.el: fix bug with string input, add ob-fortran tests with ert 2011-07-21 11:21:33 +02:00
Litvinov Sergey 2249abb8ad Add fortran to babel 2011-07-18 12:11:53 -06:00
Eric Schulte def5a2f567 test: updated babel tangling test to reflect body-parsing change 2011-07-15 09:31:36 -06:00
Eric Schulte c22c904718 test: adding simple regression test for table formula evaluation 2011-07-04 12:13:41 -06:00
Martyn Jago dacf18e80a ob-lilypond: test suite, all tests passing 2011-07-01 12:22:33 -07:00