From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uJBELAcmyV4vOgAA0tVLHw (envelope-from ) for ; Sat, 23 May 2020 13:32:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oLUYKAcmyV4nJQAA1q6Kng (envelope-from ) for ; Sat, 23 May 2020 13:32:55 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F270C940429 for ; Sat, 23 May 2020 13:32:53 +0000 (UTC) Received: from localhost ([::1]:34330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcUGi-0002mU-Vf for larch@yhetil.org; Sat, 23 May 2020 09:32:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcUGN-0002mM-FT for emacs-orgmode@gnu.org; Sat, 23 May 2020 09:32:31 -0400 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]:37738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcUGL-0006gJ-OE for emacs-orgmode@gnu.org; Sat, 23 May 2020 09:32:30 -0400 Received: by mail-il1-x12f.google.com with SMTP id r2so2346681ila.4 for ; Sat, 23 May 2020 06:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ontotext.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=iiS3G+sRTv9gATnKa4NhFDsGDYiLYpI3D8NZhfEvKoo=; b=ONBDwEHI+nXNyL/MXkrZEvDRfwFgEOMlpFEsZCVzTufW1uKs/1tgvQuxLPzlOe0e7U fdWAnDtZ/6/bKML7zDYIwMZ+XfI487NJIRPhtCKnn2gehN2dRBG8HR6x5aaKB+3ej9D4 N33FXpXac55uMmEuTo5CTcg8qvomGIsOLBVc0GeacPvyTCk0/ySJbTnCyCvhIqq6n3GM X9uDT2pKtqdGsZfdkb9rEMRftHr4xDH5nGHUFgd0rWTwAE2EPcarZU5wYqTAB0t1EX8D mGnFnel7o3WA+K5/TGd5PbLenGSvYWwAL5DtEBazqSfEnIPuIZwrOf4ux7W19f+y82CS 5u/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=iiS3G+sRTv9gATnKa4NhFDsGDYiLYpI3D8NZhfEvKoo=; b=CobUx8LpVs5oY8D76cMNyWD/LF3KryAQiYjI4AOZ1UxRJty2rLDEtQNT8YbZGEd0fk l/qEno3ubTYI+ADfwMX7wPvKxdI6jsN4PlDEnjUXW3q7TB4DdU0/3QeVbKb2fmADv5tl xqCyuIMEeTw4PFBPFaSwijf6zL+db0oOKb1PaSL6QIbupWedOUjbm/QiAhIpdq+Y7jZE Vml2JJ9bcE9nNSW9x6koqyvII8yqBQNvVrWCYn1YWooxHO8eG4k7Q4PnFUnGz6T7NvL8 C/7a2rYsRVhy++5hCrtE0ZuD53qWI0nGlU22x7t03s3C6C9nBN6PEhRPdQr8Z8HoxRea jIwQ== X-Gm-Message-State: AOAM53186aRcl4gSYqHMmI/NzMA21Y9BOZHUCNuG04S5T5C3sB/tFlGS QW7Rd71KCkXs74wQEDbG/87M05wgA2lzyjcQvRGOpvBzuW4= X-Google-Smtp-Source: ABdhPJyytEdUPHAqRrvpKWS0Fikn1xuyk4DKhDRPGEZaFxjrY0JBWnMP/hI+BSqTFP9AwrFsj2kIArvZnoy3v8v7VY8= X-Received: by 2002:a92:1d45:: with SMTP id d66mr1326021ild.219.1590240746765; Sat, 23 May 2020 06:32:26 -0700 (PDT) MIME-Version: 1.0 From: Vladimir Alexiev Date: Sat, 23 May 2020 16:32:16 +0300 Message-ID: Subject: org-babel-demarcate-block doesn't respect case preference To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000d19a4805a650c660" Received-SPF: softfail client-ip=2607:f8b0:4864:20::12f; envelope-from=vladimir.alexiev@ontotext.com; helo=mail-il1-x12f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=ontotext.com header.s=google header.b=ONBDwEHI; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.21 X-TUID: 4aTW6jkPVucF --000000000000d19a4805a650c660 Content-Type: text/plain; charset="UTF-8" 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. --000000000000d19a4805a650c660 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
org-babel-upper= case-example-markers says whether to insert BEGIN_SRC or begin_src.

org-babel-demarcate-block doe= sn't respect this setting:
<= div>makes this check

(lower-case-p (an= d block
=C2=A0 (let (case-fold-search)
=C2=A0 =C2=A0 (string-ma= tch-p "#\\+begin_src" block)))))

which sets=C2=A0 lower-case-p only if it's inside an existing lowercase block (i.e. when= splitting a block).
Otherwise (when demarcating=C2=A0the region)= it goes with uppercase.

=
--000000000000d19a4805a650c660--