Commit Graph

8834 Commits

Author SHA1 Message Date
Sebastien Vauban fefff8ec87 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 6844094edb Don't delete variable values when checking for assignment.
* lisp/ob.el (org-babel-get-src-block-info): Fixing bug, accidentally
  deleted variable values.
2011-09-16 09:52:34 -06:00
Eric Schulte b9922ba879 customizable processing of Org-mode text used as comments in tangled source-code files
* lisp/ob-tangle.el (org-babel-process-comment-text): Customizable
  function to process comment text.
  (org-babel-tangle-collect-blocks): Make use of new customizable
  processing function.
  (org-babel-spec-to-string): Call customizable function rather than
  `org-babel-trim'.
2011-09-16 09:52:34 -06:00
David Maus 37db5deea5 Fix check for feature Org mode
* org-test.el: Fix check for feature Org mode.
2011-09-16 06:48:16 +02:00
Eric Schulte 65d05b00b0 ob-R: don't process output when "scalar" or "verbatim"
* lisp/ob-R.el (org-babel-execute:R): Collect and pass along the
  result-params.
  (org-babel-R-evaluate): Accept result-params and if "scalar" or
  "verbatim" don't process output.
  (org-babel-R-evaluate-session): Accept result-params and if "scalar"
  or "verbatim" don't process output.
2011-09-15 15:43:35 -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 267015b24a differentiate between result types and wrappers
* lisp/ob.el (org-babel-merge-params): Differentiate between result
  types and wrappers.
2011-09-15 15:22:14 -06:00
Eric Schulte 11f07576cb Check that functional-syntax variables are initialized.
* lisp/ob.el (org-babel-get-src-block-info): Check that
  functional-syntax variables are initialized.
2011-09-15 09:24:29 -06:00
Eric Schulte f075ada9a1 Adding a note for a future enhancement.
* lisp/ob.el (org-babel-check-src-block): Adding a note for a future
  enhancement.
2011-09-15 09:11:12 -06:00
Jambunathan K e73bca63cf org-odt.el: Support for styling of tables using table templates
* contrib/lisp/org-odt.el (org-odt-table-style)
(org-odt-table-style-spec): New variables.
(org-export-odt-table-styles): New user-customizable variable.
(org-odt-begin-table): Init `org-odt-table-style' from the
attributes.
(org-odt-get-table-cell-styles): New function.
(org-odt-end-table): Use the above function.
(org-odt-get-style-name-for-table-cell): Removed.  Now folded
in to `org-odt-get-table-cell-styles'.
(org-odt-get-style-name-cookie-for-table-cell): Modified to
accommodate new user-defined styles.

Users now have the option of choosing Org's own way of styling or
using custom styling.
2011-09-14 14:56:30 +05:30
Carsten Dominik 11dec73c0c Merge branch 'master' of orgmode.org:org-mode 2011-09-14 08:54:53 +02:00
Carsten Dominik a3c3ff3fde Restore point when exporting a subtree
* lisp/org-exp.el (org-export): Restore point when exporting a subtree.
2011-09-14 07:48:49 +02:00
Eric Schulte 0037ef9261 more robust to code blocks with empty bodies
* lisp/ob.el (org-babel-parse-src-block-match): More robust to code
  blocks with empty bodies.
2011-09-13 09:36:03 -06:00
Eric Schulte 597e1eb4fe Don't error on empty code block body.
* lisp/ob.el (org-babel-parse-src-block-match): Don't error on empty
  code block body.
2011-09-13 08:57:29 -06:00
Eric Schulte dbf0e6d5bc fixed author information
* testing/lisp/test-ob-awk.el: Fixed author information.
* testing/lisp/test-ob-fortran.el: Fixed author information.
2011-09-12 10:42:22 -06:00
Martyn Jago fd1e005e33 Add missing FSF / author headers and org-test dependency to some test files * testing/lisp/test-ob-awk.el: * testing/lisp/test-ob-fortran.el: * testing/lisp/test-ob-lilypond.el: * testing/lisp/test-ob.el: * testing/lisp/test-org-exp.el: Add missing FSF / author headers and org-test dependency to some test files. 2011-09-12 10:39:45 -06:00
Martyn Jago 7f62b224af Remove jump.el dependency from test execution * testing/org-test.el: Remove jump.el dependency from test execution removing the need for a user to install git submodules 2011-09-12 10:37:25 -06:00
Jambunathan K c019c31bad Fix previous commit 2011-09-12 17:26:59 +05:30
Jambunathan K 488a2e378c Replace OrgOdtAutomaticStyles.xml with OrgOdtContentTemplate.xml
* contrib/odt/styles/OrgOdtAutomaticStyles.xml: Removed

* contrib/odt/styles/OrgOdtContentTemplate.xml: Added. This
file is now a fully-formed "content.xml" file but with "empty"
content. Note that the original "OrgOdtAutomaticStyles.xml"
was just an xml fragment.

* contrib/lisp/org-odt.el
(org-odt-document-content-header): Removed.
(org-export-odt-automatic-styles-file): Removed.
(org-export-odt-content-template-file): Renamed from
`org-export-odt-automatic-styles-file'.
(org-odt-data-dir): Update docstring.
(org-odt-begin-office-body, org-odt-begin-document-content):
Modified to accomodate changes introduced by the new
"OrgOdtContentTemplate.xml" file.
2011-09-12 17:19:14 +05:30
Eric Schulte f1fcc592fd re-wrapped test to prevent failure during batch execution
* testing/lisp/test-ob.el (test-org-babel/inline-src-blocks):
  Re-wrapped test to prevent failure during batch execution.
