Re: [O] Bug: org export to html add a unnecessary empty line in "example" block [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/Cellar/emacs-plus/26.1/share/emacs/26.1/lisp/org/)]

2018-12-24 Thread Yasushi SHOJI
Hi Nicolas,

Sorry to reply this old thread but...
Would you mind to apply this fix to the maint branch as well?

Thanks in advance.
-- 
 yashi

On Mon, Jul 2, 2018 at 7:32 AM Nicolas Goaziou  wrote:
>
> Hello,
>
> 孙振祥  writes:
>
> > the org file like
> > : abc
> > : def
> >
> > and export to html will become
> > abc
> > def
> >
> > 
>
> Fixed. Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>



Re: [O] Bug: org export to html add a unnecessary empty line in "example" block [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/Cellar/emacs-plus/26.1/share/emacs/26.1/lisp/org/)]

2018-07-01 Thread Nicolas Goaziou
Hello,

孙振祥  writes:

> the org file like
> : abc
> : def
>
> and export to html will become
> abc
> def
>
> 

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] Bug: org export to html add a unnecessary empty line in "example" block [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/Cellar/emacs-plus/26.1/share/emacs/26.1/lisp/org/)]

2018-07-01 Thread 孙振祥



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


the org file like
: abc
: def

and export to html will become
abc
def




Emacs  : GNU Emacs 26.1 (build 1, x86_64-apple-darwin17.6.0, NS appkit-1561.40 
Version 10.13.5 (Build 17F77))
of 2018-06-05
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
/usr/local/Cellar/emacs-plus/26.1/share/emacs/26.1/lisp/org/)

current state:
==
(setq
org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
org-odt-format-headline-function 'org-odt-format-headline-default-function
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-mode-hook '(#[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-show-block-all append
local]
   5]
 #[0 "\300\301\302\303\304$\207"
   [add-hook change-major-mode-hook org-babel-show-result-all
append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
org-archive-hook '(org-attach-archive-delete-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
org-babel-pre-tangle-hook '(save-buffer)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe
  org-babel-header-arg-expand)
org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS 
WIDTH)"]
org-occur-hook '(org-first-headline-recenter)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
org-speed-command-hook '(org-speed-command-activate
  org-babel-speed-command-activate)
