emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: suvayu ali <fatkasuvayu+linux@gmail.com>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Org-odt fails to export when inline tasks are present
Date: Sat, 06 Aug 2011 20:32:53 +0530	[thread overview]
Message-ID: <81vcua60rm.fsf@gmail.com> (raw)
In-Reply-To: <CAMXnza1E4At0vie-6JFRuaGkWHONqprx0d_p=uLwrrQHeM7YAw@mail.gmail.com> (suvayu ali's message of "Sat, 6 Aug 2011 13:41:54 +0200")

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


Hello Suvayu

> Hi Jambunathan,
>
> Exporting to org-odt fails if my org file has inline tasks and
> org-inlinetask is already loaded. To reproduce the bug with the attached
> org file you can do the following:

Looks like I need to create an entry in

C-h v org-inlinetask-export-templates.

Till such time as that happens, the attached patch would strip inline
tasks from odt export. i.e., the exporter will behave as though
org-inlinetask-export is set to nil for the purpose of odt export.

NOTE TO THE MAINTAINERS: git diff is forcibly creating the first hunk in
the attached diff even though I haven't made any modifications as
suggested by it. (I think it is getting confused by the presence of the
"special non-ascii A") 


[-- Attachment #2: 0001-Check-org-inlinetask-export-templates-before-exporti.patch --]
[-- Type: text/x-patch, Size: 1562 bytes --]

From 8bd8dcc2dae59034bfc8e07a4cd43f26941f68a8 Mon Sep 17 00:00:00 2001
From: Jambunathan K <kjambunathan@gmail.com>
Date: Sat, 6 Aug 2011 20:04:35 +0530
Subject: [PATCH] Check org-inlinetask-export-templates before exporting inline tasks

* lisp/org-inlinetask.el (org-inlinetask-export-handler): Don't export
inline tasks if the current backend has provided no entries in
org-inlinetask-export-templates.
---
 lisp/org-inlinetask.el |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index 7a52d6b..a990bd3 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -119,9 +119,9 @@ When nil, they will not be exported."
 	   '((unless (eq todo "") (format "%s%s " todo priority))
 	     heading
 	     (unless (eq content "")
-	       (format "\n         ¦ %s"
+	       (format "\n         ¦ %s"
 		       (mapconcat 'identity (org-split-string content "\n")
-				  "\n         ¦ ")))))
+				  "\n         ¦ ")))))
     (docbook "<variablelist>
 <varlistentry>
 <term>%s%s</term>
@@ -333,7 +333,9 @@ Either remove headline and meta data, or do special formatting."
       ;; Remove the task.
       (goto-char beg)
       (delete-region beg end)
-      (when org-inlinetask-export
+      (when (and org-inlinetask-export
+		 (assq org-export-current-backend
+		       org-inlinetask-export-templates))
 	;; Format CONTENT, if appropriate.
 	(setq content
 	      (if (not (and content (string-match "\\S-" content)))
-- 
1.7.2.3


[-- Attachment #3: Type: text/plain, Size: 5 bytes --]


-- 

  reply	other threads:[~2011-08-06 15:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-06 11:41 Org-odt fails to export when inline tasks are present suvayu ali
2011-08-06 15:02 ` Jambunathan K [this message]
2011-08-06 17:19   ` Achim Gratz
2011-08-06 20:04   ` suvayu ali
2011-08-08 17:00   ` [RFC] inline task formatting in odt/doc (was Re: Org-odt fails to export when inline tasks are present) Jambunathan K
2011-08-08 18:17     ` suvayu ali
2011-08-16 17:09     ` Bastien
2011-08-10  9:13   ` Org-odt fails to export when inline tasks are present Nicolas Goaziou

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=81vcua60rm.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fatkasuvayu+linux@gmail.com \
    /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).