From 289afdb9672eadaea119ebb2b0deecff4db3aa89 Mon Sep 17 00:00:00 2001 Message-Id: <289afdb9672eadaea119ebb2b0deecff4db3aa89.1640530104.git.yantar92@gmail.com> From: Ihor Radchenko Date: Sun, 26 Dec 2021 22:45:36 +0800 Subject: [PATCH] org-element--current-element: Fix #+BEGIN$ parsed as special block * lisp/org-element.el (org-element--current-element): Use `org-element-dynamic-block-open-re' to match blocks. Reported in https://list.orgmode.org/Ycay4s3iAdEGSwgt@tuxteam.de/T/#t --- lisp/org-element.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index eac39d429..ce251da38 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -4266,7 +4266,7 @@ (defun org-element--current-element (limit &optional granularity mode structure ((looking-at "CALL:") (beginning-of-line) (org-element-babel-call-parser limit affiliated)) - ((looking-at "BEGIN:? ") + ((looking-at org-element-dynamic-block-open-re) (beginning-of-line) (org-element-dynamic-block-parser limit affiliated)) ((looking-at "\\S-+:") -- 2.32.0