Re: [O] Bug report: export to HTML does not escape * in example
Hello, "Charles C. Berry" writes: > On Wed, 1 Mar 2017, Nicolas Goaziou wrote: > >> Hello, >> >> D M German writes: >> >>> So the original issue (* not being escaped) will nonetheless appear when >>> the threshold is passed: >>> >> >> Fixed. Thank you. >> > > Hmmm. Now I get > > :FAILED test-ob/org-babel-insert-result > > for make test2, which appears to be from trying to match > > ",\\* Not an headline" " > > to > > #+RESULTS: > : * Not an headline > > in test-ob/org-babel-insert-result Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] Bug report: export to HTML does not escape * in example
On Wed, 1 Mar 2017, Nicolas Goaziou wrote: Hello, D M German writes: So the original issue (* not being escaped) will nonetheless appear when the threshold is passed: Fixed. Thank you. Hmmm. Now I get :FAILED test-ob/org-babel-insert-result for make test2, which appears to be from trying to match ",\\* Not an headline" " to #+RESULTS: : * Not an headline in test-ob/org-babel-insert-result HTH, Chuck
Re: [O] Bug report: export to HTML does not escape * in example
Hello, D M German writes: > 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 Fixed. Thank you. Regards, -- Nicolas Goaziou0x80A93738
Re: [O] Bug report: export to HTML does not escape * in example
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 container: Charles> Charles> * Hello Charles> Charles> using Org 9.0.5. Charles> Without that header the src code gets wrapped in a 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 .
Re: [O] Bug report: export to HTML does not escape * in example
"Charles C. Berry" writes: > On Mon, 27 Feb 2017, dmg wrote: > >> On Sun, Feb 26, 2017 at 11:40 PM, Nicolas Goaziou >> wrote: >> >>> >>> A star at the beginning of a line is always a headline. > > [...] > >> >> Thank you. I guess the issue is then with org-babel. >> >> 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? > > Is that *really* what it did? > > When I run your example, I get: > > #+RESULTS: > : * Hello > > and this exports (with the `:exports results' header) to html wrapped > in a container: > > > * Hello > > > using Org 9.0.5. > > Without that header the src code gets wrapped in a container. > > So there must be something in/about your setup you haven't mentioned. > Probably org-babel-min-lines-for-block-output is set to a small value, maybe 0 (?) -- Nick
Re: [O] Bug report: export to HTML does not escape * in example
On Mon, 27 Feb 2017, dmg wrote: On Sun, Feb 26, 2017 at 11:40 PM, Nicolas Goaziou wrote: A star at the beginning of a line is always a headline. [...] Thank you. I guess the issue is then with org-babel. 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? Is that *really* what it did? When I run your example, I get: #+RESULTS: : * Hello and this exports (with the `:exports results' header) to html wrapped in a container: * Hello using Org 9.0.5. Without that header the src code gets wrapped in a container. So there must be something in/about your setup you haven't mentioned. HTH, Chuck
Re: [O] Bug report: export to HTML does not escape * in example
On Sun, Feb 26, 2017 at 11:40 PM, Nicolas Goaziou wrote: > > A star at the beginning of a line is always a headline. It has > precedence over the block around it. You need to escape the star > character: > > #+begin_example > ,* hello world > #+end_example > > Regards, Thank you. I guess the issue is then with org-babel. 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? thanks again, --daniel -- --dmg --- Daniel M. German http://turingmachine.org
Re: [O] Bug report: export to HTML does not escape * in example
Hello, dmg writes: > The following example: > > > * Example > > #+begin_example > hello world > #+end_example > > #+begin_example > * hello world > #+end_example > > exports an HTML file where the second "hello word" is interpreted as a > header, ignoring that it is within begin_example. See below A star at the beginning of a line is always a headline. It has precedence over the block around it. You need to escape the star character: #+begin_example ,* hello world #+end_example Regards, -- Nicolas Goaziou
[O] Bug report: export to HTML does not escape * in example
The following example: * Example #+begin_example hello world #+end_example #+begin_example * hello world #+end_example exports an HTML file where the second "hello word" is interpreted as a header, ignoring that it is within begin_example. See below I am using org-mode version 9.0.3, under emacs-25. Table of Contents 1. Example 2. hello world 2 1 Example hello world 1 #+beginexample 2 hello world 2 #+endexample -- --dmg --- Daniel M. German http://turingmachine.org