From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kABlLbD4ZGUJWAAAauVa8A:P1 (envelope-from ) for ; Mon, 27 Nov 2023 21:14:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kABlLbD4ZGUJWAAAauVa8A (envelope-from ) for ; Mon, 27 Nov 2023 21:14:40 +0100 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 75FDA5C36D for ; Mon, 27 Nov 2023 21:14:40 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EYtOKSOn; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1701116080; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=BiCGVYyH+4a4ZlB04BWQ4PHPQYOKmN7ShF4EenjNLIw=; b=AcccFeQfiHMqV9rthuPOc162Gj/I+SZFOtcLFxHlhm3iVs8hW3e7Z0z4X5Bb/9Ugc5fYtU R4+vR+beY++t8HnPdvS+UNFSM5xzS4fL+QjJxALTvuHgnEesESCvBX1rERXC7A0guhaowA GZwaGKb9NfPsc4SwPVCMtX0VXbzhXG/r4INxjB6XP8YiwkpRX5clnZ0uzWM3EXTp8HPzNa NmfDtw9237R290Wmow5FdJXwJUh1SyTXyg7qHN0VWhYF0+wXooYvvuBPhlnJCPvPZjtvBT cL4Sh3H8UI/DzSs5fgPtAF0NG7gPL2YtxhLGXkpcDwR5j7e+UBx8Hs1+2UCxcw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1701116080; a=rsa-sha256; cv=none; b=iBuzYSbMHcrNy9oXos89eZcolzOfnp1yxGhFEbjKCQ4Yj0owS8Tsf7jNxoV8iQUuJTt4ql 7ifgBkvPARfvovuFejHWNhMDpyxgZKgbKC3sfSoZIm64mj8kGRADRJxuVUT61edcumtnw6 n3bF6RrlQLl/QWzi7m0oJQ4t5fXXwlqELTyvY+REx1XopNkowkv8sERD4umVC/9LLdk4bp yvkjm8JXDon8jFxyozM/Qy4ZGKjb+a2AmAKw60QrQphT6NTaDwVu1bEjcsnXDGLvJdcjaS oeS1Py/8YftiV2AgmssH7B9Fm1QF0u+Xu7Ltl8vZEjpGbiLQF8CpVEyCZu/NcA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EYtOKSOn; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7hzD-00008T-RK; Mon, 27 Nov 2023 15:13:43 -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 1r7hzB-00008B-2H for emacs-orgmode@gnu.org; Mon, 27 Nov 2023 15:13:41 -0500 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7hz8-0008Pl-VK for emacs-orgmode@gnu.org; Mon, 27 Nov 2023 15:13:40 -0500 Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-77896da2118so273929085a.1 for ; Mon, 27 Nov 2023 12:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701116017; x=1701720817; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=BiCGVYyH+4a4ZlB04BWQ4PHPQYOKmN7ShF4EenjNLIw=; b=EYtOKSOnilXVJLVjjSrKqwNveMSSeEErGKOH68OBQ1WLnrhIBy0gIPvwjZaCgXVTzg KewCVcsBcDIO3pKoDCQcy3ul8x+GmSQjusrOtxeafoIsYVesq6D+C0diN2Ft7eQ4A0Xd p82mbr3VTb6pldmMidDwpLR/XAS7uyAmIHAeieFvTSphGSVpNCepKCAYSdDBSkoUVLkM SicGPjMKmnN6tlpYXP/Dh1IGRjxpubqDAC4+oH7fL6Fqw+y3ZprUntzxAxiWDSPQUFrF tXdMEvjiZqIkz3KGLDVyHqsZaxYZ8hZTLMyaubZhWXK5DzvxggCWAjScxeis4Lxy1Exy lxQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701116017; x=1701720817; h=content-transfer-encoding:mime-version:message-id:date:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BiCGVYyH+4a4ZlB04BWQ4PHPQYOKmN7ShF4EenjNLIw=; b=FkDkVKRooIMhBSYlfxnAQJv6D8KJntKavtplV7ZTboJRYjB29GjZ3QcMasCvQ6wI66 OKzVp2y7Jl7UlSCyzvpzTnmSZHSWmiTP8y3F2giSv0kkvwLMIkbv73LGMVo0TeMFEuKv 3IYmLp2SAASaDjX+WjU2DbuxfeDWYlfw5Jn2OO0i8RYZwdSUle3YUNBqTsuEkU8MEoa/ YmavpkNyj9E9ivqBwELeP+3XirRDI6R5MxbTWQ8B7ZpDsK5J9kE8WgDrx2yTqz0uj/TB mNJu9f3X2zUWPrN337JhmbHI/MUpH/dd3JYDveBfysicLeU3M+W9pYQ7EA+/Pi2MYcX4 9Mcg== X-Gm-Message-State: AOJu0Yw5WJ1npViBYwZWQplbwBI0sPkJBpvu483S/RFjdZzYdkyHTFl1 /+aijIqD6Cy8IPxU7vfRNLOwgQIUq/E= X-Google-Smtp-Source: AGHT+IG24+v2Ey9wpdOSE4EsfjC9ipGitNoipB8saV3NIZu/o7asSjiDbEiBgdZzqifwYIpDKzrr7g== X-Received: by 2002:a05:620a:560e:b0:77d:7427:9709 with SMTP id vu14-20020a05620a560e00b0077d74279709mr12988043qkn.62.1701116017370; Mon, 27 Nov 2023 12:13:37 -0800 (PST) Received: from laptop ([2601:84:847f:c697:e217:2894:4724:14f4]) by smtp.gmail.com with ESMTPSA id y25-20020a37e319000000b0077d74f884d9sm1372577qki.117.2023.11.27.12.13.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 12:13:36 -0800 (PST) From: No Wayman To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [Bug] org-in-src-block-p returns t when not in source block In-Reply-To: Ihor Radchenko's message of "Mon, 27 Nov 2023 19:59:41 +0000 (13 minutes, 18 seconds ago)" Date: Mon, 27 Nov 2023 15:14:41 -0500 Message-ID: <87msuzdkcu.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::732; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qk1-x732.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, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -9.44 X-Spam-Score: -9.44 X-Migadu-Queue-Id: 75FDA5C36D X-TUID: fr/a6JE87C6x [Apologies for the duplicate message, Ihor. mu4e recently changed it's defa= ult reply behavior without my noticing] Ihor Radchenko writes: > This is very different from LAX argument in `org-at-timestamp-p' - > timestamp-like text may not be proper syntactically correct Org markup > element, but is still considered by agenda for historical and practical > reasons. Fair enough. =20 > What about the attached patch? That is much clearer. Thank you. > If you want to check if point is inside source block code, use INSIDE > argument. Using the INSIDE argument still appears to fail in some cases: Yodel[1] Report 2023-11-27 14:55:05 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --8<---------------cut here---------------start------------->8--- (yodel :post* (require 'org) (org-version nil 'full 'message) (message "(org-in-source-block-p 'inside)") (yodel-file "before.org" :point "|" :with* "|\n#+begin_src text\ntest\n#+end_src\n" :then* (message "point on preceding blank line: %s" (if (org-in-src-block-p 'inside) "FAIL" "PASS"))) (yodel-file "begin.org" :point "|" :with* "\n#+begin|_src text\ntest\n#+end_src\n" :then* (message "point on begin_src: %s" (if (org-in-src-block-p 'inside) "FAIL" "PASS"))) (yodel-file "in.org" :point "|" :with* "\n#+begin_src text\nte|st\n#+end_src\n" :then* (message "point between begin_src end_src: %s" (if (org-in-src-block-p 'inside) "PASS" "FAIL"))) (yodel-file "end-non-blank.org" :point "|" :with* "\n#+begin_src text\ntest\n#+end|_src\ntest" :then* (message "point on end_src (non-blank line after): %s" (if (org-in-src-block-p 'inside) "FAIL" "PASS"))) (yodel-file "end.org" :point "|" :with* "\n#+begin_src text\ntest\n#+end|_src\n" :then* (message "point on end_src (blank line after): %s" (if (org-in-src-block-p 'inside) "FAIL" "PASS"))) (yodel-file "end-eobp.org" :point "|" :with* "\n#+begin_src text\ntest\n#+end|_src" :then* (message "point on end_src (no line after): %s" (if (org-in-src-block-p 'inside) "FAIL" "PASS"))) (yodel-file "after.org" :point "|" :with* "\n#+begin_src text\ntest\n#+end_src\n|" :then* (message "point on trailing blank line: %s" (if (org-in-src-block-p 'inside) "FAIL" "PASS")))) --8<---------------cut here---------------end--------------->8--- STDOUT =3D=3D=3D=3D=3D=3D > Org mode version 9.6.11 (release_9.6.11 @ /usr/share/emacs/30.0.50/lisp/o= rg/) > (org-in-source-block-p =E2=80=99inside) > point on preceding blank line: PASS > point on begin_src: PASS > point between begin_src end_src: PASS > point on end_src (non-blank line after): PASS > point on end_src (blank line after): PASS > point on end_src (no line after): FAIL > point on trailing blank line: FAIL Environment =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - emacs version: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Vers= ion 3.24.38, cairo version 1.18.0) of 2023-11-16 - system type: gnu/linux [1] https://www.github.com/progfolio/yodel