From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: ODT Export does not seem to recognise org-export-default-language Date: Thu, 21 Jul 2011 00:52:37 +0530 Message-ID: <81livs92pu.fsf@gmail.com> References: <814o2h3x9n.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjcMH-0004Mi-PQ for emacs-orgmode@gnu.org; Wed, 20 Jul 2011 15:23:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjcME-0005IK-Mq for emacs-orgmode@gnu.org; Wed, 20 Jul 2011 15:23:00 -0400 Received: from mail-pz0-f49.google.com ([209.85.210.49]:58357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjcME-0004vc-0z for emacs-orgmode@gnu.org; Wed, 20 Jul 2011 15:22:58 -0400 Received: by pzk33 with SMTP id 33so677671pzk.8 for ; Wed, 20 Jul 2011 12:22:54 -0700 (PDT) In-Reply-To: <814o2h3x9n.fsf@gmail.com> (Jambunathan K.'s message of "Wed, 20 Jul 2011 18:49:16 +0530") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Jambunathan K 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. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0001-org-lparse-Update-docstring-of-org-lparse-debug.patch Content-Description: 0001-org-lparse-Update-docstring-of-org-lparse-debug.patch >From 6877ee1c53fddd7bd04c15acd56b768856ae1670 Mon Sep 17 00:00:00 2001 From: Jambunathan K 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 --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0002-org-odt-Simplify-org-odt-format-org-entity.patch Content-Description: 0002-org-odt-Simplify-org-odt-format-org-entity.patch >From 90cb47ff00c667ec499bc32f0b56fa2f48b79de2 Mon Sep 17 00:00:00 2001 From: Jambunathan K 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\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 --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=0003-org-odt-Use-lang-specific-value-for-Table-Of-Content.patch Content-Description: 0003-org-odt-Use-lang-specific-value-for-Table-Of-Content.patch >From 0fcc4a6d4158355ac4e8c0127db6ec794b133f33 Mon Sep 17 00:00:00 2001 From: Jambunathan K 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." " level level))) - (insert " + (insert + (format " - Table of Contents + %s -")) +" lang-specific-heading))) (defun org-odt-end-toc () (insert " -- 1.7.2.3 --=-=-=--