From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QNFpL9+DpmLx5gAAbAwnHQ (envelope-from ) for ; Mon, 13 Jun 2022 02:25:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4C9IL9+DpmJKFQEAauVa8A (envelope-from ) for ; Mon, 13 Jun 2022 02:25:03 +0200 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 13C5D162E4 for ; Mon, 13 Jun 2022 02:25:03 +0200 (CEST) Received: from localhost ([::1]:48240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0Xt7-0000py-Np for larch@yhetil.org; Sun, 12 Jun 2022 20:25:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0Xsb-0000ma-Tu for emacs-orgmode@gnu.org; Sun, 12 Jun 2022 20:24:29 -0400 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]:41526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0Xsa-0002jK-3b for emacs-orgmode@gnu.org; Sun, 12 Jun 2022 20:24:29 -0400 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-30ce6492a60so36015417b3.8 for ; Sun, 12 Jun 2022 17:24:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=VnvpNYK7JQqwzjCey42hwPpqni5fvwE/QcunRfUprJs=; b=CHm1PM40Z+0OAukJx3BEfIxca3b3+e5tKythfv29+5be3QjBxBJRtVz4ZNbmG8VCyg gmc1hCMSpGZCmQkS+bTkxDrqLKCiF6Mn73XfH2kzX4i2ghdTr53XI1jCBVpXcmFmNJ46 osXlcOaww4tMNzrfgfwUmrwN3672SwgNBWg7rZ6cd7J4H+P208V0cZkKysV+hB+vvlWJ +lG2wnsnhq0GiiPJMKDSzG2xMcRbbWyu7NdlN+/3AmwzKTcTBgoX32PBua5XK4RevVzE 7HjYkuqNVD7nJ7VXblFYqA3jsHCG9tR/u4bJWM9CnlC9tUNQWor+ftYmXSMD7VSdQ6hj hVAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=VnvpNYK7JQqwzjCey42hwPpqni5fvwE/QcunRfUprJs=; b=Qv6hIk3WAmynBVLUqFf0BDAPz3OqG0vLe5SfN9mShLaOcDkjAVUpInUD6Lh31bl5Oa 9AFx6RFUfwWmrKJTidcuvBnUYSl2GzQJAtsT3KvwFLwDFcymNNjSdpgltyBF9MtQmnjw en4kDU62vpHObPJH84ZvPEK/3FyN1EutrjdETfftujYTg64jmV6XUWMbSiS43PDrBszD mBnXjP5z62IkFP4vcU21UGknkjpTuA2086QuF8J3lhJ4odeqpqd83QYK57OOTJVOUUNO jvkqJZYt24AISuXzM4rOuZf4R05QbyuwsCEqtHFLLPLBFeabUO3NHUkIHV+Zu3A1NKZd /YeA== X-Gm-Message-State: AOAM533WVogsMuU3/k6WQj2bpFnq0fVg/5Hc2QDlgiH1/Ek9wk6o1hcD k8njCnIK3ogoO/zUAnBAh63HDZR1z7fZSzP8uUN80heB8aZWYg== X-Google-Smtp-Source: ABdhPJwrOJw+WdVDIXsG5AMX77U+b3oPDu79U7+r9oFmGLCdjsaO/RR+7pCC1S/IRHIy7j1CdE5jE2QNxSq3FdaZ80s= X-Received: by 2002:a05:690c:808:b0:30c:4f5c:b319 with SMTP id bx8-20020a05690c080800b0030c4f5cb319mr59605962ywb.64.1655079866584; Sun, 12 Jun 2022 17:24:26 -0700 (PDT) MIME-Version: 1.0 From: dalanicolai Date: Mon, 13 Jun 2022 02:24:15 +0200 Message-ID: Subject: [BUG] demarcate block splits block even when outside of src-block To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000085d48405e1494fee" Received-SPF: pass client-ip=2607:f8b0:4864:20::112a; envelope-from=dalanicolai@gmail.com; helo=mail-yw1-x112a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 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-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655079903; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=VnvpNYK7JQqwzjCey42hwPpqni5fvwE/QcunRfUprJs=; b=rsD95M+Miu6MgL+fhN7UamHdBZl4Bdda6W6hh3azmnDJ94jm0CqB2h3V1pJXPOR3YFamZl dfozLGNTAEPhKrx5bAOnQkmaySVrdXGP9UBsLmR/jTemF4uqD5aOCjSypL16EB0wqEh0X8 nQPGQAMv64uzpRGnLzI6NAS97A6fj8fO83rwwj6Tcktsl2VPSMYkMS4zVNzBM8auGVyLds xQHK6+0t7/+kB/0gkvN3V9emhXRQ3SLm/VJEi3o3F5RYS2Xd9Fxdw3HA593aBo5X6cbwj6 w6ibpOg7xSsJE0Qbbx3qhyKnIxuk0MRnflJcyYD6SNpk5HOvVxFlU1tWLt7dUw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655079903; a=rsa-sha256; cv=none; b=A4ze86dAJrXqNJNAPfSGAZG+Itc1A9INNovr1WZEMkVEREjOt4NJxvBfN2N+vl4u2WqLTp 2eaxbzOshY4BloAbIZe9aCa+kCltxRHnFI8KSOXi8t0zvNgEDnbwz55XdAIpiyFokM9cgO RS2khi6svirptAkyWOysjjqTeBRBuDnLI1exbgFIx0IjJE+UXnIDoRs5jyaB14fP1yFaUV J5iH7/9y6jUrCtNeL7cEL1MI0Xvg9dtQwN+sOnGCQsN05IzsnKxhEvWJidiLoKVQCXqvTj PE6D3X1YLE0Jh1h7es/Ic2Y61ydy86uVnS4XULmQv2SnK5/xs1Y+uky2EIwPqQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CHm1PM40; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.99 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=CHm1PM40; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 13C5D162E4 X-Spam-Score: -3.99 X-Migadu-Scanner: scn1.migadu.com X-TUID: nDchc90esFXg --00000000000085d48405e1494fee Content-Type: text/plain; charset="UTF-8" [9.5.4 (release_9.5.4 @ /usr/local/share/emacs/29.0.50/lisp/org/)] When trying to create a new src-block via `M-x org-babel-demarcate-block` immediately after a previous code block (only empty lines in between), then the command behaves like when splitting a src-block (inserting an #+end_src first, followed by a #+begin_src). However, as the point is outside of the source block, according to the docstring of the command, a new source block should be created. As a comment, normally when creating a new source block, Emacs prompts for the source block type. However, currently, when used as mentioned here, the command automatically sets the type (because it tries to split). I would say that is convenient behavior, so that effectively only the order of the inserted lines should get reversed. In any case, thanks for the amazing work! Emacs : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-06-12 Package: Org mode version 9.5.4 (release_9.5.4 @ /usr/local/share/emacs/29.0.50/lisp/org/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-export-before-parsing-hook '(org-attach-expand-links) org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-mode-hook '(#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-show-all append local] 5] #[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-confirm-shell-link-function 'yes-or-no-p outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :store org-eww-store-link) ("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow org-irc-visit :store org-irc-store-link :export org-irc-export) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("gnus" :follow org-gnus-open :store org-gnus-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("mailto" :follow #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("https" :follow #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("http" :follow #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-metaup-hook '(org-babel-load-in-session-maybe) ) --00000000000085d48405e1494fee Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
=C2=A0[9.5.4 (release_9.5.4 @ /usr/local/share/emacs/29.0.= 50/lisp/org/)]

When trying to create a new src-block via `M-x
org= -babel-demarcate-block` immediately after a previous code block (only
em= pty lines in between), then the command behaves like when splitting a
sr= c-block (inserting an #+end_src first, followed by a #+begin_src).

H= owever, as the point is outside of the source block, according to the
do= cstring of the command, a new source block should be created.

As a c= omment, normally when creating a new source block, Emacs prompts
for the= source block type. However, currently, when used as mentioned
here, the= command automatically sets the type (because it tries to
split). I woul= d say that is convenient behavior, so that effectively
only the order of= the inserted lines should get reversed.

In any case, thanks for the= amazing work!

Emacs =C2=A0: GNU Emacs 29.0.50 (build 1, x86_64-pc-l= inux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6)
=C2=A0of 2022-06-1= 2
Package: Org mode version 9.5.4 (release_9.5.4 @ /usr/local/share/emac= s/29.0.50/lisp/org/)

current state:
=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D
(setq
=C2=A0org-link-elisp-confirm-function 'yes-= or-no-p
=C2=A0org-bibtex-headline-format-function #[257 "\300\236A\= 207" [:title] 3 "\n\n(fn ENTRY)"]
=C2=A0org-export-before= -parsing-hook '(org-attach-expand-links)
=C2=A0org-archive-hook '= ;(org-attach-archive-delete-maybe)
=C2=A0org-cycle-hook '(org-cycle-= hide-archived-subtrees org-cycle-hide-drawers
=C2=A0org-cycle-show-em= pty-lines
=C2=A0org-optimize-window-after-visibility-change)
=C2= =A0org-mode-hook '(#[0 "\300\301\302\303\304$\207"
=C2= =A0 [add-hook change-major-mode-hook org-show-all append local]
=C2= =A0 5]
#[0 "\300\301\302\303\304$\207"
=C2=A0 [add-ho= ok change-major-mode-hook org-babel-show-result-all
=C2=A0 =C2=A0appe= nd local]
=C2=A0 5]
org-babel-result-hide-spec org-babel-hide-a= ll-hashes)
=C2=A0org-confirm-shell-link-function 'yes-or-no-p
=C2= =A0outline-isearch-open-invisible-function 'outline-isearch-open-invisi= ble
=C2=A0org-agenda-before-write-hook '(org-agenda-add-entry-text)<= br>=C2=A0org-src-mode-hook '(org-src-babel-configure-edit-buffer
= =C2=A0 =C2=A0 org-src-mode-configure-edit-buffer)
=C2=A0org-confirm-elis= p-link-function 'yes-or-no-p
=C2=A0org-speed-command-hook '(org-= speed-command-activate
=C2=A0org-babel-speed-command-activate)
= =C2=A0org-tab-first-hook '(org-babel-hide-result-toggle-maybe
=C2= =A0 =C2=A0 =C2=A0org-babel-header-arg-expand)
=C2=A0org-link-shell-confi= rm-function 'yes-or-no-p
=C2=A0org-babel-pre-tangle-hook '(save-= buffer)
=C2=A0org-agenda-loop-over-headlines-in-active-region nil
=C2= =A0org-occur-hook '(org-first-headline-recenter)
=C2=A0org-metadown-= hook '(org-babel-pop-to-session-maybe)
=C2=A0org-link-parameters = 9;(("attachment" :follow org-attach-follow :complete
org-at= tach-complete-link)
=C2=A0 =C2=A0 =C2=A0 ("id" :follow org-= id-open)
=C2=A0 =C2=A0 =C2=A0 ("eww" :follow org-eww-open := store org-eww-store-link)
=C2=A0 =C2=A0 =C2=A0 ("rmail" :fo= llow org-rmail-open :store
org-rmail-store-link)
=C2=A0 =C2=A0 = =C2=A0 ("mhe" :follow org-mhe-open :store org-mhe-store-link)
= =C2=A0 =C2=A0 =C2=A0 ("irc" :follow org-irc-visit :store org-i= rc-store-link
:export org-irc-export)
=C2=A0 =C2=A0 =C2=A0 (&qu= ot;info" :follow org-info-open :export org-info-export
:store or= g-info-store-link)
=C2=A0 =C2=A0 =C2=A0 ("gnus" :follow org= -gnus-open :store
org-gnus-store-link)
=C2=A0 =C2=A0 =C2=A0 (&q= uot;docview" :follow org-docview-open :export
org-docview-export= :store org-docview-store-link)
=C2=A0 =C2=A0 =C2=A0 ("bibtex&qu= ot; :follow org-bibtex-open :store
org-bibtex-store-link)
=C2= =A0 =C2=A0 =C2=A0 ("bbdb" :follow org-bbdb-open :export org-bbdb-= export
:complete org-bbdb-complete-link :store
org-bbdb-store-l= ink)
=C2=A0 =C2=A0 =C2=A0 ("w3m" :store org-w3m-store-link)=
=C2=A0 =C2=A0 =C2=A0 ("doi" :follow org-link-doi-open :exp= ort
org-link-doi-export)
=C2=A0 =C2=A0 =C2=A0 ("file+sys&q= uot;) ("file+emacs")
=C2=A0 =C2=A0 =C2=A0 ("shell"= ; :follow org-link--open-shell)
=C2=A0 =C2=A0 =C2=A0 ("news"= ; :follow
#[514 "\301\300\302Q\"\207"
=C2=A0[&q= uot;news" browse-url ":"] 6 "\n\n(fn URL ARG)"] )
=C2=A0 =C2=A0 =C2=A0 ("mailto" :follow
#[514 &q= uot;\301\300\302Q\"\207"
=C2=A0["mailto" browse-= url ":"] 6 "\n\n(fn URL ARG)"]
)
=C2=A0 =C2= =A0 =C2=A0 ("https" :follow
#[514 "\301\300\302Q\"= ;\207"
=C2=A0["https" browse-url ":"] 6 &qu= ot;\n\n(fn URL ARG)"]
)
=C2=A0 =C2=A0 =C2=A0 ("http&q= uot; :follow
#[514 "\301\300\302Q\"\207"
=C2=A0= ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]=
)
=C2=A0 =C2=A0 =C2=A0 ("ftp" :follow
#[514 &q= uot;\301\300\302Q\"\207" ["ftp" browse-url ":"= ;]
=C2=A06 "\n\n(fn URL ARG)"]
)
=C2=A0 =C2=A0= =C2=A0 ("help" :follow org-link--open-help :store
org-link= --store-help)
=C2=A0 =C2=A0 =C2=A0 ("file" :complete org-li= nk-complete-file)
=C2=A0 =C2=A0 =C2=A0 ("elisp" :follow org= -link--open-elisp))
=C2=A0org-metaup-hook '(org-babel-load-in-sessio= n-maybe)
=C2=A0)
--00000000000085d48405e1494fee--