emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug] two bugs: one with comments and with exporting inline tasks
@ 2010-11-02 10:46 Eric S Fraga
  2010-11-02 19:27 ` Nicolas Goaziou
  0 siblings, 1 reply; 20+ messages in thread
From: Eric S Fraga @ 2010-11-02 10:46 UTC (permalink / raw)
  To: Emacs Org mode mailing list

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

Hello,

I have run into two problems.  The first is one which has existed for a long time as
is somewhat minor: a line consisting of just #+ will be treated as part
of the text.  The regex for comments requires a space but it would be
nice if this weren't required.

The second problem is more serious: exporting to latex when there are
inline tasks does not work.  I believe the problem is due to a
combination of headings being treated as list entries and the
introduction of the new list handling code.

Please see attached files for a full example (org, tex and pdf) and
which includes the version information (org up-to-date as of an hour ago
basically).

Thanks,
eric


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: example org file --]
[-- Type: text/org, Size: 2350 bytes --]

# -*- coding: utf-8; -*-
#+TITLE:     examplebug.org
#+AUTHOR:    Eric S Fraga
#+EMAIL:     e.fraga@ucl.ac.uk
#+DATE:      2010.08.30 14:14:04
#+DESCRIPTION: 
#+KEYWORDS: 
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:   
#+LINK_HOME: 
#+XSLT: 

* comments in latex export
  This is some text that should appear normally.  The next few lines are
  a comment which should not be exported.
#+ this line will be ignored, as it should be
#+
#+ as will this one but the one in between will not
*Immediately* before this sentence is the appearance of =#+= which should
not be there.  I believe the regex requires a space after the plus
sign but maybe a check for end of line =$= as an alternative to a space
could be used?  I.e. something like =#\+\( |$\)= although I don't know if
that type of expression will work...

* problem exporting to latex with inline tasks
I often use inline tasks to help me organise my thoughts as I am
writing long documents.  However, exporting these no longer seems to
work.
***************************** TODO figure out why this doesn't work
***************************** END

There are two problems with exporting inline tasks:

1. If the whole document is exported, the inline task headline text is
   inserted into the =[ ]= optional argument for an =\item=, generating
   something like this:

   : \item[@<span class="todo TODO"> TODO figure out why this doesn't work]

   Further, this text in the =[]= appears in subsequent items as well!
   See the attached =pdf= document.

2. If only the current subtree is exported, the exported latex ends
   just before the inline task.


I believe both of these problems are related to the new list handling
as I used to be able to export inline tasks perfectly fine in
September.

* version information
#+begin_src emacs-lisp :results output :exports results
  (format "%s\n%s" (org-version) (emacs-version))
#+end_src

#+results:
: Org-mode version 7.01trans (release_7.01h.514.g878d)
: GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
:  of 2010-08-14 on raven, modified by Debian


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: latex generated by org exporter --]
[-- Type: text/x-tex, Size: 2536 bytes --]

% Created 2010-11-02 Tue 10:41
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{soul}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\usepackage{xcolor}
\usepackage{listings}
\providecommand{\alert}[1]{\textbf{#1}}

\title{examplebug.org}
\author{Eric S Fraga}
\date{2010.08.30 14:14:04}

\begin{document}

\maketitle

\setcounter{tocdepth}{3}
\tableofcontents
\vspace*{1cm}

\section{comments in latex export}
\label{sec-1}

  This is some text that should appear normally.  The next few lines are
  a comment which should not be exported.
\textbf{Immediately} before this sentence is the appearance of \verb=#+= which should
not be there.  I believe the regex requires a space after the plus
sign but maybe a check for end of line \verb=$= as an alternative to a space
could be used?  I.e. something like \verb=#\+\( |$\)= although I don't know if
that type of expression will work\ldots{}
\section{problem exporting to latex with inline tasks}
\label{sec-2}

I often use inline tasks to help me organise my thoughts as I am
writing long documents.  However, exporting these no longer seems to
work.

\begin{enumerate}
\item[@<span class="todo TODO"> TODO figure out why this doesn't work]
There are two problems with exporting inline tasks:
\item[@<span class="todo TODO"> TODO figure out why this doesn't work]If the whole document is exported, the inline task headline text is
   inserted into the \verb=[ ]= optional argument for an \verb=\item=, generating
   something like this:

\begin{verbatim}
    \item[@<span class="todo TODO"> TODO figure out why this doesn't work]
\end{verbatim}


   Further, this text in the \verb=[]= appears in subsequent items as well!
   See the attached \verb=pdf= document.
\item[@<span class="todo TODO"> TODO figure out why this doesn't work]If only the current subtree is exported, the exported latex ends
   just before the inline task.
\end{enumerate}

I believe both of these problems are related to the new list handling
as I used to be able to export inline tasks perfectly fine in
September.
\section{version information}
\label{sec-3}


\begin{verbatim}
 Org-mode version 7.02trans (release_7.3.5.g1197)
 GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
  of 2010-08-14 on raven, modified by Debian
\end{verbatim}

\end{document}

[-- Attachment #4: examplebug.pdf --]
[-- Type: application/pdf, Size: 72085 bytes --]

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


-- 
Eric S Fraga, GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
using Org-mode version 7.02trans (release_7.3.5.g1197) in Emacs version 23.2.1

[-- Attachment #6: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [bug] two bugs: one with comments and with exporting inline tasks
  2010-11-02 10:46 [bug] two bugs: one with comments and with exporting inline tasks Eric S Fraga
@ 2010-11-02 19:27 ` Nicolas Goaziou
  2010-11-02 20:51   ` Eric S Fraga
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Goaziou @ 2010-11-02 19:27 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Emacs Org mode mailing list

Hello,

>>>>> Eric S Fraga writes:

> I believe both of these problems are related to the new list
> handling as I used to be able to export inline tasks perfectly fine
> in September.

Well, this is strange. I tried to get back to 7.01h, 7.01 and 6.36c
and I obtain this same behavior.

What kind of export did you use to obtain?

Regards,

-- Nicolas

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

* Re: [bug] two bugs: one with comments and with exporting inline tasks
  2010-11-02 19:27 ` Nicolas Goaziou
