Commit Graph

73 Commits

Author SHA1 Message Date
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry 1b4e396b6b Merge branch 'maint-fixes' into maint 2012-12-24 14:01:25 +01:00
Bastien Guerry 58999598ed New compatibility function `org-delete-directory'
* org-compat.el (org-delete-directory): New compatibility
function for Emacs 22, where `delete-directory' does not
support recursive deletion.

* org-odt.el (org-odt-cleanup-xml-buffers): Use the new
compatibility function.

Thanks to Achim and Jambunathan for suggesting this.
2012-12-24 13:51:48 +01:00
Jambunathan K 7ab4464ea4 org-odt.el: Fix Emacs Bug#13254
* lisp/org-odt.el (org-export-as-odt-batch): Init
`org-odt-zip-dir'.  Fix Emacs Bug#13254.
2012-12-23 12:42:43 +01:00
Jambunathan K b495c92239 org-odt.el: Correctly format link to headlines that have description
* lisp/org-odt.el (org-odt-format-org-link): Add check for
presence of description in headline links.

Fix
http://lists.gnu.org/archive/html/emacs-orgmode/2012-11/msg00841.html
2012-12-23 12:42:43 +01:00
Bastien Guerry de84aadf8f org-odt.el: Fix Emacs bug #13197.
* org-odt.el (org-odt-cleanup-xml-buffers): Fix Emacs
Bug#13197 by setting the correct buffer before marking it
unmodified to silently kill him.

Thanks to Drew Adams for reporting this and to Jambunathan for
offering to fix it.
2012-12-20 16:06:25 +01:00
Achim Gratz b47a7d5125 refer to libraries only by name
* contrib/lisp/org-e-odt.el: Replace arc-mode.el -> arc-mode.
* lisp/org-odt.el: Replace arc-mode.el -> arc-mode.
* lisp/org.el: Replace org-macs.el -> org-macs.
2012-10-07 18:11:25 +02:00
Bastien Guerry 21478e1733 Revert "org-odt.el (and org-e-odt.el): Simplify the way style/schema files are found"
This reverts commit d042e3add1.
2012-10-03 12:13:47 +02:00
Bastien Guerry 1a029166a7 Revert "Fix compiler warnings introduced in commit d042e3a."
This reverts commit 79e907fd8c.
2012-10-03 12:13:26 +02:00
Bastien Guerry 156b42e4f2 Revert "org-odt.el (org-odt-styles-dir): Try more directories"
This reverts commit fc8ad1347e.
2012-10-03 12:13:07 +02:00
Bastien Guerry fc8ad1347e org-odt.el (org-odt-styles-dir): Try more directories
* org-odt.el (org-odt-styles-dir): Try more directories.
Don't throw an error, just send a message.

Thanks to Nick Dokos for reporting this.
2012-10-03 10:30:40 +02:00
Bastien Guerry 79e907fd8c Fix compiler warnings introduced in commit d042e3a. 2012-10-02 17:57:51 +02:00
Bastien Guerry d042e3add1 org-odt.el (and org-e-odt.el): Simplify the way style/schema files are found
* org-odt.el (org-odt-lib-dir, org-odt-data-dir)
(org-odt-schema-dir-list, org-odt-styles-dir-list): Delete.
(org-export-odt-schema-dir, org-odt-styles-dir): Infer the
correct directories without requiring other variables.

* org-fixup.el (org-make-org-version, org-make-autoloads):
Don't define `org-odt-data-dir' in org-version.el.

