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 <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/87msuzdkcu.fsf@gmail.com
This commit is contained in:
Ihor Radchenko 2023-11-27 21:26:28 +01:00
parent bd7fab2129
commit 6d7c7917a0
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 2 additions and 2 deletions

View File

@ -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)))) (save-match-data (setq element (or element (org-element-at-point))))
(when (org-element-type-p element 'src-block) (when (org-element-type-p element 'src-block)
(or (not inside) (or (not inside)
(not (or (= (line-beginning-position) (not (or (<= (line-beginning-position)
(org-element-post-affiliated element)) (org-element-post-affiliated element))
(= (1+ (line-end-position)) (>= (1+ (line-end-position))
(- (org-element-end element) (- (org-element-end element)
(org-element-post-blank element)))))))) (org-element-post-blank element))))))))