[-- Attachment #1: Type: text/plain, Size: 496 bytes --] org-babel-uppercase-example-markers says whether to insert BEGIN_SRC or begin_src. org-babel-demarcate-block doesn't respect this setting: https://code.orgmode.org/bzg/org-mode/src/master/lisp/ob-core.el#L1893 makes this check (lower-case-p (and block (let (case-fold-search) (string-match-p "#\\+begin_src" block))))) which sets lower-case-p only if it's inside an existing lowercase block (i.e. when splitting a block). Otherwise (when demarcating the region) it goes with uppercase. [-- Attachment #2: Type: text/html, Size: 1050 bytes --]
Hi Vladimir,
Vladimir Alexiev <vladimir.alexiev@ontotext.com> writes:
> org-babel-uppercase-example-markers says whether to insert BEGIN_SRC
> or begin_src.
Not really, it says whether to insert BEGIN_EXAMPLE or begin_example.
FWIW I think we should stick to the convention that Org inserts
lower-case #+begin* keywords as a default, but still matches
upper-case occurrences for backward compatibility when needed.
--
Bastien
[-- Attachment #1: Type: text/plain, Size: 131 bytes --] > Org inserts lower-case #+begin* keywords as a default But org-babel-demarcate-block doesn't do that in the case of new block. [-- Attachment #2: Type: text/html, Size: 192 bytes --]
Hi Vladimir,
Vladimir Alexiev <vladimir.alexiev@ontotext.com> writes:
>> Org inserts lower-case #+begin* keywords as a default
>
> But org-babel-demarcate-block doesn't do that in the case of new
> block.
Indeed, I pushed a fix to master so that org-babel-demarcate-block
insert lower-case keywords, unless upper-case ones are required.
Thanks,
--
Bastien