* contrib/lisp/org-e-odt.el (org-e-odt-lib-dir, org-e-odt-data-dir)
(org-e-odt-schema-dir-list, org-e-odt-styles-dir-list): Delete.
(org-e-odt-schema-dir, org-e-odt-styles-dir): Infer the
correct directories without requiring other variables.
2012-10-02 14:47:04 +02:00
Bastien Guerry e4c31cf98b Use generated-autoload-file: "org-loaddefs.el" as a local variable. 2012-10-02 08:50:46 +02:00
Bastien Guerry 222eae4033 Fix error messages: don't use a dot at the end 2012-09-28 17:47:48 +02:00
Abdó Roig-Maranges cb34324a82 Fix the ltxpng path for HTML and ODT exporters
* org-html.el (org-export-html-preprocess)
(org-export-html-format-image): Use
`org-latex-preview-ltxpng-directory'.

* org-odt.el (org-export-odt-do-preprocess-latex-fragments):
Ditto.

Commit 8474115b20 breaks LaTeX
image exports as HTML and ODT.  This fixes it.
2012-09-14 09:38:10 +02:00
Jambunathan K 7de1b14465 org-odt.el: Replace `copy-seq' with `copy-sequence' 2012-09-04 23:56:02 +05:30
Jambunathan K 256bb29780 org-odt.el: Open OpenDocument files in os-specific way
* lisp/org-lparse.el (org-lparse-and-open)
(org-lparse-do-convert): Open exported files with
system-specific application.

* lisp/org-odt.el: Don't meddle with `org-file-apps'.
2012-09-03 20:23:33 +05:30
Jambunathan K 8a0abc4dc2 org-export-odt-preferred-output-format: Mark string values as safe 2012-09-01 23:59:21 +05:30
Bastien Guerry 8393a76f78 Always use the compatibility function `org-region-active-p'
* org.el (org-create-math-formula): Use the compatibility
function `org-region-active-p'.

* org-odt.el (org-export-as-odf): Ditto.

* ob.el (org-babel-demarcate-block): Ditto.
2012-08-20 05:45:25 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Jambunathan K f4148cf525 Merge origin/maint 2012-07-19 19:29:24 +05:30
Jambunathan K 137cd87e4d org-odt.el: Replace `flet' with equivalent construct
* lisp/org-odt.el (org-odt-do-image-size): Replace `flet' with
equivalent construct.
2012-07-19 19:04:14 +05:30
Bastien Guerry 7cc0eda245 New alias `org-condition-case-unless-debug'.
* org-odt.el (org-odt-cleanup-xml-buffers): Use the new alias.

* org-compat.el: Alias `org-condition-case-unless-debug' to
`condition-case-unless-debug' or `condition-case-no-debug'.
2012-07-19 19:00:12 +05:30
Bastien Guerry 1fe42fd0bc New alias `org-condition-case-unless-debug'.
* org-odt.el (org-odt-cleanup-xml-buffers): Use the new alias.

* org-compat.el: Alias `org-condition-case-unless-debug' to
`condition-case-unless-debug' or `condition-case-no-debug'.
2012-07-12 10:30:33 +02:00
Jambunathan K 963b1c53bb Merge remote-tracking branch 'origin/maint' 2012-07-12 00:59:52 +05:30
Jambunathan K 73165e8ba5 org-odt.el: Use `condition-case-no-debug'
* lisp/org-odt.el (org-odt-cleanup-xml-buffers): Use
`condition-case-no-debug' instead of
`condition-case-unless-debug'.  This ensures backward
compatibility with Emacs versions < 24.1.
2012-07-12 00:57:36 +05:30
Jambunathan K 3cb38b0024 Merge remote-tracking branch 'origin/maint' 2012-07-01 16:13:44 +05:30
Jambunathan K af6cb0bd35 org-odt.el: Cleanup temporary XML buffers after export
* lisp/org-odt.el (org-odt-zip-dir)
(org-odt-cleanup-xml-buffers): New.
(org-export-as-odt-and-open, org-export-as-odt)
(org-odt-init-outfile, org-odt-save-as-outfile)
(org-export-as-odf, org-export-as-odf-and-open): Use
`org-odt-cleanup-xml-buffers'.
2012-07-01 16:10:17 +05:30
Jambunathan K 86ce84643e org-odt.el: Add default character style
* lisp/org-odt.el (org-export-odt-default-org-styles-alist):
Add default character style.
2012-06-28 19:53:23 +05:30
Jambunathan K 55a85c80ad org-odt.el: Add default character style
* lisp/org-odt.el (org-export-odt-default-org-styles-alist):
Add default character style.
2012-06-28 19:51:29 +05:30
Jambunathan K 610a00ce2a Merge remote-tracking branch 'origin/maint' 2012-05-25 19:04:02 +05:30
Jambunathan K 35b9556cc3 org-odt.el: Fix previous commit
* lisp/org-odt.el (org-odt-init-outfile): Fix previous commit.
Make sure that nxml-mode is loaded before let-binding
`nxml-auto-insert-xml-declaration-flag'.
2012-05-25 19:02:33 +05:30
Jambunathan K d4b3c199f3 Merge remote-tracking branch 'origin/maint' 2012-05-24 21:45:28 +05:30
Jambunathan K 1e811161c5 org-odt.el: Fix corruption due to multiple XML declarations
* lisp/org-odt.el (org-odt-init-outfile)
(org-odt-write-manifest-file): Disable
`nxml-auto-insert-xml-declaration-flag'.

