From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Leech-Pepin Subject: Possible bug: List items with * in them when *:nil Date: Sun, 29 Jan 2012 13:24:03 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00504502ceb7ae4de504b7aed550 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrZQ7-0001DY-PQ for emacs-orgmode@gnu.org; Sun, 29 Jan 2012 13:24:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrZQ5-0002SV-EL for emacs-orgmode@gnu.org; Sun, 29 Jan 2012 13:24:07 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:47183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrZQ5-0002SE-9s for emacs-orgmode@gnu.org; Sun, 29 Jan 2012 13:24:05 -0500 Received: by wera13 with SMTP id a13so3177137wer.0 for ; Sun, 29 Jan 2012 10:24:04 -0800 (PST) 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: Org Mode Mailing List --00504502ceb7ae4de504b7aed550 Content-Type: text/plain; charset=ISO-8859-1 The following question came up on Stack Overflow: http://stackoverflow.com/questions/9051330/possible-bug-in-org-mode-export-of-item-with The following sample org file does not export as possibly expected. ,------------------------------------------- | #+TITLE: Bug? | #+OPTIONS: *:nil toc:nil author:nil | | - hello (*) I would like to have two items | - may (*) I please? `------------------------------------------- Instead of the two items being listed with (*) as a part of their items they are placed on a single line as though they were still being wrapped in bold tags. I tested this further and it occurs in LaTeX, HTML and ODT exports. ASCII does the right thing and exports it as two list items. HTML: ,---------------------------------------------------------------------- |
    |
  • hello (*) I would like to have two items - may (*) I please? |
  • |
`---------------------------------------------------------------------- LaTeX: ,------------------------------------------------------------------- | \begin{itemize} | \item hello (*) I would like to have two items - may (*) I please? | \end{itemize} `------------------------------------------------------------------- Is this the expected behaviour when *:nil is set on export? I know you can simply escape the *'s as \* to get the desired result (both with and without *:nil). However it does seem odd to me that it will insert the *s as expected in the export, while at the same time keep the text wrapping that *[...]* creates for bold-face purposes. Regards, Jonathan --00504502ceb7ae4de504b7aed550 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The following question came up on Stack Overflow:
http://stackoverflow.com/questions/9051330/possible-bug-in-org-mode= -export-of-item-with

The following sample org file does not export as possibly expected.
=
,-------------------------------------------
| #+TITLE: Bug? =
| #+OPTIONS: *:nil toc:nil author:nil
|
| - hello (*) I would like = to have two items
| - may (*) I please?
`-----= --------------------------------------

Instead of the two items bein= g listed with (*) as a part of their
items they are placed on a single line as though they were still being
w= rapped in bold tags. I tested this further and it occurs in LaTeX,
HTML= and ODT exports. ASCII does the right thing and exports it as
two list= items.

HTML:
,-------------------------------------------------------------= ---------
| <ul> =
| <li>hello (*) I would like to have two items - m= ay (*) I please?
| </li> =
| </ul> =
`--------------------------------------------------------------= --------

LaTeX:
,------------------------------------------------------------= -------
| \begin{itemize} =
| \item hello (*) I would like to have two items - may (*) I please= ?
| \end{itemize}
`--= -----------------------------------------------------------------

Is= this the expected behaviour when *:nil is set on export? I know
you ca= n simply escape the *'s as \* to get the desired result (both
with and without *:nil). However it does seem odd to me that it will
in= sert the *s as expected in the export, while at the same time keep
the t= ext wrapping that *[...]* creates for bold-face purposes.

Regards, Jonathan

--00504502ceb7ae4de504b7aed550-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Possible bug: List items with * in them when *:nil Date: Mon, 30 Jan 2012 07:42:52 +0100 Message-ID: <87obtld72f.fsf@altern.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrkw4-0003ba-02 for emacs-orgmode@gnu.org; Mon, 30 Jan 2012 01:41:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rrkw2-0007Tc-KZ for emacs-orgmode@gnu.org; Mon, 30 Jan 2012 01:41:51 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:34725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrkw2-0007TO-EK for emacs-orgmode@gnu.org; Mon, 30 Jan 2012 01:41:50 -0500 Received: by wgbds1 with SMTP id ds1so3241038wgb.30 for ; Sun, 29 Jan 2012 22:41:49 -0800 (PST) In-Reply-To: (Jonathan Leech-Pepin's message of "Sun, 29 Jan 2012 13:24:03 -0500") 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: Jonathan Leech-Pepin Cc: Org Mode Mailing List Hi Jonathan, Jonathan Leech-Pepin writes: > The following sample org file does not export as possibly expected. > > ,------------------------------------------- > | #+TITLE: Bug? > | #+OPTIONS: *:nil toc:nil author:nil > | > | - hello (*) I would like to have two items > | - may (*) I please? > `------------------------------------------- > > Instead of the two items being listed with (*) as a part of their > items they are placed on a single line as though they were still > being > wrapped in bold tags. I tested this further and it occurs in LaTeX, > HTML and ODT exports. ASCII does the right thing and exports it as > two list items. The *:nil option is not the problem here. The problem comes from the fact that the * in (*) actually _do_ emphasize the text (it is in bold font in the buffer). Given that, the exporter does its best, which is not very good. The bug here is to allow multiline fontification over distinct list items -- we'll try to fix it, but that's a rather complex issue. On top of the workaround above, have a look at `org-emphasis-regexp-components', thru which you can prevent parentheses as post/pre-characters in a fontified string. HTH, PS: FWIW, I also sent this reply to StackOverflow, thanks for forwarding questions from there to here! -- Bastien