From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id AKayOMj6nGWrogAAkFu2QA (envelope-from ) for ; Tue, 09 Jan 2024 08:50:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wKeSMsj6nGVCUwEA62LTzQ (envelope-from ) for ; Tue, 09 Jan 2024 08:50:32 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=e2H8cfUu; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704786632; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=OAaJxwAsTbN5YEBPX/tH145abV8PIulZykQCaMmKAT8=; b=tHJsL97I3v60UXfylnTmuqyi4EHKZ/dl0rVn86dVK3wYXV30+6qEJlQbj7UNJA/jbgaVF2 cuQCt0i3Im4+7Xo4mZpv0LbaQUpR+LrqTOjIKGwLcQXnTg9PSee/dUJFNknzAGA5i9vZvD ih7Q/MlAOmP9SP6F6quWQtWFH8JoJ+XczZOX0WACmxfSG8LtnOCSL7ekIT7QkPgbEdqeoj s0oyMamhl6Re2JHAViWnWhhD35MHvRA8r5kyQiAYFOHwRg5eZqUsECj/OFRg8KxTWUXRBF PtTSPXBX7YRRecS2lIV0TEwgRQJ3/SYfLQ81rCsk6snKm6qTIJlpcLbMT1OmeA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704786632; a=rsa-sha256; cv=none; b=ttuE2v4rfHpaIGzugtqc4+F7uFl/dZwdp1yuGUGecwONknOhJHlZHqyjWHva8SdVAmOUdq WsKJUbyQvdMhQb0bH/czc60FJaLWImu48vv2jh79m42yvvxB/jm/E7DI3eZnunBhvIFr5a CcDS0/CfMIZHbKuG/s8WzjzwuzSOBYL59s9gKe7EMEoFvHZUtz1+98wgcOlqVZ5Kg8+3vI v/XQ/INKt/EeQZK8lAq3GTM3JjefPJh8zwqbdIcwnfwU/GVw6HZHcz4UF4w8U1KuAKDVZ7 x7Z55A19iT9mffokdweUKoH/K6zoUVxdgEr1uC+XXOYvCqQNUHZ7e996KEOrfA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=e2H8cfUu; 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"; dmarc=pass (policy=none) header.from=posteo.net 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 3E158215D5 for ; Tue, 9 Jan 2024 08:50:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rN6rH-0002PL-Eh; Tue, 09 Jan 2024 02:49:11 -0500 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 1rN6rF-0002OM-Th for emacs-orgmode@gnu.org; Tue, 09 Jan 2024 02:49:09 -0500 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 1rN6rB-00023J-FT for emacs-orgmode@gnu.org; Tue, 09 Jan 2024 02:49:09 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2FD4E240104 for ; Tue, 9 Jan 2024 08:49:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1704786542; bh=vnNlQqaLJw3l0GcwIWXZB6QdHoQx0VrdHBtCs0hklcg=; h=MIME-Version:Content-Transfer-Encoding:Date:From:To:Cc:Subject: Message-ID:From; b=e2H8cfUuui2vAUeOkFSdPxaAH41FSS/lE4QeUtBbZJUfZHqD0NG20pYh/iWiwgyg5 vQeOsj7yjR3XZVVaHUNcO0EPLonRKFa5ifEXjwzDiCt51ug6UlgzR6AVFWmTrEkeNJ LTcNXIa4am83apelDkJl+byGxdeoWsThZsrwepulJxsqkatEzGnp0yNxqDM8bsxQLb dTLJQQz7bM3EN1AoyxRuv/20XRWum5JQB3OnnVc+uDtoyat0salsbWQyPpzr5o+kIk z0VpIj1IPi87Bmi4E4tQ7ILFA+JXaVGhB6NpVmzsJamn+T6yqC27rf+JQ7kgEUl9Sx RPmWQqbANQ/ew== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4T8NNY2sJcz6tw6; Tue, 9 Jan 2024 08:49:01 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 09 Jan 2024 07:49:01 +0000 From: gerard.vermeulen@posteo.net To: Ihor Radchenko Cc: Emacs orgmode , emacs-orgmode-bounces+gerard.vermeulen=posteo.net@gnu.org Subject: Re: [PATCH] org-babel-demarcate-block: split using element API In-Reply-To: <442006329cfba666710c989aece5191a@posteo.net> References: <7e41f9b6e9026a404e256f33371e974c@posteo.net> <87zfxq78ff.fsf@localhost> <87zfxo3taa.fsf@localhost> <87v88a78qd.fsf@localhost> <7f23ea966f0f0aad3fad29b0b96864f3@posteo.net> <87y1d55fc6.fsf@localhost> <37fdcc4bfcf734c2e5ec439d40b4f7d8@posteo.net> <878r50yqmo.fsf@localhost> <442006329cfba666710c989aece5191a@posteo.net> Message-ID: Received-SPF: pass client-ip=185.67.36.66; envelope-from=gerard.vermeulen@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 3E158215D5 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -7.02 X-Spam-Score: -7.02 X-TUID: 8qYKRikeDRrf On 08.01.2024 21:25, gerard.vermeulen@posteo.net wrote: > On 08.01.2024 13:08, Ihor Radchenko wrote: >> gerard.vermeulen@posteo.net writes: [...] > Anyhow, I have removed the comment and I have replaced check below it > with > + (set-mark (point)) ;; To simplify the next (unless ...): > + (unless (and (>= (point) body-beg) (<= (mark) body-end)) > + (user-error "Select within the source block body to split > it")) > which also protects against having point in body and mark on or below > #+end_src > It occurred to me to that I only should set mark to point when the region is not active. I will add checking for `user-error's to the ERT test. Regards -- Gerard