* lisp/org-lparse.el (org-do-lparse): Don't trigger auto-mode
processing.

Guard against insertion of multiple XML declarations within
component XML files when
`nxml-auto-insert-xml-declaration-flag' is on.

Fixes bug
http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00510.html.
2012-05-24 21:41:38 +05:30
Bastien Guerry 6732d633af Make (org-version) always returns a string, use it in exporters.
* org.el (org-version): When called non-interactively, insert
the short version string, otherwise send a message with the
complete version string.

* org-odt.el (org-odt-update-meta-file): Use (org-version) and
delegate checking whether `org-version' is known as a variable
there.

* org-html.el (org-export-as-html): Use (org-version).

* org-docbook.el (org-export-as-docbook): Ditto.

* org-latex.el (org-export-latex-make-header): Ditto.
2012-04-29 12:17:00 +02:00
Jambunathan K 4908ea99ed org-odt.el: Provide for non-availability of `org-version'
* lisp/org-odt.el (org-odt-update-meta-file): Check for
`org-version' is bound before accessing it.
2012-04-26 01:22:04 +05:30
Jambunathan K eef6444ac0 org-odt.el (org-odt-schema-dir-list): Adjust search path
* lisp/org-odt.el (org-odt-schema-dir-list): OD Schema files
have been moved away from $(git-root)/contrib/odt/etc/schema/
to $(git-root)/etc/schema/.
2012-04-22 23:48:36 +05:30
Jambunathan K fef07abefb org-odt.el: Fix handling of internal links
* lisp/org-odt.el (org-odt-format-org-link): Pay no heed to
whether the internal links destined for headlines provide a
description or not.  In fact, the `org-store-link' and
`org-insert-link' create internal links which do have a
description.

This fixes an issue where internal links terminating at an
invisible target (that is bound to a headline) was badly
rendered.  Refer following thread:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00757.html
2012-04-21 12:11:40 +02:00
Jambunathan K 3f427d92c8 Merge remote-tracking branch 'origin/hotfix-7.8.06' 2012-04-20 23:15:06 +05:30
Jambunathan K 7d4e7a8763 org-odt.el: Fix handling of internal links
* lisp/org-odt.el (org-odt-format-org-link): Pay no heed to
whether the internal links destined for headlines provide a
description or not.  In fact, the `org-store-link' and
`org-insert-link' create internal links which do have a
description.

This fixes an issue where internal links terminating at an
invisible target (that is bound to a headline) was badly
rendered.  Refer following thread:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00757.html
2012-04-20 22:46:09 +05:30
Jambunathan K 8a02f48547 org-odt.el: Consider short captions not as org text but as plain text
* lisp/org-lparse.el (org-lparse-insert-org-table): Consider
short caption as plain text and not as org text.
* lisp/org-odt.el (org-export-odt-format-formula)
(org-export-odt-format-image): ditto.

Fixes earlier checkin.  See
http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg01212.html

Handling of short captions is only a convenience feature.