2011-09-11 14:43:32 -06:00
Eric Schulte f78f29ebea all tests should now pass on Emacs23
* testing/lisp/test-ob.el (test-org-babel/org-babel-get-inline-src-block-matches):
  All tests should now pass on Emacs23.
2011-09-11 14:19:02 -06:00
David Maus 4122a51366 Unescape plain link before open
* org.el (org-open-at-point): Unescape plain link.

This should fix a problem with open plain links reported by
Sebastien Vauban.
2011-09-11 16:51:23 +02:00
David Maus 5a373f649e Remove unnecessary link unescape
* org-html.el (org-html-handle-links): Remove unnecessary link
unescape.

PATH is already unescaped and should never be escaped twice. Big
thanks to Jambunathan K for analyzing the problem.
2011-09-11 16:50:43 +02:00
Eric Schulte bae8dfed77 Better Org-mode initialization for batch tests.
Thanks to Martyn Jago for this patch.

* testing/org-test.el (org-test-dir): Better Org-mode initialization
  for batch tests.
2011-09-09 14:31:06 -06:00
Martyn Jago 8fb588d4d3 * testing/lisp/test-ob.el: Fixed typo 2011-09-09 14:31:06 -06:00
Martyn Jago bb0b9709ef * testing/lisp/test-ob.el: More tests for inline source blocks execution via org-ctrl-c-ctrl-c 2011-09-09 14:31:05 -06:00
Bastien Guerry 28ae6b4de1 Revert "org.el (org-fixup-indentation): Correctly indent meta lines."
This reverts commit 6b04befa48.
2011-09-09 19:47:41 +02:00
Jambunathan K 16333d4a53 org-lparse.el: Rename table routines
* contrib/lisp/org-lparse.el (org-lparse-insert-org-table):
Renamed from `org-lparse-do-format-org-table'.
(org-lparse-insert-list-table): Renamed from
`org-lparse-do-format-list-table.
(org-lparse-insert-table-table): Renamed from
`org-lparse-do-format-table-table'.
(org-lparse-insert-org-table, org-lparse-format-org-table)
(org-lparse-format-list-table, org-lparse-format-table-table):
Propagate above renamings.

* contrib/lisp/org-odt.el
(org-export-odt-do-format-numbered-formula): Propagate above
renamings.

Maintain a clear distinction between format and insert behaviours.
2011-09-09 00:38:31 +05:30
Jambunathan K ab757f9a24 org-odt.el: Set mathml option
* contrib/lisp/org-odt.el
(org-export-odt-do-preprocess-latex-fragments): Pass 'mathml
option to `org-format-latex'.
2011-09-09 00:26:19 +05:30
Eric Schulte a4e881207d better error message for unassigned variables
* lisp/ob.el (org-babel-merge-params): Better error message for
  unassigned variables.
