Max Nikulin <maniku...@gmail.com> 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 exporters to treat empty lang correctly? > > Source blocks without language may be treated as #+begin_example blocks. I > believe, a > warning should be issued in such case. > > I do not see a reason why caption is not allowed for examples. Yes, I think I agree. Semantically, a src block without a language is really just an example block - it cannot be executed or evaluated and is essentially reduced to a example block. I think having a warning is also a good idea as it will alert users when they have inadvertently forgotten to add the lang. I don't see any reason not to allow captions for examples either.