org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
org-confirm-shell-link-function 'yes-or-no-p
org-link-parameters '(("id" :follow org-id-open)
   ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store org-irc-store-link)
   ("info" :follow org-info-open :export org-info-export
:store org-info-store-link)
   ("gnus" :follow org-gnus-open :store
org-gnus-store-link)
   ("docview" :follow org-docview-open :export
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export
:complete org-bbdb-complete-link :store
org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys")
   ("file+emacs") ("doi" :follow org--open-doi-link)
   ("elisp" :follow org--open-elisp-link)
   ("file" :complete org-file-complete-link)
   ("ftp" :follow
(lambda (path) (browse-url (concat "ftp:" path
   ("help" :follow org--open-help-link)
   ("http" :follow
(lambda (path) (browse-url (concat "http:" path
   ("https" :follow
(lambda (path) (browse-url (concat "https:" path
   ("mailto" :follow
(lambda (path) (browse-url (concat "mailto:; path
   ("news" :follow
(lambda (path) (browse-url (concat "news:; path
   ("shell" :follow org--open-shell-link))
org-latex-format-headline-function 'org-latex-format-headline-default-function
org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function
org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]

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

2017-03-05 Thread Nicolas Goaziou
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

2017-03-03 Thread Charles C. Berry

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

2017-03-01 Thread Nicolas Goaziou
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

2017-03-01 Thread D M German
 
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

2017-02-27 Thread Nick Dokos
"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

2017-02-27 Thread Charles C. Berry

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

2017-02-27 Thread dmg
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

2017-02-26 Thread Nicolas Goaziou
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

2017-02-26 Thread dmg
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


[O] [BUG] [HTML] Export to html calls publish function

2013-02-23 Thread Vladimir Lomov
Hello, I faced a problem and I think this is a bug in new exporter, html,
introduced in commit
93a70ac59805bb270d15e951a14be63b9eb1d553
  ox-publish: Implement tools to resolve external fuzzy links   
   

Small test files

#+BEGIN_SRC org :tangle test1.org
,#+TITLE: This is test1 file
,#+AUTHOR: Vladimir Lomov

,* Purpose of this document

The purpose of this document is to show or not to show a problem with
exporting Org document into html.
#+END_SRC

#+BEGIN_SRC org :tangle test2.org
,#+TITLE: Test document number 2
,#+AUTHOR: Vladimir Lomov

,* What I expect from this document

I expect that when exported to html this file will have correct URL,
http://www.orgmode.org, as well as link to external document, like
[[file:test1.org::*Purpose%20of%20this%20document][Purpose of this document]].
#+END_SRC

#+BEGIN_SRC emacs-lisp :tangle debug.el
(setq load-path (cons /usr/share/emacs/site-lisp/org load-path))
(setq debug-on-error t)
(require 'org)
(require 'ox-html)
#+END_SRC

Backtrace:
#+BEGIN_EXAMPLE

Debugger entered--Lisp error: (error `org-publish-cache-get' called, but no 
cache present)
  signal(error (`org-publish-cache-get' called, but no cache present))
  error(`org-publish-cache-get' called, but no cache present)
  org-publish-cache-get(/home/vladimir/tmp/test1.org)
  org-publish-cache-get-file-property(/home/vladimir/tmp/test1.org :numbering 
nil t)
  org-publish-resolve-external-fuzzy-link(test1.org *Purpose of this 
document)
  org-html-link((link (:type file :path test1.org :raw-link 
file:test1.org::*Purpose%20of%20this%20document :application nil 
:search-option *Purpose of this document :begin 231 :end 308 :contents-begin 
282 :contents-end 306 :post-blank 0 :parent (paragraph (:begin 95 :end 310 
:contents-begin 95 :contents-end 310 :post-blank 0 :post-affiliated 95 :parent 
(section (:begin 95 :end 310 :contents-begin 95 :contents-end 310 :post-blank 0 
:parent (headline (:raw-value What I expect from this document :begin 59 :end 
310 :pre-blank 1 :hiddenp outline :contents-begin 95 :contents-end 310 :level 1 
:priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 
:footnote-section-p nil :archivedp nil :commentedp nil :quotedp nil :CATEGORY 
nil :title ... :parent ...) #4)) #2)) #(I expect that when exported to html 
this file will have correct URL,\n 0 69 (:parent #2)) (link (:type http 
:path //www.orgmode.org :raw-link http://www.orgmode.org; :application nil 
:search-option nil :begin 164 :end 186 :contents-begin nil :contents-end nil 
:post-blank 0 :parent #2)) #(, as well as link to external document, like\n 0 
45 (:parent #2)) #0 #(.\n 0 2 (:parent #2 #(Purpose of this document 0 
24 (:parent #0))) #(Purpose of this document 0 24 (:parent (link (:type 
file :path test1.org :raw-link 
file:test1.org::*Purpose%20of%20this%20document :application nil 
:search-option *Purpose of this document :begin 231 :end 308 :contents-begin 
282 :contents-end 306 :post-blank 0 :parent (paragraph (:begin 95 :end 310 
:contents-begin 95 :contents-end 310 :post-blank 0 :post-affiliated 95 :parent 
(section (:begin 95 :end 310 :contents-begin 95 :contents-end 310 :post-blank 0 
:parent ...) #4)) #(I expect that when exported to html this file will have 
correct URL,\n 0 69 (:parent #4)) (link (:type http :path 
//www.orgmode.org :raw-link http://www.orgmode.org; :application nil 
:search-option nil :begin 164 :end 186 :contents-begin nil :contents-end nil 
:post-blank 0 :parent #4)) #(, as well as link to external document, like\n 0 
45 (:parent #4)) #2 #(.\n 0 2 (:parent #4 #(Purpose of this document 0 
24 (:parent #2) (:input-file /home/vladimir/tmp/test2.org :title (Test 
document number 2) :html-extension html :html-link-home  :html-link-up  
:html-mathjax  :html-postamble auto :html-preamble t :html-style  
:html-style-extra  :html-style-include-default t :html-style-include-scripts 
t :html-table-tag table border=\2\ cellspacing=\0\ cellpadding=\6\ 
rules=\groups\ frame=\hsides\ :creator Generated by a 
href=\http://orgmode.org\;Org/a mode 7.9.3e in a 
href=\http://www.gnu.org/software/emacs/\;Emacs/a 24.3.50.1. :with-latex t 
:infojs-opt nil :author (Vladimir Lomov) :date nil :description nil :email 
vladi...@smoon3.smoon.org :exclude-tags (noexport) :headline-levels 3 
:keywords nil :language en :preserve-breaks nil ...))
  org-export-data((link (:type file :path test1.org :raw-link 
file:test1.org::*Purpose%20of%20this%20document :application nil 
:search-option *Purpose of this document :begin 231 :end 308 :contents-begin 
282 :contents-end 306 :post-blank 0 :parent (paragraph (:begin 95 :end 310 
:contents-begin 95 :contents-end 310 :post-blank 0 :post-affiliated 95 :parent 
(section (:begin 95 :end 310 :contents-begin 95 :contents-end 310 :post-blank 0 
:parent (headline (:raw-value What I expect from this document :begin 59 :end 
310 :pre-blank 1 :hiddenp outline :contents-begin 95 :contents-end 310 :level 1 
:priority nil :tags nil 

Re: [O] [BUG] [HTML] Export to html calls publish function

2013-02-23 Thread Nicolas Goaziou
Hello,

Vladimir Lomov lomov...@gmail.com writes:

 Hello, I faced a problem and I think this is a bug in new exporter, html,
 introduced in commit
 93a70ac59805bb270d15e951a14be63b9eb1d553
   ox-publish: Implement tools to resolve external fuzzy links 
  

 Small test files

 #+BEGIN_SRC org :tangle test1.org
 ,#+TITLE: This is test1 file
 ,#+AUTHOR: Vladimir Lomov

 ,* Purpose of this document

 The purpose of this document is to show or not to show a problem with
 exporting Org document into html.
 #+END_SRC
 #+BEGIN_SRC org :tangle test2.org
 ,#+TITLE: Test document number 2
 ,#+AUTHOR: Vladimir Lomov

 ,* What I expect from this document

 I expect that when exported to html this file will have correct URL,
 http://www.orgmode.org, as well as link to external document, like
 [[file:test1.org::*Purpose%20of%20this%20document][Purpose of this document]].
 #+END_SRC
 #+BEGIN_SRC emacs-lisp :tangle debug.el
 (setq load-path (cons /usr/share/emacs/site-lisp/org load-path))
 (setq debug-on-error t)
 (require 'org)
 (require 'ox-html)
 #+END_SRC

It should be fixed. Note that export will not be able to resolve the
search options part when you're not publishing or files do not belong to
the same project. Prefer id property in this case.

Thank you for reporting the problem.


Regards,

-- 
Nicolas Goaziou



[O] bug with export as html?

2011-04-15 Thread Richard Riley


,
| + Create a file for each vhost you wish to redirect email for. From our 
example
|   we create /etc/exim4/virtualhosts/myweb.com. In it we place our email
|   mappings. Here is an example:-
| #+begin_example
| info: i...@gmail.com
| webmaster: webmas...@gmail.com
| * : :blackhole:
| #+end_example
| Here we can see that i...@myweb.com gets sent to i...@gmail.com. Easy peasy.
`

My export finished at the blackhole line. Any org mark up characters
inside literal blocks should be ignored I thought. It seems that

org-export-as-html

falls over in my export at that * in the src block.

Something I can tweak or a legitimate bug?



Re: [O] bug with export as html?

2011-04-15 Thread Nick Dokos
Richard Riley rile...@googlemail.com wrote:

 
 
 ,
 | + Create a file for each vhost you wish to redirect email for. From our 
 example
 |   we create /etc/exim4/virtualhosts/myweb.com. In it we place our email
 |   mappings. Here is an example:-
 | #+begin_example
 | info: i...@gmail.com
 | webmaster: webmas...@gmail.com
 | * : :blackhole:
 | #+end_example
 | Here we can see that i...@myweb.com gets sent to i...@gmail.com. Easy peasy.
 `
 
 My export finished at the blackhole line. Any org mark up characters
 inside literal blocks should be ignored I thought. It seems that
 
 org-export-as-html
 
 falls over in my export at that * in the src block.
 
 Something I can tweak or a legitimate bug?
 

Perhaps upgrade to latest? I cannot reproduce this either as it stands or with
a headline added. The relevant portion of the html file (with the headline 
added)
looks like this:

,
| div id=outline-container-1 class=outline-2
| h2 id=sec-1span class=section-number-21/span foo /h2
| div class=outline-text-2 id=text-1
| 
| ul
| liCreate a file for each vhost you wish to redirect email for. From our 
example
|   we create /etc/exim4/virtualhosts/myweb.com. In it we place our email
|   mappings. Here is an example:-
| /li
| /ul
| 
| 
| 
| 
| pre class=exampleinfo: i...@gmail.com
| webmaster: webmas...@gmail.com
| * : :blackhole:
| /pre
| 
| 
| p
| Here we can see that i...@myweb.com gets sent to i...@gmail.com. Easy peasy.
| /p
`

Nick