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

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

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

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

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

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

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

[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