emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Asterisk inside example is incorrectly parsed [9.3 (release_9.3 @ /usr/share/emacs/27.0.91/lisp/org/)]
@ 2020-05-18  0:49 Eric Berquist
  2020-05-18 17:23 ` Nick Dokos
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Berquist @ 2020-05-18  0:49 UTC (permalink / raw)
  To: emacs-orgmode

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

The asterisk inside the example block isn't escaped properly, and
appears as a header, leaving `#+begin_example` and `#+end_example` to
appear as regular text. It occurs in at least both the HTML and LaTeX
output. Here is a minimal example to reproduce the problem:

    * first section

    #+begin_example
    * I am not supposed to be a section
    #+end_example

    * second section

    #+begin_example
    Hello, world!
    #+end_example

This is using `emacs -Q`, so I've left off the current state
section. This also happens with Org commit
3c4cb7b296c78aafb0d6302a4075f1f1fa1c7e1c (`org-collect-keywords` was
causing me issues, so I'm not at HEAD).

Emacs  : GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.20, cairo version 1.17.3)
 of 2020-05-17
Package: Org mode version 9.3 (release_9.3 @
/usr/share/emacs/27.0.91/lisp/org/)

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

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

* Re: Bug: Asterisk inside example is incorrectly parsed [9.3 (release_9.3 @ /usr/share/emacs/27.0.91/lisp/org/)]
  2020-05-18  0:49 Bug: Asterisk inside example is incorrectly parsed [9.3 (release_9.3 @ /usr/share/emacs/27.0.91/lisp/org/)] Eric Berquist
@ 2020-05-18 17:23 ` Nick Dokos
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Dokos @ 2020-05-18 17:23 UTC (permalink / raw)
  To: emacs-orgmode

You need to quote the asterisk with a comma:

#+begin_example
,* I am not supposed to be a section
#+end_example

See

 (info "(Org) Literal Examples")


-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler



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

end of thread, other threads:[~2020-05-18 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18  0:49 Bug: Asterisk inside example is incorrectly parsed [9.3 (release_9.3 @ /usr/share/emacs/27.0.91/lisp/org/)] Eric Berquist
2020-05-18 17:23 ` Nick Dokos

Code repositories for project(s) associated with this 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).