* Bug Report: latex export interaction with inlinetasks
@ 2011-10-08 8:17 Colin Fraizer
2011-10-09 12:05 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Colin Fraizer @ 2011-10-08 8:17 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1800 bytes --]
I have a file like this:
* Item 1
- list1a
- list1b
* Item 2
- list2a
*************** TODO Test
*************** END
- list2b
* Item 3
(1) If I export the whole file to LaTeX, everything works fine.
(2) If I export the subtree "* Item 2" to HTML, everything works fine.
(I see my list and the inlinetask in that list.)
(3) If I export the subtree "* Item 2" to LaTeX, the inlinetask is
removed. (All inlinetasks are removed from list2.)
NOTE: I'm exporting the subtrees with C-c C-e 1 d (or C-c C-e 1 L).
This is apparently caused by the fact that:
1. org-export-latex-first-lines matches all of list2 (because there
are no headlines under "* Item 2"); AND
2. org-export-preprocess-string is called with limited parameters on
those first lines. Those parameters do not include my value for ":tasks".
Is there a reason why we could not (or should not) change the defun
org-export-latex-first-lines like the following. I only add the line
":tasks (plist-get opt-plist :tasks)"
I'm not familiar enough with the guts of org to know if that will have
terrible consequences elsewhere.
(defun org-export-latex-first-lines (opt-plist &optional beg end)
:
:
(prog1
(org-export-latex-content
(org-export-preprocess-string
(buffer-substring pt end)
:for-backend 'latex
:emph-multiline t
:add-text nil
:comments nil
:skip-before-1st-heading nil
:LaTeX-fragments nil
:tasks (plist-get opt-plist :tasks) ;; *** I PROPOSE ADDING THIS
LINE
:timestamps (plist-get opt-plist :timestamps)
:footnotes (plist-get opt-plist :footnotes)))
:
:
) ; end of defun
[-- Attachment #2: Type: text/html, Size: 13747 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug Report: latex export interaction with inlinetasks
2011-10-08 8:17 Bug Report: latex export interaction with inlinetasks Colin Fraizer
@ 2011-10-09 12:05 ` Nicolas Goaziou
2011-10-09 12:58 ` Colin Fraizer
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2011-10-09 12:05 UTC (permalink / raw)
To: Colin Fraizer; +Cc: emacs-orgmode
Hello,
"Colin Fraizer" <orgmode@cfraizer.com> writes:
> I have a file like this:
>
>
>
> * Item 1
>
> - list1a
>
> - list1b
>
> * Item 2
>
> - list2a
>
> *************** TODO Test
>
> *************** END
>
> - list2b
>
> * Item 3
>
>
>
> (1) If I export the whole file to LaTeX, everything works fine.
>
> (2) If I export the subtree "* Item 2" to HTML, everything works fine.
> (I see my list and the inlinetask in that list.)
>
> (3) If I export the subtree "* Item 2" to LaTeX, the inlinetask is
> removed. (All inlinetasks are removed from list2.)
>
>
> This is apparently caused by the fact that:
>
> 1. org-export-latex-first-lines matches all of list2 (because there
> are no headlines under "* Item 2"); AND
>
> 2. org-export-preprocess-string is called with limited parameters on
> those first lines. Those parameters do not include my value for ":tasks".
>
> Is there a reason why we could not (or should not) change the defun
> org-export-latex-first-lines like the following. I only add the line
>
> ":tasks (plist-get opt-plist :tasks)"
>
> I'm not familiar enough with the guts of org to know if that will have
> terrible consequences elsewhere.
>
> (defun org-export-latex-first-lines (opt-plist &optional beg end)
> :
> :
> (prog1
> (org-export-latex-content
> (org-export-preprocess-string
> (buffer-substring pt end)
> :for-backend 'latex
> :emph-multiline t
> :add-text nil
> :comments nil
> :skip-before-1st-heading nil
> :LaTeX-fragments nil
> :tasks (plist-get opt-plist :tasks) ;; *** I PROPOSE ADDING THIS LINE
> :timestamps (plist-get opt-plist :timestamps)
> :footnotes (plist-get opt-plist :footnotes)))
> :
> :
> ) ; end of defun
I think this should be safe. Do you want to make a patch for that?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug Report: latex export interaction with inlinetasks
2011-10-09 12:05 ` Nicolas Goaziou
@ 2011-10-09 12:58 ` Colin Fraizer
2011-10-13 11:49 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Colin Fraizer @ 2011-10-09 12:58 UTC (permalink / raw)
To: 'Nicolas Goaziou'; +Cc: emacs-orgmode
Hi, Nicolas,
Please pardon my ignorance, but I don't know how to generate a patch for
distribution.
Since I sent that e-mail, I added a few more items from the opt-plist to
include :todo, :todo-keywords, :tags, and :priority.
The output from diff for my new version against the one I grabbed from the
git repository follows (enclosed in an org example block).
--Colin
#+begin_example
3c3
< ;; Copyright (C) 2007-2011 Free Software Foundation, Inc.
---
> ;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
7c7,8
< ;; Author: Bastien Guerry <bzg AT gnu DOT org>
---
> ;; Version: 7.7
> ;; Author: Bastien Guerry <bzg AT altern DOT org>
404c405
< '("\\begin{verbatim}\n" . "\\end{verbatim}")
---
> '("\\begin{verbatim}\n" . "\\end{verbatim}\n")
1472a1474,1478
> :tasks (plist-get opt-plist :tasks)
> :todo (plist-get opt-plist :todo)
> :todo-keywords (plist-get opt-plist :todo-keywords)
> :tags (plist-get opt-plist :tags)
> :priority (plist-get opt-plist :priority)
1839c1845
< (insert "\\end{verbatim}\n"))
---
> (insert "\\end{verbatim}\n\n"))
2769a2776,2777
>
> ;; arch-tag: 23c2b87d-da04-4c2d-ad2d-1eb6487bc3ad
#+end_example
-----Original Message-----
From: emacs-orgmode-bounces+orgmode=cfraizer.com@gnu.org
[mailto:emacs-orgmode-bounces+orgmode=cfraizer.com@gnu.org] On Behalf Of
Nicolas Goaziou
Sent: Sunday, October 09, 2011 8:06 AM
To: Colin Fraizer
Cc: emacs-orgmode@gnu.org
Subject: Re: [O] Bug Report: latex export interaction with inlinetasks
Hello,
"Colin Fraizer" <orgmode@cfraizer.com> writes:
> I have a file like this:
>
>
>
> * Item 1
>
> - list1a
>
> - list1b
>
> * Item 2
>
> - list2a
>
> *************** TODO Test
>
> *************** END
>
> - list2b
>
> * Item 3
>
>
>
> (1) If I export the whole file to LaTeX, everything works fine.
>
> (2) If I export the subtree "* Item 2" to HTML, everything works fine.
> (I see my list and the inlinetask in that list.)
>
> (3) If I export the subtree "* Item 2" to LaTeX, the inlinetask is
> removed. (All inlinetasks are removed from list2.)
>
>
> This is apparently caused by the fact that:
>
> 1. org-export-latex-first-lines matches all of list2 (because there
> are no headlines under "* Item 2"); AND
>
> 2. org-export-preprocess-string is called with limited parameters on
> those first lines. Those parameters do not include my value for ":tasks".
>
> Is there a reason why we could not (or should not) change the defun
> org-export-latex-first-lines like the following. I only add the line
>
> ":tasks (plist-get opt-plist :tasks)"
>
> I'm not familiar enough with the guts of org to know if that will have
> terrible consequences elsewhere.
>
> (defun org-export-latex-first-lines (opt-plist &optional beg end)
> :
> :
> (prog1
> (org-export-latex-content
> (org-export-preprocess-string
> (buffer-substring pt end)
> :for-backend 'latex
> :emph-multiline t
> :add-text nil
> :comments nil
> :skip-before-1st-heading nil
> :LaTeX-fragments nil
> :tasks (plist-get opt-plist :tasks) ;; *** I PROPOSE ADDING
THIS LINE
> :timestamps (plist-get opt-plist :timestamps)
> :footnotes (plist-get opt-plist :footnotes)))
> :
> :
> ) ; end of defun
I think this should be safe. Do you want to make a patch for that?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug Report: latex export interaction with inlinetasks
2011-10-09 12:58 ` Colin Fraizer
@ 2011-10-13 11:49 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2011-10-13 11:49 UTC (permalink / raw)
To: Colin Fraizer; +Cc: emacs-orgmode
Hello,
"Colin Fraizer" <orgmode@cfraizer.com> writes:
> Please pardon my ignorance, but I don't know how to generate a patch for
> distribution.
You have all instructions you want at:
http://orgmode.org/worg/org-contribute.html
If you don't want/can't follow them, please tell me. I will push your
patch.
> Since I sent that e-mail, I added a few more items from the opt-plist to
> include :todo, :todo-keywords, :tags, and :priority.
I see, but you also included changes not directly related to the
thread's subject (i.e. changes to verbatim environment). Be sure to
filter them out if you create the patch.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-13 11:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-08 8:17 Bug Report: latex export interaction with inlinetasks Colin Fraizer
2011-10-09 12:05 ` Nicolas Goaziou
2011-10-09 12:58 ` Colin Fraizer
2011-10-13 11:49 ` Nicolas Goaziou
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).