@ 2010-11-02 20:51   ` Eric S Fraga
  2010-11-02 23:11     ` Eric S Fraga
  0 siblings, 1 reply; 20+ messages in thread
From: Eric S Fraga @ 2010-11-02 20:51 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Emacs Org mode mailing list

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
>>>>>> Eric S Fraga writes:
>
>> I believe both of these problems are related to the new list
>> handling as I used to be able to export inline tasks perfectly fine
>> in September.
>
> Well, this is strange. I tried to get back to 7.01h, 7.01 and 6.36c
> and I obtain this same behavior.
>
> What kind of export did you use to obtain?
>
> Regards,
>
> -- Nicolas

Well, now that you ask, I'm not sure what I used to obtain!  <blush>  I
don't have any PDFs from when I was preparing my big proposal in August
and September other than the final version (which obviously didn't have
any inline tasks in it...).  So maybe I've been very unfair to you and
the problem has always existed.  Sorry!

It's still the case that there are two problems.  For the first, there's
obviously some leakage from the HTML export into the LaTeX export in
that the list entry (which comes from the inline heading) is given an
argument that seems to be HTML/CSS code...  For the second problem,
maybe I've misunderstood the export of a sub-tree -- I've initiated the
export outside the inline heading so the export should include
everything below the heading above?

I'll play around some more tonight if I get a chance to see if I can
narrow down the reasons for the failure.

Thanks and apologies again for blaming your code unfairly!

-- 
Eric S Fraga, GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
using Org-mode version 7.02trans (release_7.3.6.gf0d2) in Emacs version 23.2.1

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

* Re: [bug] two bugs: one with comments and with exporting inline tasks
  2010-11-02 20:51   ` Eric S Fraga
@ 2010-11-02 23:11     ` Eric S Fraga
  2010-11-04  7:41       ` Nicolas Goaziou
  0 siblings, 1 reply; 20+ messages in thread
From: Eric S Fraga @ 2010-11-02 23:11 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Emacs Org mode mailing list

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

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> Hello,
>>
>>>>>>> Eric S Fraga writes:
>>
>>> I believe both of these problems are related to the new list
>>> handling as I used to be able to export inline tasks perfectly fine
>>> in September.
>>
>> Well, this is strange. I tried to get back to 7.01h, 7.01 and 6.36c
>> and I obtain this same behavior.
>>
>> What kind of export did you use to obtain?
>>
>> Regards,
>>
>> -- Nicolas
>
> Well, now that you ask, I'm not sure what I used to obtain!  <blush>  I
> don't have any PDFs from when I was preparing my big proposal in August
> and September other than the final version (which obviously didn't have
> any inline tasks in it...).  So maybe I've been very unfair to you and
> the problem has always existed.  Sorry!
>
> It's still the case that there are two problems.  For the first, there's
> obviously some leakage from the HTML export into the LaTeX export in
> that the list entry (which comes from the inline heading) is given an
> argument that seems to be HTML/CSS code...  For the second problem,
> maybe I've misunderstood the export of a sub-tree -- I've initiated the
> export outside the inline heading so the export should include
> everything below the heading above?
>
> I'll play around some more tonight if I get a chance to see if I can
> narrow down the reasons for the failure.

I have done so and there's some interesting behaviour.  Here is a
summary of 4 different results exporting essentially the same content
for the attached org file:

1. export the whole file (C-cC-ed) produces a document with all the
   content but with the inline task defining a latex =\item= with a
   strange label (as indicated in my earlier message).

2. go to the headline and select the sub-tree (C-c@) and then export
   (C-cC-ed) generates a PDF with only the text up to the start (but not
   including) of the inline task.

3. place the cursor on *point 1* and export the sub-tree (C-cC-e1d)
   generates the same output as the previous point.

4. finally, place the cursor on *point 2* and export the sub-tree
   (C-cC-e1d) exports only the text *after* the inline task.


Basically, for the last three cases, the exporter has a problem figuring
out what sub-tree actually is.  I don't think the problems have anything
to do with the new list handling (apologies again!).

I hope this helps somebody figure out what is going on.

Thanks,
eric

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: short example org file demonstrating bug --]
[-- Type: text/orgmode, Size: 859 bytes --]

# -*- coding: utf-8; -*-
#+TITLE:     examplebug.org
#+AUTHOR:    Eric S Fraga
#+EMAIL:     e.fraga@ucl.ac.uk
#+DESCRIPTION: 
#+KEYWORDS: 
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:   
#+LINK_HOME: 
#+XSLT: 

* problem exporting to latex with inline tasks

*point 1* 

I often use inline tasks to help me organise my thoughts as I am
writing long documents.  However, exporting these no longer seems to
work.

***************************** TODO figure out why this doesn't work
***************************** END

*point 2*

This is some text the follows the inline task.

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


-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.6.gf0d2)

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [bug] two bugs: one with comments and with exporting inline tasks
  2010-11-02 23:11     ` Eric S Fraga
