Jambunathan K <kjambunat...@gmail.com> writes: > Hello Rainer > >> Hi! >> >> Exporting an org file via C-c C-e O to an ODT file does not seem to >> recognise the >> org-export-default-language setting.
> I can confirm the bug and I have a fix for this issue. I will include > the fix in the next set of patches which I plan to submit in another few > hours. I am attaching 3 patches. Patches 1 & 2 are misc improvements. Patch 3 fixes the above issue. Jambunathan K.
>From 6877ee1c53fddd7bd04c15acd56b768856ae1670 Mon Sep 17 00:00:00 2001 From: Jambunathan K <kjambunat...@gmail.com> Date: Wed, 20 Jul 2011 15:02:53 +0530 Subject: [PATCH 1/3] org-lparse: Update docstring of org-lparse-debug * contrib/lisp/org-lparse.el (org-lparse-debug): Improve docstring. --- contrib/lisp/org-lparse.el | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/contrib/lisp/org-lparse.el b/contrib/lisp/org-lparse.el index 7665591..c96ec84 100755 --- a/contrib/lisp/org-lparse.el +++ b/contrib/lisp/org-lparse.el @@ -1595,9 +1595,24 @@ the alist of previous items." (defvar org-lparse-output-buffer) (defcustom org-lparse-debug nil - "Turn on/off debugging for `org-lparse'." - :type 'boolean - :group 'org-lparse) + "Enable or Disable logging of `org-lparse' callbacks. +The parameters passed to the backend-registered ENTITY-CONTROL +and ENTITY-FORMAT callbacks are logged as comment strings in the +exported buffer. (org-lparse-format 'COMMENT fmt args) is used +for logging. Customize this variable only if you are an expert +user. Valid values of this variable are: +nil : Disable logging +control : Log all invocations of `org-lparse-begin' and + `org-lparse-end' callbacks. +format : Log invocations of `org-lparse-format' callbacks. +t : Log all invocations of `org-lparse-begin', `org-lparse-end' + and `org-lparse-format' callbacks," + :group 'org-lparse + :type '(choice + (const :tag "Disable" nil) + (const :tag "Format callbacks" format) + (const :tag "Control callbacks" control) + (const :tag "Format and Control callbacks" t))) (defun org-lparse-begin (entity &rest args) "Begin ENTITY in current buffer. ARGS is entity specific. -- 1.7.2.3
>From 90cb47ff00c667ec499bc32f0b56fa2f48b79de2 Mon Sep 17 00:00:00 2001 From: Jambunathan K <kjambunat...@gmail.com> Date: Wed, 20 Jul 2011 15:44:12 +0530 Subject: [PATCH 2/3] org-odt: Simplify org-odt-format-org-entity * contrib/lisp/org-odt.el (org-odt-format-org-entity): Simplify. Component xml files in odt document are always utf-8 encoded. As a result, emitting of numeric character references based on utf-8 value is superfluous. --- contrib/lisp/org-odt.el | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el index bd2ea33..e0790de 100644 --- a/contrib/lisp/org-odt.el +++ b/contrib/lisp/org-odt.el @@ -771,9 +771,7 @@ PUB-DIR is set, use this as the publishing directory." (format "\n<!-- %s -->\n" comment))) (defun org-odt-format-org-entity (wd) - ;; FIXME: Seems to work. But is this correct? - (let ((s (org-entity-get-representation wd 'utf8))) - (and s (format "&#x%x;" (string-to-char s))))) + (org-entity-get-representation wd 'utf8)) (defun org-odt-fill-tabs-and-spaces (line) (replace-regexp-in-string -- 1.7.2.3
>From 0fcc4a6d4158355ac4e8c0127db6ec794b133f33 Mon Sep 17 00:00:00 2001 From: Jambunathan K <kjambunat...@gmail.com> Date: Wed, 20 Jul 2011 19:07:23 +0530 Subject: [PATCH 3/3] org-odt: Use lang specific value for "Table Of Contents" * contrib/lisp/org-odt.el (org-odt-begin-toc): Use lang specific value for "Table Of Contents". --- contrib/lisp/org-odt.el | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el index e0790de..ea4e32b 100644 --- a/contrib/lisp/org-odt.el +++ b/contrib/lisp/org-odt.el @@ -691,14 +691,15 @@ PUB-DIR is set, use this as the publishing directory." </text:table-of-content-entry-template> " level level))) - (insert " + (insert + (format " </text:table-of-content-source> <text:index-body> <text:index-title text:style-name=\"Sect1\" text:name=\"Table of Contents1_Head\"> - <text:p text:style-name=\"Contents_20_Heading\">Table of Contents</text:p> + <text:p text:style-name=\"Contents_20_Heading\">%s</text:p> </text:index-title> -")) +" lang-specific-heading))) (defun org-odt-end-toc () (insert " -- 1.7.2.3