[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug report: export to HTML does not escape * in example

From: D M German
Subject: Re: [O] Bug report: export to HTML does not escape * in example
Date: Wed, 01 Mar 2017 12:04:55 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Charles, everybody,

 >> I am running a babel script that generates, as one of its line * in the
 >> front:
 >> ​#+BEGIN_SRC sh
 >> echo "* Hello"
 >> #+END_SRC
 >> #+RESULTS:
 >> #+begin_example
 >> * Hello
 >> #+end_example
 >> ​In that case, should babel be the one escaping the * in the RESULTS block?

 Charles> Is that *really* what it did?

 Charles> When I run your example, I get:

 Charles> #+RESULTS:
 Charles> : * Hello

 Charles> and this exports (with the `:exports results' header) to html wrapped 
in a <pre class="example"> container:

 Charles> <pre class="example">
 Charles> * Hello
 Charles> </pre>

 Charles> using Org 9.0.5.

 Charles> Without that header the src code gets wrapped in a <pre> container.

 Charles> So there must be something in/about your setup you haven't mentioned.

 Charles> HTH,

 Charles> Chuck

I looked a bit into my configuration. In my configuration, I set the value of 
org-babel-min-lines-for-block-output to 0.

The default value of this variable is by default 10.

When the number of lines in the output is larger than it, it uses
EXAMPLE blocks rather than the escaped ones.

So the original issue (* not being escaped) will nonetheless appear when
the threshold is passed:

Here is an example (I run it with emacs -nw -q, using emacs25) org
version 8.2.10 (this works also in my configuration under 9.0.2)

#+BEGIN_SRC emacs-lisp :results output
(dotimes (i 2) (print '*hello))

: *hello
: *hello

#+BEGIN_SRC emacs-lisp :results output
(dotimes (i 10) (print '*hello))








thank you all again,

Daniel M. German                  "Cyberspace. A consensual hallucination
                                   experienced daily by billions
   William Gibson ->               of legitimate operators in every nation"
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .

reply via email to

[Prev in Thread] Current Thread [Next in Thread]