From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: [bug] org-inlinetask produces invalid xhtml Date: Wed, 10 Aug 2011 01:47:15 +0200 Message-ID: References: <81ipq7j1xp.fsf@gmail.com> <81aabjj17d.fsf@gmail.com> <87wrenn4ic.fsf@gmail.com> <81vcu7i1g6.fsf@gmail.com> <874o1qn756.fsf@gmail.com> <81y5z2p82h.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:49669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqw1K-0008WJ-FM for emacs-orgmode@gnu.org; Tue, 09 Aug 2011 19:47:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qqw1J-0002hi-3q for emacs-orgmode@gnu.org; Tue, 09 Aug 2011 19:47:38 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:34657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qqw1I-0002gZ-J1 for emacs-orgmode@gnu.org; Tue, 09 Aug 2011 19:47:36 -0400 Received: by bkbzt4 with SMTP id zt4so17955bkb.0 for ; Tue, 09 Aug 2011 16:47:35 -0700 (PDT) In-Reply-To: <81y5z2p82h.fsf@gmail.com> 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: Jambunathan K Cc: emacs-orgmode@gnu.org, Nicolas Goaziou Hello Nicolas and Jambu, On Tue, Aug 9, 2011 at 11:51 PM, Jambunathan K wro= te: >> I see. Contents of inline tasks are meant to be interpreted during >> export. Thus, paragraphs will be marked as

, lists as

    or >> whatever... >> >> This isn't compatible with the default
     tag provided. I can see two
    >> possibilities. Come up with a better default value, or provide a way to
    >> tell to template that contents will be verbatim (or both).
    >>
    >> I prefer the first solution, but I can't think of something simple, yet
    >> elegant enough, for that value. Do you have any suggestion?
    >
    > (I am speaking here from purely html/odt perspective)
    >
    > 1. When org-inlinetask is NOT LOADED, inline tasks are treated as
    > =A0 regular headlines and are listified. (The "END" of inlinetask appears
    > =A0 as listified headline though)
    >
    > 2. If inlinetask is LOADED, the exporter could check the headline level
    > =A0 against org-inlinetask-min-level and take the following actions:
    >
    > =A0 - Continue to generate listified entries for inline tasks but
    > =A0 =A0 surround them with 
    ...
    entries. > > =A0 - Strip the "END" list item from being generated I don't know much html/css but lately I have been fooling around with export of inlinetasks. I found that for html export having them as a section with highlighting seemed to serve my purpose well. It seems to me inline tasks are either used as task reminders in the context of a larger document or as contextual notes. For either case, it serves the purpose better if its highlighted or quoted in some coloured box or something similar. To achieve this, I modified the default templates for html and latex export like this: (html "
    %s%s
    %s
    " '("inlinetask" (unless (eq todo "") (format "%s%s " class todo todo priority)= ) heading content)) ;; this requires the todonotes package (latex "\\todo[inline]{\\textbf{%s %s}\\linebreak{} %s}" '((unless (eq todo "") (format "\\textsc{%s%s}" todo priority)) heading content)) For html export with the above template one could control the styling by defining the div.inlinetask class in their custom.css. To have more control over the styling using multiple css classes, I tried using HTML_CONTAINER_CLASS with an inline task and altering the html template to something like this: (html "
    %s%s
    %s
    " '((org-entry-get nil "HTML_CONTAINER_CLASS") (unless (eq todo "") (format "%s%s " class todo todo priority)= ) heading content)) But that doesn't seem to work at all! I get no errors, just the inlinetask gets exported with an empty class like this:
    ...
    Strangely, if I replace the (org-entry-get ..) with (message "bla"), the exported markup looks something like this:
    ...
    I hope this gives you ideas or scope for improvement for export of inlinetasks. --=20 Suvayu Open source is the future. It sets us free.