From within LibreOffice one can always create an "unprotected"
editable index and later manually delete unwanted index entries (for
example, delete uncaptioned entries which are given automatic names)
or modify existing entries (for example, fix long captions to their
short versions).
2012-03-31 02:03:10 +05:30
Jambunathan K 67694297fa org-odt.el: Honor short caption for table, figure etc
* lisp/org-odt.el (org-odt-begin-table)
(org-export-odt-format-formula, org-export-odt-format-image)
(org-odt-format-entity): Handle short caption.
* lisp/org-lparse.el (org-lparse-insert-org-table)
(org-lparse-insert-list-table, org-lparse-insert-table-table):
Ditto.

Handle short caption for tables, figures and formulae.
  #+CAPTION: [Caption for index entry]{Regular caption.}

Fix for bug
http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg01169.html
2012-03-30 00:52:02 +05:30
Bastien Guerry 5197a7c8fb Silent compiler by moving `org-odt-entity-labels-alist' up in the file. 2012-03-23 22:12:07 +01:00
Jambunathan K 34ab9a0eb2 org-odt.el: Enumerate labeled/captioned entities correctly
* lisp/org-odt.el (org-odt-format-entity-caption): Enumerate
entities that have either a caption or a label.
(org-odt-label-styles, org-odt-category-map-alist): Add a
separator between sequence number and caption.  Introduced two
new label styles for handling of math formula and math label.
(org-odt-format-label-definition)
(org-export-odt-format-formula): Propagate above changes.
2012-03-21 15:21:10 +05:30
Jambunathan K fee7de7c56 org-odt.el: Make category component of captions configurable
* lisp/org-odt.el (org-export-odt-category-strings): New
custom variable.
(org-odt-category-map-alist): Modify interpretation.  Don't
use the same field to double up as both a OpenDocument
variable and a category string.  Entries in this list now
specify only the OpenDocument variable.  Category strings are
obtained through an indirect lookup of
`org-export-odt-category-strings'.  Use same OpenDocument
variables as what LibreOffice uses for various entities.  Fix
docstring.
(org-odt-add-label-definition)
(org-odt-format-label-definition)
(org-odt-format-label-reference): Propagate above changes.

Fix for the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-03/msg00628.html
2012-03-20 23:26:12 +05:30
Jambunathan K aa05c14fe9 org-odt.el: Remove stale code
* lisp/org-odt.el (org-odt-category-map-alist): Update
docstring.
(org-export-odt-user-categories)
(org-export-odt-get-category-from-label)
(org-odt-get-label-category-and-style): Remove.
(org-odt-add-label-definition): Propagate above changes.
2012-03-20 21:11:21 +05:30
Jambunathan K d3cd3720d5 org-odt.el: Resolve headline links as sec nos only if num:t
* lisp/org-odt.el (org-odt-format-org-link): Resolve links to
headlines as section numbers only if section numbering is on.
2012-03-20 19:58:40 +05:30
Jambunathan K 4120d6fcf7 org-odt.el: Render links to outline headings as section nos
* lisp/org-lparse.el (org-do-lparse): Make effective setting
of `org-export-headline-levels' available to the ODT exporter.
Also remove some stale comments.

* lisp/org-odt.el (org-odt-format-link): Add support for
generating cross-references to chapter numbers.
(org-odt-format-org-link): Resolve links to outline headings
as section numbers.  This special case resolution kicks in
only if the Org link has no description and the target outline
is not listified i.e., it is at a level within
`org-export-headline-levels'.

Fix for the following request:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg01035.html

The above change is in conformity with the way links to
headlines will be treated in new ODT exporter that will be
built on top of Nicolas' org-element/org-export
infrastructure.
2012-03-20 13:32:23 +05:30
Jambunathan K c983bc2400 Fix ODT validation failures with French and other languages
* lisp/org-odt.el (org-odt-begin-toc): Handle named HTML
entities in per-language string for "Table Of Contents".

Fix for the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2011-07/msg00486.html
2012-03-20 13:02:02 +05:30