emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: ODT Export does not seem to recognise org-export-default-language
Date: Thu, 21 Jul 2011 00:52:37 +0530	[thread overview]
Message-ID: <81livs92pu.fsf@gmail.com> (raw)
In-Reply-To: <814o2h3x9n.fsf@gmail.com> (Jambunathan K.'s message of "Wed, 20 Jul 2011 18:49:16 +0530")

[-- 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


  reply	other threads:[~2011-07-20 19:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2011-07-21  9:18     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81livs92pu.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).