From 6d7c7917a0294bb71c3294119984207b1d9b0385 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Mon, 27 Nov 2023 21:26:28 +0100 Subject: [PATCH] lisp/org.el (org-in-src-block-p): Fix when on affiliated or post-blank * lisp/org.el (org-in-src-block-p): When INSIDE is non-nil, do not return t for affiliated keywords and post-blank. Reported-by: No Wayman Link: https://orgmode.org/list/87msuzdkcu.fsf@gmail.com --- lisp/org.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 19887ff1e..cb8a14d05 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18797,9 +18797,9 @@ When ELEMENT is provided, it is considered to be element at point." (save-match-data (setq element (or element (org-element-at-point)))) (when (org-element-type-p element 'src-block) (or (not inside) - (not (or (= (line-beginning-position) + (not (or (<= (line-beginning-position) (org-element-post-affiliated element)) - (= (1+ (line-end-position)) + (>= (1+ (line-end-position)) (- (org-element-end element) (org-element-post-blank element))))))))