emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Possible bug: List items with * in them when *:nil
@ 2012-01-29 18:24 Jonathan Leech-Pepin
  2012-01-30  6:42 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Leech-Pepin @ 2012-01-29 18:24 UTC (permalink / raw)
  To: Org Mode Mailing List

[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]

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:
,----------------------------------------------------------------------
| <ul>
| <li>hello (*) I would like to have two items - may (*) 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 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

[-- Attachment #2: Type: text/html, Size: 2261 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Possible bug: List items with * in them when *:nil
  2012-01-29 18:24 Possible bug: List items with * in them when *:nil Jonathan Leech-Pepin
@ 2012-01-30  6:42 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2012-01-30  6:42 UTC (permalink / raw)
  To: Jonathan Leech-Pepin; +Cc: Org Mode Mailing List

Hi Jonathan,

Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-30  6:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-29 18:24 Possible bug: List items with * in them when *:nil Jonathan Leech-Pepin
2012-01-30  6:42 ` Bastien

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).