From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Problem with html export of description list items Date: Thu, 07 Apr 2011 14:51:06 +0200 Message-ID: <87bp0i5io5.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=58063 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7og4-0006fH-SY for emacs-orgmode@gnu.org; Thu, 07 Apr 2011 08:51:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7og3-0003BF-Qf for emacs-orgmode@gnu.org; Thu, 07 Apr 2011 08:51:12 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:50872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7og3-00035P-MO for emacs-orgmode@gnu.org; Thu, 07 Apr 2011 08:51:11 -0400 Received: by mail-wy0-f169.google.com with SMTP id 19so2586738wyf.0 for ; Thu, 07 Apr 2011 05:51:11 -0700 (PDT) In-Reply-To: (Ethan Ligon's message of "Wed, 6 Apr 2011 00:38:36 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ethan Ligon Cc: emacs-orgmode@gnu.org Hello, Ethan Ligon writes: > Ethan Ligon are.berkeley.edu> writes: >> >> I've just stumbled across what I regard as a bug in the html export of >> description list items. >> >> The problem has to do with whether the specification of a description >> list includes a trailing space or not; i.e., whether "- Item ::" is >> treated the same way as "- Item :: ". LaTeX export treats these as >> identical. Html export gets confused about what the description list >> item is, and winds up generating a "???" for the description. LaTeX exporter doesn't treats these as identical. What happens is that in your example, the first item is correct and the list is thus set as a description list. As such, LaTeX exporter tries hard to fill description terms for every item in the list. If you exchange the first and second items in your example, the list will be exported as a standard itemize list in LaTeX. For HTML (and DocBook) exporter, this is a little different, and term recognition is hard-coded there. I will modify that. > Having done the work to describe the problem, it wasn't hard to find a > solution. In this case that's a one character change to a regexp in > org-html.el. > > Here's the patch: > > diff --git a/lisp/org-html.el b/lisp/org-html.el > index d19d88b..005a0f7 100644 > --- a/lisp/org-html.el > +++ b/lisp/org-html.el > @@ -2501,7 +2501,7 @@ the alist of previous items." > (concat "[ \t]*\\(\\S-+[ \t]*\\)" > "\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\]\\)?" > "\\(?:\\(\\[[ X-]\\]\\)[ \t]+\\)?" > - "\\(?:\\(.*\\)[ \t]+::[ \t]+\\)?" > + "\\(?:\\(.*\\)[ \t]+::[ \t]*\\)?" > "\\(.*\\)") line) > (let* ((checkbox (match-string 3 line)) > (desc-tag (or (match-string 4 line) "???")) Your patch allows items like: - term ::description which are not valid for a description list. Regards, -- Nicolas Goaziou