From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 YCXnGqCvV2PTTQAAbAwnHQ (envelope-from ) for ; Tue, 25 Oct 2022 11:42:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QP4eG6CvV2OqKgEA9RJhRA (envelope-from ) for ; Tue, 25 Oct 2022 11:42:56 +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 158A4AFE7 for ; Tue, 25 Oct 2022 11:42:56 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onGRM-0005Hi-D8; Tue, 25 Oct 2022 05:41:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onGRK-0004ii-Py for emacs-orgmode@gnu.org; Tue, 25 Oct 2022 05:41:42 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onGR9-0000SQ-VB for emacs-orgmode@gnu.org; Tue, 25 Oct 2022 05:41:42 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CC540240105 for ; Tue, 25 Oct 2022 11:41:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666690888; bh=Q4fYBnmhDbT6QGDRwjX27v4JMl5wPvIsO/70ve7n8xg=; h=From:To:Cc:Subject:Date:From; b=f/RqAHkrGLxNp2cLqZmdhrheJUgJgRg1gZ20uyJiURDx5l3CbQa36SMY2RdGv322U g4rsJAsbmgGDNrAZX3TUN7/q2sC+i/Z8+DKwlnY8x55y2aqzxnyoCUXWlxnaTkYaUm UoRlIyzIEjH1GgEaY7vBq0EiK/K1aZLKy4KhzXwTyo+Tzp9Lvk5FDTfCzkD4A6+v1J 7rTQqzwmtZILKekdz9bnJ7zdbhM9yIbgHxqTaIg6jOC/sMQKC7i614tZhpq2nSSdc6 5wub8m/VByvOttB0DOxduE1fjWRk3Xd0aQD7uTHivVhANtnnBXxDALUETQzmWY9695 Tfe+XHt5YqwtQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MxRlp4pbQz6tmQ; Tue, 25 Oct 2022 11:41:25 +0200 (CEST) From: Ihor Radchenko To: dalanicolai Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] demarcate block splits block even when outside of src-block In-Reply-To: References: Date: Tue, 25 Oct 2022 09:42:08 +0000 Message-ID: <87sfjcs0i7.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666690976; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FhA1grom2f8rcNkRHQpyw6RfMKuQZfsWju3/xBiBqSs=; b=VKx6CQRpqQTS3r/Ep9M6qEv4dsS7chlXsX/MGO9K3dWpIaHnEGit/pflyvVFCB9xCK1k+D zd1RUeMteqnBJUHSvHOU4IgEIrIL5uklziPPGAlFdD4xvsLVQONCP/jGq0CkJQMe+racgO +w9VpC6/MzMMa8TigGcTioePh6Pul0iZBg8SyOgshf6mmUWnXcst0NpPWn8/+AHHwc7dG3 PsumDo3ubNwxIOmPAYzSmD0Mm7cIEhOal+h7d6rKt3FNgNMGxL905mChg7vSthCW4D6Y1X hi4HoLmeUH2jyffodkZlMSuS6pABRBtlJLI/UmuYBq3mGE+fstcjUCxcdWSCEw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666690976; a=rsa-sha256; cv=none; b=m1iB53jG2TKGavmsZZ9alMWJShq4p1DZZwAgVM02x6RVDHxt6npnh+DUoV+UnZhbZ6ijlL jjCyMNlxhsa4tejBGFpf7dvlDGZUgNXjofG78LkzibP9J1fdPf/aiuiKMHNIUS+VZp2pUt hqq5uLH7PukkEi/psh5LMQggalJgW73BxOc0+F0XY95ndR7NI2ARFXvsdYGi00ak4NAEHV P4NxKJeeOPnRIVoWpXEfCh5tWecWUsLn21MTwRIj37ZUjab416N5ycNUHQ2xhPeiieb04q SjQ5ONxh94chdzwSaTw+53C7iPFPzZaztUmbHqn6hE/KuJeRNJjINZRKK8+xpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="f/RqAHkr"; dmarc=pass (policy=none) header.from=posteo.net; 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: -4.91 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="f/RqAHkr"; dmarc=pass (policy=none) header.from=posteo.net; 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: 158A4AFE7 X-Spam-Score: -4.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: hAmpazLRDlFc dalanicolai writes: > [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. Thanks for reporting! Fixed on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cd835dcad87bc5b3855832449188dd007fce115c -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at