From: D M German <dmg@turingmachine.org>
To: "Charles C. Berry" <ccberry@ucsd.edu>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>,
Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: Bug report: export to HTML does not escape * in example
Date: Wed, 01 Mar 2017 12:04:55 -0800 [thread overview]
Message-ID: <87mvd4226w.fsf@turingmachine.org> (raw)
In-Reply-To: <alpine.OSX.2.20.1702270935360.918@charles-berrys-macbook.local> (Charles C. Berry's message of "Mon, 27 Feb 2017 09:57:13 -0800")
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))
#+END_SRC
#+RESULTS:
:
: *hello
:
: *hello
#+BEGIN_SRC emacs-lisp :results output
(dotimes (i 10) (print '*hello))
#+END_SRC
#+RESULTS:
#+begin_example
*hello
*hello
*hello
*hello
*hello
#+end_example
thank you all again,
--
Daniel M. German "Cyberspace. A consensual hallucination
experienced daily by billions
William Gibson -> of legitimate operators in every nation"
http://turingmachine.org/
http://silvernegative.com/
dmg (at) uvic (dot) ca
replace (at) with @ and (dot) with .
next prev parent reply other threads:[~2017-03-01 20:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 1:00 Bug report: export to HTML does not escape * in example dmg
2017-02-27 7:40 ` Nicolas Goaziou
2017-02-27 8:24 ` dmg
2017-02-27 17:57 ` Charles C. Berry
2017-02-27 19:04 ` Nick Dokos
2017-03-01 20:04 ` D M German [this message]
2017-03-01 21:20 ` Nicolas Goaziou
2017-03-03 19:06 ` Charles C. Berry
2017-03-05 17:06 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvd4226w.fsf@turingmachine.org \
--to=dmg@turingmachine.org \
--cc=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).