emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ODT Export does not seem to recognise org-export-default-language
@ 2011-07-20 10:03 Rainer Stengele
  2011-07-20 13:19 ` Jambunathan K
  0 siblings, 1 reply; 4+ messages in thread
From: Rainer Stengele @ 2011-07-20 10:03 UTC (permalink / raw)
  To: emacs-orgmode

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.
Export of the same subtree to HTML does recognise the setting and produce a german
translation of "table of contents". DOT export sticks with "table of contents".

Org-mode version 7.6 (release_7.6.129.gfe0c)

does somebody else use a non "en" export and experience the same?

- Rainer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ODT Export does not seem to recognise org-export-default-language
  2011-07-20 10:03 ODT Export does not seem to recognise org-export-default-language Rainer Stengele
@ 2011-07-20 13:19 ` Jambunathan K
  2011-07-20 19:22   ` Jambunathan K
  0 siblings, 1 reply; 4+ messages in thread
From: Jambunathan K @ 2011-07-20 13:19 UTC (permalink / raw)
  To: Rainer Stengele; +Cc: emacs-orgmode


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.
> Export of the same subtree to HTML does recognise the setting and produce a german
> translation of "table of contents". DOT export sticks with "table of
> contents".

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.

As a temporary workaround, you can rebuild the indices (and hence TOC)
with Tools->Update->Update All from OpenOffice UI.

Jambunathan K.

>
> Org-mode version 7.6 (release_7.6.129.gfe0c)
>
> does somebody else use a non "en" export and experience the same?
>
> - Rainer
>
>
>

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ODT Export does not seem to recognise org-export-default-language
  2011-07-20 13:19 ` Jambunathan K
@ 2011-07-20 19:22   ` Jambunathan K
  2011-07-21  9:18     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Jambunathan K @ 2011-07-20 19:22 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

Jambunathan K <kjambunathan@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.



[-- Attachment #2: 0001-org-lparse-Update-docstring-of-org-lparse-debug.patch --]
[-- Type: text/plain, Size: 1774 bytes --]

From 6877ee1c53fddd7bd04c15acd56b768856ae1670 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@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


[-- Attachment #3: 0002-org-odt-Simplify-org-odt-format-org-entity.patch --]
[-- Type: text/plain, Size: 1132 bytes --]

From 90cb47ff00c667ec499bc32f0b56fa2f48b79de2 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@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


[-- Attachment #4: 0003-org-odt-Use-lang-specific-value-for-Table-Of-Content.patch --]
[-- Type: text/plain, Size: 1181 bytes --]

From 0fcc4a6d4158355ac4e8c0127db6ec794b133f33 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: ODT Export does not seem to recognise org-export-default-language
  2011-07-20 19:22   ` Jambunathan K
@ 2011-07-21  9:18     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2011-07-21  9:18 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode

Jambunathan K <kjambunathan@gmail.com> writes:

> I am attaching 3 patches. Patches 1 & 2 are misc improvements. Patch 3
> fixes the above issue.

Tested.  I confirm the fix.  I applied the three patches.

Thanks a lot!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-21  9:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20 10:03 ODT Export does not seem to recognise org-export-default-language Rainer Stengele
2011-07-20 13:19 ` Jambunathan K
2011-07-20 19:22   ` Jambunathan K
2011-07-21  9:18     ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).