2011-09-08 11:44:49 -06:00
Jambunathan K be69dd2d50 org-odt.el: Embed links to mathml files as ODF formula
* contrib/lisp/org-odt.el
(org-odt-embedded-formulas-count):New variable.
(org-odt-init-outfile): Reset above variable.
(org-odt-is-formula-link-p, org-odt-format-inline-formula)
(org-odt-copy-formula-file, org-export-odt-format-formula)
(org-export-odt-do-format-formula)
(org-export-odt-do-format-numbered-formula): New functions for
formatting mathml file links as embedded ODF formulae.
(org-odt-format-org-link): Add check for links to mathml files
and call `org-odt-format-inline-formula'.
(org-export-odt-format-image): Update function signature.  Use
`org-latex-src' property to identify latex dvipng images.  Use
the (to be committed) `org-latex-src-embed-type' to identify
whether the equation image should be inlined or displayed.
(org-odt-format-textbox): Modified to accomodate correct
formatting of captioned formula.
(org-odt-format-inlinetask): Modified to accomodate changes to
the previous function.
(org-export-odt-do-format-image): Minor change.
(org-export-odt-do-preprocess-latex-fragments): When LaTeX
fragment option is set to `t' or `mathjax' check for
availability of latex to mathml converter using (to be
committed) `org-format-latex-mathml-available-p'.  If such a
converter is available and configured, use it.  Otherwise
default to the earlier behaviour.

Refer the following post for more information:
http://article.gmane.org/gmane.emacs.orgmode/46712
2011-09-08 21:14:11 +05:30
Eric Schulte 5b98dfb644 adding function for batch test evaluation
* testing/org-test.el (org-test-run-batch-tests): Allows for batch
  evaluation of the Org-mode test suite.
2011-09-08 09:11:50 -06:00
Jambunathan K 86409e89c0 org-odt.el: Sanitize formatting of Images
* contrib/lisp/org-odt.el (org-odt-format-frame): New.
(org-odt-format-textbox): Use the above function.
(org-export-odt-do-format-image): Use the above two functions.
Use the new custom styles for the Frame and Graphics elements.
(org-odt-image-attrs-from-size): Remove this.

* contrib/odt/styles/OrgOdtAutomaticStyles.xml: Removed all
Frame and Graphics entries.

* contrib/odt/styles/OrgOdtStyles.xml: Added following custom
styles - OrgSimpleGraphics, OrgCaptionedGraphics,
OrgCaptionFrame, OrgInlineGraphics and OrgInlineFormula.
2011-09-08 18:56:08 +05:30
Christian Egli 2178b63545 Merge branch 'master' of orgmode.org:org-mode 2011-09-07 15:45:40 +02:00
Christian Egli 14304f6dcd taskjuggler export: take buffer local variables into account
* org-taskjuggler.el (org-export-as-taskjuggler): Clone the
buffer local variables to the temporary buffer before
exporting.

The taskjuggler exporter handles properties. When defining buffer
local priorities the export fails however, as buffer local variables
are not taken into account since the export happens in a new temporary
buffer. This commit fixes that by cloning the relevant buffer local
variables into the temporary buffer before exporting.
2011-09-07 15:45:14 +02: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
Eric Schulte d0a3a3870f org-exp: only remove commas on the front line of a code block
* lisp/org-exp.el (org-export-select-backend-specific-text): Only
  remove commas on the front line of a code block.
2011-09-06 21:52:17 -06:00
Jambunathan K 0dd10f5d97 org-odt.el: Format date strings in meta.xml using portable means
* contrib/lisp/org-odt.el (org-odt-format-date): %:z format
specifier of `format-time-string' is not portable.  Replace it
with an equivalent implementation using %z specifier.