@ 2010-11-04  7:41       ` Nicolas Goaziou
  2010-11-04  7:51         ` [patch] " Nicolas Goaziou
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Goaziou @ 2010-11-04  7:41 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Emacs Org mode mailing list

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

Hello,

>>>>> Eric S Fraga writes:

> I have done so and there's some interesting behaviour. Here is a
> summary of 4 different results exporting essentially the same
> content for the attached org file:

> 1. export the whole file (C-cC-ed) produces a document with all the
> content but with the inline task defining a latex =\item= with a
> strange label (as indicated in my earlier message).

> 2. go to the headline and select the sub-tree (C-c@) and then export
> (C-cC-ed) generates a PDF with only the text up to the start (but
> not including) of the inline task.

> 3. place the cursor on *point 1* and export the sub-tree (C-cC-e1d)
> generates the same output as the previous point.

> 4. finally, place the cursor on *point 2* and export the sub-tree
> (C-cC-e1d) exports only the text *after* the inline task.

I have made an attempt to solve the first problem. Please have a look
at the provided patch.

As I didn't know what inline tasks should like in latex, it is for now
a description list separated from its body (if any) with a newline.
This doesn't look so good but, well, if there is better as a default
value, tell me. Note that, AFAICS, there is no way to configure the
appearance either.

The others problems look hairier to me.

Regards,

-- Nicolas


[-- Attachment #2: 0001-inlinetasks-fix-latex-export-wrt-conversion-to-lists.patch --]
[-- Type: text/plain, Size: 3062 bytes --]

From de9453852106fbdb542fa4751c355fd02da052bd Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Thu, 4 Nov 2010 08:03:48 +0100
Subject: [PATCH 1/2] inlinetasks: fix latex export wrt conversion to lists

* org-inlinetask.el (org-inlinetask-export-handler): Remove protection
  from @<span class...> so it can be removed during LaTeX export.
  Remove terminator as it is already handled by org-exp.el.
---
 lisp/org-inlinetask.el |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index c000999..c305d56 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -183,15 +183,13 @@ Either remove headline and meta data, or do special formatting."
 	  (setq headline (concat
 			  (if (match-end 2)
 			      (concat
-			       (org-add-props
-				   (format
-				    "@<span class=\"%s %s\"> %s@</span>"
-				    (if (member (match-string 2 headline)
-						org-done-keywords)
-					"done" "todo")
-				    (match-string 2 headline)
-				    (match-string 2 headline))
-				   nil 'org-protected t)
+			       (format
+				"@<span class=\"%s %s\"> %s@</span>"
+				(if (member (match-string 2 headline)
+					    org-done-keywords)
+				    "done" "todo")
+				(match-string 2 headline)
+				(match-string 2 headline))
 			       " ") "")
 			  (match-string 4 headline)))
 	  (when content
@@ -200,11 +198,11 @@ Either remove headline and meta data, or do special formatting."
 	      (if (string-match "[ \t\n]+\\'" content)
 		  (setq content (substring content 0 (match-beginning 0))))
 	      (setq content (org-remove-indentation content))
-	      (if latexp (setq content (concat "\\quad \\\\\n" content)))))
+	      (setq content (if latexp (concat "\\nbsp\\\\ \\quad " content)))))
 	  (insert (make-string (org-inlinetask-get-current-indentation) ?\ )
-		  "- ")
+		  "-  ")
 	  (setq indent (make-string (current-column) ?\ ))
