From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Colin Fraizer" Subject: Bug Report: latex export interaction with inlinetasks Date: Sat, 8 Oct 2011 04:17:56 -0400 Message-ID: <002901cc8592$cadd6c50$609844f0$@cfraizer.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002A_01CC8571.445F0BA0" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCS7A-0004Aq-Ln for emacs-orgmode@gnu.org; Sat, 08 Oct 2011 04:18:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCS77-0005ZG-VK for emacs-orgmode@gnu.org; Sat, 08 Oct 2011 04:18:36 -0400 Received: from caibbdcaaaaf.dreamhost.com ([208.113.200.5]:38265 helo=homiemail-a58.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCS77-0005Ym-Fq for emacs-orgmode@gnu.org; Sat, 08 Oct 2011 04:18:33 -0400 Received: from homiemail-a58.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a58.g.dreamhost.com (Postfix) with ESMTP id E9B3F7D805B for ; Sat, 8 Oct 2011 01:18:30 -0700 (PDT) Received: from colinfhp (c-68-58-32-24.hsd1.in.comcast.net [68.58.32.24]) (Authenticated sender: orgmode@cfraizer.com) by homiemail-a58.g.dreamhost.com (Postfix) with ESMTPA id 9C3257D8058 for ; Sat, 8 Oct 2011 01:18:27 -0700 (PDT) Content-Language: en-us 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 This is a multipart message in MIME format. ------=_NextPart_000_002A_01CC8571.445F0BA0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_002A_01CC8571.445F0BA0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

 

------=_NextPart_000_002A_01CC8571.445F0BA0--