Thanks to Anton Tarasenko for reporting this bug and verifying
this fix.  See
http://lists.gnu.org/archive/html/emacs-orgmode/2011-09/msg00099.html
2011-09-06 23:45:25 +05:30
Jambunathan K 6b955077dc org-odt.el: Rework embedding of images
* contrib/lisp/org-odt.el (org-odt-embedded-images-count): New
variable.
(org-odt-copy-image-file): Use the above variable to name the
embedded image files. Remove some cruft as well.
(org-export-odt-file-list, org-export-odt-save-list): Removed.
(org-odt-init-outfile, org-odt-save-as-outfile): Related changes.
2011-09-06 23:09:08 +05:30
Eric Schulte f0d139adfa correctly resolving load-path in testing files
* testing/lisp/test-org.el (testing-lisp-dir): Require all files with
  load-path set.
* testing/lisp/test-ob-lob.el (expand-file-name): Relative load path.
* testing/lisp/test-ob-fortran.el (load-path): Relative load path.
2011-09-06 11:12:29 -06:00
David Maus fe77c66741 Use `string=' to compare strings
* org-elisp-symbol.el (org-elisp-symbol-store-link): Use `string=' to
compare strings.

(let ((foo "foo"))
  (eq foo "foo")) => nil
2011-09-06 18:11:55 +02:00
Eric Schulte 09986fa395 commenting out single failing test
* testing/lisp/test-ob-fortran.el: Commenting out single failing test.
2011-09-06 09:09:09 -06:00
Eric Schulte 966ec3f1f1 ensure all tests have unique names
* testing/lisp/test-ob-exp.el (test-ob-exp/org-babel-exp-src-blocks/w-no-headers2):
  Renamed to be unique.
2011-09-06 09:07:00 -06:00
Eric Schulte 242a928646 removing test: shouldn't test a variables value, should test its functionality
* testing/lisp/test-ob.el (test-org-babel/get-header): Removing a
  test, shouldn't test a variables value, should test its
  functionality.
2011-09-06 08:57:10 -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
Jambunathan K 933e508e05 org-odt.el: Create and update manifest.xml towards end of export
* contrib/lisp/org-odt.el (org-export-odt-manifest-lines):
Removed.
(org-odt-update-manifest-file): Removed.
(org-odt-create-manifest-file-entry)
(org-odt-write-manifest-file): New function.
(org-odt-manifest-file-entries): New variable.
(org-odt-manifest-file-entry-tag): Updated.
(org-odt-init-outfile): Don't create manifest.xml here.  Don't
create Pictures directory so early in the export.  Reset
`org-odt-manifest-file-entries'.
(org-odt-save-as-outfile): Modified.  Use
`org-odt-create-manifest-file-entry' and
`org-odt-write-manifest-file'.
(org-odt-copy-image-file, org-odt-update-meta-file)
(org-odt-copy-styles-file): Use
`org-odt-create-manifest-file-entry'.

Rationalized creation of Manifest file entries.  New entries are
created right at the point where new files are added to the odt file.
2011-09-05 23:30:14 +05:30
Jambunathan K 0c48918be5 org-odt.el: Trivial cleanup
* contrib/lisp/org-odt.el (org-export-odt-nosave-list): Remove
a useless variable.
(org-odt-init-outfile): Propagate above change.
2011-09-05 12:04:06 +05:30
Jambunathan K 82cf5d59e7 org-odt.el: Create mimetype file towards the end of export
* contrib/lisp/org-odt.el (org-odt-init-outfile): Don't create
mimetype file here.
(org-odt-save-as-outfile): Create mimetype file here.  Note
that this routine gets called towards the end of the export
just before files are zipped.
2011-09-05 12:03:55 +05:30
Jambunathan K c08183d043 org-odt.el: Create and update meta.xml towards end of the export
* contrib/lisp/org-odt.el
(org-odt-init-outfile): Don't create meta.xml here.
(org-odt-update-meta-file): Create and update meta.xml here
instead.  Note that this routine gets called just before the
component files are zipped.
(org-export-odt-meta-lines): Remove it. Not needed any longer.
(org-odt-save-as-outfile): No need to create backup files
while saving xml buffers.
2011-09-05 12:03:10 +05:30