-	  (insert headline " ::")
+	  (insert headline " :: ")
 	  (if content
 	      (insert (if htmlp " " (concat "\n" indent))
 		      (mapconcat 'identity (org-split-string content "\n")
@@ -212,7 +210,7 @@ Either remove headline and meta data, or do special formatting."
 	    (insert "\n"))
 	  (insert indent)
 	  (backward-delete-char 2)
-	  (insert "THISISTHEINLINELISTTEMINATOR\n"))))))
+	  (unless latexp (insert "THISISTHEINLINELISTTEMINATOR\n")))))))
 
 (defun org-inlinetask-get-current-indentation ()
   "Get the indentation of the last non-while line above this one."
@@ -266,8 +264,6 @@ Either remove headline and meta data, or do special formatting."
   '(add-hook 'org-font-lock-hook 'org-inlinetask-fontify))
 (eval-after-load "org-html"
   '(add-hook 'org-export-html-final-hook 'org-inlinetask-remove-terminator))
-(eval-after-load "org-latex"
-  '(add-hook 'org-export-latex-final-hook 'org-inlinetask-remove-terminator))
 (eval-after-load "org-ascii"
   '(add-hook 'org-export-ascii-final-hook 'org-inlinetask-remove-terminator))
 (eval-after-load "org-docbook"
-- 
1.7.3.2


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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04  7:41       ` Nicolas Goaziou
@ 2010-11-04  7:51         ` Nicolas Goaziou
  2010-11-04  8:01           ` Nicolas Goaziou
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Goaziou @ 2010-11-04  7:51 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Eric S Fraga, Emacs Org mode mailing list

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

Please disregard the last patch: it is buggy. Here is the new one.

Also, there is only one patch, even though it says [1/2].

-- Nicolas


[-- Attachment #2: 0001-inlinetasks-fix-latex-export-wrt-conversion-to-lists.patch --]
[-- Type: text/plain, Size: 2103 bytes --]

From e800cbfbb9e44d69f14bee874ce62e9a23224dab Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Thu, 4 Nov 2010 08:03:48 +0100
Subject: [PATCH 1/2] inlinetasks: fix latex export wrt conversion to lists

* org-inlinetask.el (org-inlinetask-export-handler): Remove protection
  from @<span class...> so it can be removed during LaTeX export.
---
 lisp/org-inlinetask.el |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index c000999..e67772e 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -183,15 +183,13 @@ Either remove headline and meta data, or do special formatting."
 	  (setq headline (concat
 			  (if (match-end 2)
 			      (concat
-			       (org-add-props
-				   (format
-				    "@<span class=\"%s %s\"> %s@</span>"
-				    (if (member (match-string 2 headline)
-						org-done-keywords)
-					"done" "todo")
-				    (match-string 2 headline)
-				    (match-string 2 headline))
-				   nil 'org-protected t)
+			       (format
+				"@<span class=\"%s %s\"> %s@</span>"
+				(if (member (match-string 2 headline)
+					    org-done-keywords)
+				    "done" "todo")
+				(match-string 2 headline)
+				(match-string 2 headline))
 			       " ") "")
 			  (match-string 4 headline)))
 	  (when content
@@ -200,11 +198,11 @@ Either remove headline and meta data, or do special formatting."
 	      (if (string-match "[ \t\n]+\\'" content)
 		  (setq content (substring content 0 (match-beginning 0))))
 	      (setq content (org-remove-indentation content))
-	      (if latexp (setq content (concat "\\quad \\\\\n" content)))))
+	      (setq content (if latexp (concat "\\nbsp\\\\ \\quad " content)))))
 	  (insert (make-string (org-inlinetask-get-current-indentation) ?\ )
-		  "- ")
+		  "-  ")
 	  (setq indent (make-string (current-column) ?\ ))
-	  (insert headline " ::")
+	  (insert headline " :: ")
 	  (if content
 	      (insert (if htmlp " " (concat "\n" indent))
 		      (mapconcat 'identity (org-split-string content "\n")
-- 
1.7.3.2


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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04  7:51         ` [patch] " Nicolas Goaziou
@ 2010-11-04  8:01           ` Nicolas Goaziou
  2010-11-04 10:24             ` Eric S Fraga
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Goaziou @ 2010-11-04  8:01 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Eric S Fraga, Emacs Org mode mailing list

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

Oh my...

Here is the third (and hopefully final) version of the patch.

Sorry for the noise.

-- Nicolas


[-- Attachment #2: 0001-inlinetasks-fix-latex-export-wrt-conversion-to-lists.patch --]
[-- Type: text/plain, Size: 2099 bytes --]

From a51b8a7919b935559a8716aa959851e7960d7ec4 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Thu, 4 Nov 2010 08:03:48 +0100
Subject: [PATCH] inlinetasks: fix latex export wrt conversion to lists

* org-inlinetask.el (org-inlinetask-export-handler): Remove protection
  from @<span class...> so it can be removed during LaTeX export.
---
 lisp/org-inlinetask.el |   22 ++++++++++------------
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index c000999..f3fcee9 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -183,15 +183,13 @@ Either remove headline and meta data, or do special formatting."
 	  (setq headline (concat
 			  (if (match-end 2)
 			      (concat
-			       (org-add-props
-				   (format
-				    "@<span class=\"%s %s\"> %s@</span>"
-				    (if (member (match-string 2 headline)
-						org-done-keywords)
-					"done" "todo")
-				    (match-string 2 headline)
-				    (match-string 2 headline))
-				   nil 'org-protected t)
+			       (format
+				"@<span class=\"%s %s\"> %s@</span>"
+				(if (member (match-string 2 headline)
+					    org-done-keywords)
+				    "done" "todo")
+				(match-string 2 headline)
+				(match-string 2 headline))
 			       " ") "")
 			  (match-string 4 headline)))
 	  (when content
@@ -200,11 +198,11 @@ Either remove headline and meta data, or do special formatting."
 	      (if (string-match "[ \t\n]+\\'" content)
 		  (setq content (substring content 0 (match-beginning 0))))
 	      (setq content (org-remove-indentation content))
-	      (if latexp (setq content (concat "\\quad \\\\\n" content)))))
+	      (if latexp (setq content (concat "\\nbsp\\\\ \\quad " content)))))
 	  (insert (make-string (org-inlinetask-get-current-indentation) ?\ )
-		  "- ")
+		  "-  ")
 	  (setq indent (make-string (current-column) ?\ ))
-	  (insert headline " ::")
+	  (insert headline " :: ")
 	  (if content
 	      (insert (if htmlp " " (concat "\n" indent))
 		      (mapconcat 'identity (org-split-string content "\n")
-- 
1.7.3.2


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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04  8:01           ` Nicolas Goaziou
@ 2010-11-04 10:24             ` Eric S Fraga
  2010-11-04 14:05               ` Nicolas Goaziou
  0 siblings, 1 reply; 20+ messages in thread
From: Eric S Fraga @ 2010-11-04 10:24 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Emacs Org mode mailing list

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Oh my...
>
> Here is the third (and hopefully final) version of the patch.
>
> Sorry for the noise.
>
> -- Nicolas
>
>

Thanks Nicolas.  This one does work partly especially when exporting the
whole document and is a definite improvement on what was there before!

The one problem it has is that the description environment should be
closed when the /end/ of the inline task is found.  At present, you are
closing the description environment well after that (I think when you
hit the next heading?).

Thanks again,
eric
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.14.g106ad.dirty)

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 10:24             ` Eric S Fraga
@ 2010-11-04 14:05               ` Nicolas Goaziou
  2010-11-04 14:21                 ` Eric S Fraga
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Goaziou @ 2010-11-04 14:05 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Emacs Org mode mailing list

Hello,

>>>>> Eric S Fraga writes:

> The one problem it has is that the description environment should be
> closed when the /end/ of the inline task is found. At present, you
> are closing the description environment well after that (I think
> when you hit the next heading?).

I can't reproduce it here. Description list is correctly ended (as
long as you're exporting the whole buffer).

Hmmm, do you have any peculiar setup regarding lists or inline tasks?

Regards,

-- Nicolas

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 14:05               ` Nicolas Goaziou
@ 2010-11-04 14:21                 ` Eric S Fraga
  2010-11-04 14:42                   ` Nicolas Goaziou
  0 siblings, 1 reply; 20+ messages in thread
From: Eric S Fraga @ 2010-11-04 14:21 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Emacs Org mode mailing list

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
>>>>>> Eric S Fraga writes:
>
>> The one problem it has is that the description environment should be
>> closed when the /end/ of the inline task is found. At present, you
>> are closing the description environment well after that (I think
>> when you hit the next heading?).
>
> I can't reproduce it here. Description list is correctly ended (as
> long as you're exporting the whole buffer).
>
> Hmmm, do you have any peculiar setup regarding lists or inline tasks?

The following is a summary of all "org.*list" entries in my org
customisation file:

    144:      org-cycle-include-plain-lists t
    173:      org-list-ending-method 'regexp

Are there any other I should be looking for?

thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 14:21                 ` Eric S Fraga
@ 2010-11-04 14:42                   ` Nicolas Goaziou
  2010-11-04 15:22                     ` Eric S Fraga
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Goaziou @ 2010-11-04 14:42 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Emacs Org mode mailing list

>>>>> Eric S Fraga writes:

> Are there any other I should be looking for?

Could you test it with a minimal setup (emacs -q)?

I just can't see how description list could end at a wrong place.

Regards,

-- Nicolas

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 14:42                   ` Nicolas Goaziou
@ 2010-11-04 15:22                     ` Eric S Fraga
  2010-11-04 15:28                       ` Nicolas Goaziou
  0 siblings, 1 reply; 20+ messages in thread
From: Eric S Fraga @ 2010-11-04 15:22 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Emacs Org mode mailing list

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>>>>>> Eric S Fraga writes:
>
>> Are there any other I should be looking for?
>
> Could you test it with a minimal setup (emacs -q)?

=emacs -q= is not good enough because it loads org version 6.33x.  I
have tried =emacs -Q= instead and then:

#+begin_src emacs-lisp
(add-to-list 'load-path "~/git/org-mode/lisp")
(add-to-list 'load-path "/usr/share/org-mode/lisp")
(require 'org-install)
(require 'org-exp)
(require 'org-latex)
#+end_src

If I then visit my =examplebug.org= file and type =C-c C-e l= to
generate a latex export, I actually get an error:

: Debugger entered--Lisp error: (args-out-of-range [0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] 29)
:  org-section-number(29)
:  org-export-define-heading-targets(nil)
:  org-export-preprocess-string(#("# -*- coding: utf-8; -*-\n#+TITLE:     examplebug.org\n#+AUTHOR:    Eric S Fraga\n#+EMAIL:     e.fraga@ucl.ac.uk\n#+DESCRIPTION: \n#+KEYWORDS: \n#+LANGUAGE:  en\n#+OPTIONS:   H:3 num:t toc:nil \\n:nil @:t ::t |:t ^:t -:t f:t *:t <:t\n#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc\n#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js\n#+EXPORT_SELECT_TAGS: export\n#+EXPORT_EXCLUDE_TAGS: noexport\n#+LINK_UP:   \n#+LINK_HOME: \n#+XSLT: \n\n* problem exporting to latex with inline tasks\n\n*point 1* \n\nI often use inline tasks to help me organise my thoughts as I am\nwriting long documents.  However, exporting these no longer seems to\nwork.\n\n***************************** TODO figure out why this doesn't work\n***************************** END\n\n\n\n*point 2*\n\nThis is some text the follows the inline task.\n" 0 25 (fontified nil font-lock-fontified t) 25 26 (fontified nil) 26 34 (fontified nil font-lock-fontified t) 34 39 (fontified nil) 39 53 (fontified nil font-lock-fontified t) 53 54 (fontified nil) 54 63 (fontified nil font-lock-fontified t) 63 67 (fontified nil) 67 79 (fontified nil font-lock-fontified t) 79 80 (fontified nil) 80 88 (fontified nil font-lock-fontified t) 88 93 (fontified nil) 93 110 (fontified nil font-lock-fontified t) 110 111 (fontified nil) 111 126 (fontified nil font-lock-fontified t) 126 127 (fontified nil) 127 139 (fontified nil font-lock-fontified t) 139 140 (fontified nil) 140 155 (fontified nil font-lock-fontified t) 155 156 (fontified nil) 156 225 (fontified nil font-lock-fontified t) 225 226 (fontified nil) 226 298 (fontified nil font-lock-fontified t) 298 299 (fontified nil) 299 368 (fontified nil font-lock-fontified t) 368 397 (fontified nil font-lock-fontified t) 397 398 (fontified nil rear-nonsticky (mouse-face highlight keymap invisible intangible help-echo org-linked-text) font-lock-fontified t) 398 399 (fontified nil) 399 427 (fontified nil font-lock-fontified t) 427 428 (fontified nil) 428 459 (fontified nil font-lock-fontified t) 459 460 (fontified nil) 460 473 (fontified nil font-lock-fontified t) 473 474 (fontified nil) 474 487 (fontified nil font-lock-fontified t) 487 488 (fontified nil) 488 496 (fontified nil font-lock-fontified t) 496 497 (fontified nil) 497 498 (fontified nil) 498 500 (fontified nil) 500 544 (fontified nil) 544 545 (fontified nil) 545 815 (fontified nil) 815 862 (fontified nil)) :emph-multiline t :for-LaTeX t :comments nil :tags not-in-toc :priority nil :footnotes t :drawers nil :timestamps t :todo-keywords t :add-text nil :skip-before-1st-heading nil :select-tags ("export") :exclude-tags ("noexport") :LaTeX-fragments nil)
:  org-export-as-latex(nil)
:  call-interactively(org-export-as-latex)
:  org-export(nil)
:  call-interactively(org-export nil nil)

Argghhhhh!  Not sure why this is happening.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 15:22                     ` Eric S Fraga
@ 2010-11-04 15:28                       ` Nicolas Goaziou
  2010-11-04 16:17                         ` Eric S Fraga
  0 siblings, 1 reply; 20+ messages in thread
From: Nicolas Goaziou @ 2010-11-04 15:28 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: Emacs Org mode mailing list


> Argghhhhh! Not sure why this is happening.

You need to (require 'org-inlinetask) before trying to export.

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 15:28                       ` Nicolas Goaziou
@ 2010-11-04 16:17                         ` Eric S Fraga
  2010-11-04 16:32                           ` Sébastien Vauban
  0 siblings, 1 reply; 20+ messages in thread
From: Eric S Fraga @ 2010-11-04 16:17 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Emacs Org mode mailing list

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> Argghhhhh! Not sure why this is happening.
>
> You need to (require 'org-inlinetask) before trying to export.

d'oh.  of course.  <blush>

doing this now makes exporting work fine, with emacs -Q and loading the
right org modules, of course.

Annoyingly, now it works just fine with my configuration.  Maybe
something left over in the existing emacs that I have been using all
day...  sorry for the noise!

In terms of what to actually do with inline tasks on export, what I
would love to see would be to have an inline task converted to a
footnote with a marginpar note, along the lines of:

#+begin_src org
***************************** TODO figure out why this doesn't work
Some text in the body of the inline task.
***************************** END
#+end_src

being converted to, say:

#+begin_src latex
\footnote{\textbf{<<headline text>>}: <<body text>>}\marginpar{\fbox{\thefootnote}}
#+end_src

i.e. where <<headline text>> would be replaced by "TODO figure out why
this doesn't work" and <<body text>> by all the text between the ******
lines.  This is roughly the type of construct I use when I annotate
latex documents directly.  What do you think?  

We could make this a two argument latex function:

#+begin_src latex
\newcommand{\processinlinetask}[2]{%
\footnote{\textbf{#1}: #2}\marginpar{\fbox{\thefootnote}}%
}
#+end_src

which is defined in the org latex preamble and which a user could
customise through =\renewcommand= if desired (or through an org emacs
variable, of course).  It would be invoked as

#+begin_src latex
\processinlinetask{<<headline text>>}{<<body text>>}
#+end_src

We'd have to escape {}s maybe and it could be
somewhat fragile if there are multiple paragraphs in the inline body
text...

For HTML, you could convert to end notes maybe or some type of box
inline with the text... (well, customisable by the user through CSS I
guess)

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818.dirty)

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 16:17                         ` Eric S Fraga
@ 2010-11-04 16:32                           ` Sébastien Vauban
  2010-11-04 17:45                             ` Nicolas Goaziou
  0 siblings, 1 reply; 20+ messages in thread
From: Sébastien Vauban @ 2010-11-04 16:32 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Eric,

Eric S Fraga wrote:
> In terms of what to actually do with inline tasks on export, what I would
> love to see would be to have an inline task converted to a footnote with a
> marginpar note, along the lines of:
>
> #+begin_src org
> ***************************** TODO figure out why this doesn't work
> Some text in the body of the inline task.
> ***************************** END
> #+end_src
>
> being converted to, say:
>
> #+begin_src latex
> \footnote{\textbf{<<headline text>>}: <<body text>>}\marginpar{\fbox{\thefootnote}}
> #+end_src
>
> i.e. where <<headline text>> would be replaced by "TODO figure out why this
> doesn't work" and <<body text>> by all the text between the ****** lines.
> This is roughly the type of construct I use when I annotate latex documents
> directly. What do you think?

... that we need this.


> We could make this a two argument latex function:
>
> #+begin_src latex
> \newcommand{\processinlinetask}[2]{%
> \footnote{\textbf{#1}: #2}\marginpar{\fbox{\thefootnote}}%
> }
> #+end_src
>
> which is defined in the org latex preamble and which a user could
> customise through =\renewcommand= if desired (or through an org emacs
> variable, of course).  It would be invoked as
>
> #+begin_src latex
> \processinlinetask{<<headline text>>}{<<body text>>}
> #+end_src
>
> We'd have to escape {}s maybe and it could be
> somewhat fragile if there are multiple paragraphs in the inline body
> text...
>
> For HTML, you could convert to end notes maybe or some type of box
> inline with the text... (well, customisable by the user through CSS I
> guess)
>
> Thanks,
> eric

In exactly the same line of sight, I'm using the following already for (pure)
LaTeX -- I mean, not yet integrated within Org --:

#+begin_src latex
% must be loaded after url and hyperref
\RequirePackage[colorinlistoftodos]{todonotes}% (not in medium TeX Live installation)
\renewcommand{\@todonotes@backgroundcolor}{my-color-brand}
\renewcommand{\@todonotes@linecolor}{my-color-brand}

\newcounter{mycomment}
\newcommand{\mycomment}[2][]{% initials of the author + note in the margin
\if@mycomment
    \refstepcounter{mycomment}
    {\setstretch{0.7}% spacing
    \todo[color={red!100!green!33},size=\small]{%
    \textbf{Comment [\uppercase{#1}\themycomment]:}~#2}}
\else
    \relax
\fi
}

\newcommand{\mytodo}[2][]{% title in bold + note
\refstepcounter{mycomment}
{\todo[inline,color=blue!20]{
\textbf{TODO [\uppercase{#1}\themycomment]:}~#2}}}
#+end_src

This is using the package =todonotes= which is, euh, excellent!  Just have a
look, and you see that, with the above chunk of code, we can easily manage:

- mycomment :: margin notes (more for a comment, IMHO) and
- mytodo :: inlined notes (more for "inline tasks", IMHO).

Of course, this should now be automagically used by Org, as you do explain
above.

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 16:32                           ` Sébastien Vauban
@ 2010-11-04 17:45                             ` Nicolas Goaziou
  2010-11-05  8:01                               ` Sébastien Vauban
                                                 ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Nicolas Goaziou @ 2010-11-04 17:45 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Hello,
>>>>> Sébastien Vauban writes:

> Eric S Fraga wrote:
>> In terms of what to actually do with inline tasks on export, what I
>> would love to see would be to have an inline task converted to a
>> footnote with a marginpar note, along the lines of:
>> 
>> #+begin_src latex
>> \footnote{\textbf{<<headline text>>}: <<body text>>}\marginpar{\fbox{\thefootnote}}
>> #+end_src
>> 
>> i.e. where <<headline text>> would be replaced by "TODO figure out
>> why this doesn't work" and <<body text>> by all the text between
>> the ****** lines. This is roughly the type of construct I use when
>> I annotate latex documents directly. What do you think?

> ... that we need this.

What about creating a customizable alist, namely
org-inlinetask-export-templates, containing exporters paired with
format strings?

For example, it could contain :

'((html . "<@span class=\"%s %s\" %s@</span>")
  (latex . "\\footnote{\\textbf{%s %s}: %s}\\marginpar{\\fbox{\\thefootnote}}"))

where first %s is TODO, second %s is heading, and third one is
content.

Default values would be whatever is used right now.

Any comments?

Regards,

-- Nicolas

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 17:45                             ` Nicolas Goaziou
@ 2010-11-05  8:01                               ` Sébastien Vauban
  2010-11-05  8:58                               ` Sébastien Vauban
  2010-11-05 12:50                               ` Eric S Fraga
  2 siblings, 0 replies; 20+ messages in thread
From: Sébastien Vauban @ 2010-11-05  8:01 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Nicolas,

Nicolas Goaziou wrote:
>>>>>> Sébastien Vauban writes:
>> Eric S Fraga wrote:
>>> In terms of what to actually do with inline tasks on export, what I would
>>> love to see would be to have an inline task converted to a footnote with a
>>> marginpar note, along the lines of:
>>> 
>>> #+begin_src latex
>>> \footnote{\textbf{<<headline text>>}: <<body text>>}\marginpar{\fbox{\thefootnote}}
>>> #+end_src
>>> 
>>> i.e. where <<headline text>> would be replaced by "TODO figure out why
>>> this doesn't work" and <<body text>> by all the text between the ******
>>> lines. This is roughly the type of construct I use when I annotate latex
>>> documents directly. What do you think?
>
>> ... that we need this.
>
> What about creating a customizable alist, namely
> org-inlinetask-export-templates, containing exporters paired with format
> strings?
>
> For example, it could contain :
>
> '((html . "<@span class=\"%s %s\" %s@</span>")
>   (latex . "\\footnote{\\textbf{%s %s}: %s}\\marginpar{\\fbox{\\thefootnote}}"))
>
> where first %s is TODO, second %s is heading, and third one is
> content.
>
> Default values would be whatever is used right now.
>
> Any comments?

This seems like a good approach -- if not the right! -- to me.

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 17:45                             ` Nicolas Goaziou
  2010-11-05  8:01                               ` Sébastien Vauban
@ 2010-11-05  8:58                               ` Sébastien Vauban
  2010-11-05 12:50                                 ` Eric S Fraga
  2010-11-05 12:50                               ` Eric S Fraga
  2 siblings, 1 reply; 20+ messages in thread
From: Sébastien Vauban @ 2010-11-05  8:58 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Nicolas and Eric,

Nicolas Goaziou wrote:
>> Eric S Fraga wrote:
>>> In terms of what to actually do with inline tasks on export, what I
>>> would love to see would be to have an inline task converted to a
>>> footnote with a marginpar note, along the lines of:

Any chance of bumping this thread?

    Email from Sébastien Vauban: {Bug?} Mark subtrees and inline tasks
    See http://mid.gmane.org/80vd4vq445.fsf%40mundaneum.com

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-04 17:45                             ` Nicolas Goaziou
  2010-11-05  8:01                               ` Sébastien Vauban
  2010-11-05  8:58                               ` Sébastien Vauban
@ 2010-11-05 12:50                               ` Eric S Fraga
  2 siblings, 0 replies; 20+ messages in thread
From: Eric S Fraga @ 2010-11-05 12:50 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Sébastien Vauban, emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
>>>>>> Sébastien Vauban writes:
>
>> Eric S Fraga wrote:
>>> In terms of what to actually do with inline tasks on export, what I
>>> would love to see would be to have an inline task converted to a
>>> footnote with a marginpar note, along the lines of:
>>>
>>> #+begin_src latex
>>> \footnote{\textbf{<<headline text>>}: <<body text>>}\marginpar{\fbox{\thefootnote}}
>>> #+end_src
>>>
>>> i.e. where <<headline text>> would be replaced by "TODO figure out
>>> why this doesn't work" and <<body text>> by all the text between
>>> the ****** lines. This is roughly the type of construct I use when
>>> I annotate latex documents directly. What do you think?
>
>> ... that we need this.
>
> What about creating a customizable alist, namely
> org-inlinetask-export-templates, containing exporters paired with
> format strings?
>
> For example, it could contain :
>
> '((html . "<@span class=\"%s %s\" %s@</span>")
>   (latex . "\\footnote{\\textbf{%s %s}: %s}\\marginpar{\\fbox{\\thefootnote}}"))
>
> where first %s is TODO, second %s is heading, and third one is
> content.
>
> Default values would be whatever is used right now.
>
> Any comments?
>
> Regards,
>
> -- Nicolas

This sounds perfect!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.26.g4d02)

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

* Re: Re: [patch] two bugs: one with comments and with exporting inline tasks
  2010-11-05  8:58                               ` Sébastien Vauban
@ 2010-11-05 12:50                                 ` Eric S Fraga
  0 siblings, 0 replies; 20+ messages in thread
From: Eric S Fraga @ 2010-11-05 12:50 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> Hello Nicolas and Eric,
>
> Nicolas Goaziou wrote:
>>> Eric S Fraga wrote:
>>>> In terms of what to actually do with inline tasks on export, what I
>>>> would love to see would be to have an inline task converted to a
>>>> footnote with a marginpar note, along the lines of:
>
> Any chance of bumping this thread?
>
>     Email from Sébastien Vauban: {Bug?} Mark subtrees and inline tasks
>     See http://mid.gmane.org/80vd4vq445.fsf%40mundaneum.com
>
> Best regards,
>   Seb

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.26.g4d02)

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

end of thread, other threads:[~2010-11-05 12:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-02 10:46 [bug] two bugs: one with comments and with exporting inline tasks Eric S Fraga
2010-11-02 19:27 ` Nicolas Goaziou
2010-11-02 20:51   ` Eric S Fraga
2010-11-02 23:11     ` Eric S Fraga
2010-11-04  7:41       ` Nicolas Goaziou
2010-11-04  7:51         ` [patch] " Nicolas Goaziou
2010-11-04  8:01           ` Nicolas Goaziou
2010-11-04 10:24             ` Eric S Fraga
2010-11-04 14:05               ` Nicolas Goaziou
2010-11-04 14:21                 ` Eric S Fraga
2010-11-04 14:42                   ` Nicolas Goaziou
2010-11-04 15:22                     ` Eric S Fraga
2010-11-04 15:28                       ` Nicolas Goaziou
2010-11-04 16:17                         ` Eric S Fraga
2010-11-04 16:32                           ` Sébastien Vauban
2010-11-04 17:45                             ` Nicolas Goaziou
2010-11-05  8:01                               ` Sébastien Vauban
2010-11-05  8:58                               ` Sébastien Vauban
2010-11-05 12:50                                 ` Eric S Fraga
2010-11-05 12:50                               ` Eric S Fraga

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).