Re: [BUG] ox-html does not export captions of source blocks without language

2023-01-23 Thread Ihor Radchenko
Ihor Radchenko writes: > Ihor Radchenko writes: > >> Here is the plan to resolve this issue: >> >> 1. We update the manual allowing src blocks to have empty language spec > > See the attached patch. Applied onto main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d98ca046cc763

Re: [BUG] ox-html does not export captions of source blocks without language

2023-01-16 Thread Ihor Radchenko
Ihor Radchenko writes: > Here is the plan to resolve this issue: > > 1. We update the manual allowing src blocks to have empty language spec See the attached patch. > 2. We update org-syntax document It turned out to be unnecessary. org-syntax document already declares block DATA to be option

Re: [BUG] ox-html does not export captions of source blocks without language

2022-12-27 Thread Ihor Radchenko
Johan Bolmsjö writes: > ** Description > > The caption "Caption 1" is not exported by ox-html in the following > source block. > > #+caption: Caption 1 > #+begin_src > foo bar baz > #+end_src > > The caption "Caption 2" is exported by ox-html in the following source > block. > > #+caption: Captio

Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-17 Thread Tim Cross
Tom Gillespie writes: > Treating src blocks missing a lang as paragraphs is > incorrect because according to the syntax spec they > are syntactically still blocks (greater or lesser depending > on your inclinations). > > I think the general principle we want to follow here is > that a block (or

Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-17 Thread Ihor Radchenko
Max Nikulin writes: > Source blocks without language may be treated as #+begin_example blocks. > I believe, a warning should be issued in such case. M-x org-lint already does it. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support

Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-16 Thread Tom Gillespie
Hi Ihor, Chiming in here with a slight variant on what others have said. Best! Tom I don't think this should be handled at the syntactic layer at all. The empty string block language should be syntactically valid with any special behavior needed being handled later. Linters could treat it as a

RE: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-15 Thread Pedro Andres Aranda Gutierrez
No, please. For two reasons: 1.- In HTML, you have 2.- This could trickle to other backends where it makes sense Thanks, /PA -- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.wor

Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-15 Thread Ihor Radchenko
Tim Cross writes: > I don't see any reason not to allow captions for examples either. In LaTeX, example blocks are exported as verbatim. I am not sure if we can even put captions into verbatim. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at

Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-15 Thread Tim Cross
Max Nikulin writes: > On 15/12/2022 16:31, Ihor Radchenko wrote: >> The actual parser does allow empty lang in src blocks, setting :lang >> element property to nil. Should we stop doing this and treat such src >> blocks as paragraphs? Or should we allow empty lang and instead adapt >> the expor

Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-15 Thread Timothy
Hi Ihor, > There is an inconsistency here between Org parser and > + manual. > > The actual parser does allow empty lang in src blocks, setting :lang > element property to nil. Should we stop doing this and treat such src > blocks as paragraphs? Or should

Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-15 Thread Max Nikulin
On 15/12/2022 16:31, Ihor Radchenko wrote: The actual parser does allow empty lang in src blocks, setting :lang element property to nil. Should we stop doing this and treat such src blocks as paragraphs? Or should we allow empty lang and instead adapt the exporters to treat empty lang correctly?

Re: [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-15 Thread Kaushal Modi
On Thu, Dec 15, 2022, 4:32 AM Ihor Radchenko wrote: > Johan Bolmsjö writes: > > > #+caption: Caption 1 > > #+begin_src > > foo bar baz > > #+end_src > > There is an inconsistency here between Org parser and > https://orgmode.org/worg/org-syntax.html + manual. > > The actual parser does allow emp

[Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language)

2022-12-15 Thread Ihor Radchenko
Johan Bolmsjö writes: > #+caption: Caption 1 > #+begin_src > foo bar baz > #+end_src There is an inconsistency here between Org parser and https://orgmode.org/worg/org-syntax.html + manual. The actual parser does allow empty lang in src blocks, setting :lang element property to nil. Should we s

Re: [BUG] ox-html does not export captions of source blocks without language

2022-12-14 Thread Johan Bolmsjö
On Wed, Dec 14, 2022, at 22:51, Kaushal Modi wrote: > On Wed, Dec 14, 2022, 4:44 PM Johan Bolmsjö > wrote: >> The caption "Caption 1" is not exported by ox-html in the following >> source block. >> >> #+caption: Caption 1 >> #+begin_src >> foo bar baz >> #+end_src > > The begin_src block always

Re: [BUG] ox-html does not export captions of source blocks without language

2022-12-14 Thread Kaushal Modi
On Wed, Dec 14, 2022, 4:44 PM Johan Bolmsjö wrote: > ** Description > > The caption "Caption 1" is not exported by ox-html in the following > source block. > > #+caption: Caption 1 > #+begin_src > foo bar baz > #+end_src > The begin_src block always requires a "language" as far as I know. If you

[BUG] ox-html does not export captions of source blocks without language

2022-12-14 Thread Johan Bolmsjö
** Description The caption "Caption 1" is not exported by ox-html in the following source block. #+caption: Caption 1 #+begin_src foo bar baz #+end_src The caption "Caption 2" is exported by ox-html in the following source block. #+caption: Caption 2 #+begin_src sh echo foo bar baz #+end_src