emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug] org-in-src-block-p returns t when not in source block


From: No Wayman
Subject: [Bug] org-in-src-block-p returns t when not in source block
Date: Mon, 27 Nov 2023 10:49:57 -0500
User-agent: mu4e 1.11.25; emacs 30.0.50


When on an empty line before a source block, org-in-src-block-p correctly returns nil.
However, when on an empty line after a source block, it returns t.
This is reproducible on my end with both the built-in version of Org and 9.7-pre.
Yodel[1] Report 2023-11-27 10:42:54
===================================

--8<---------------cut here---------------start------------->8---
(yodel
 :post*
 (require 'org)
 (org-version nil 'full 'message)
 (yodel-file
   :point "|"
   :with* "#+begin_src text\n#+end_src\n|"
:then* (message "org-in-src-block-p below: %s" (org-in-src-block-p)))
 (yodel-file
   :point "|"
   :with* "|\n#+begin_src text\n#+end_src"
:then* (message "org-in-src-block-p above: %s" (org-in-src-block-p))))
--8<---------------cut here---------------end--------------->8---

STDOUT
======

Org mode version 9.6.11 (release_9.6.11 @ /usr/share/emacs/30.0.50/lisp/org/)
org-in-src-block-p below: t
org-in-src-block-p above: nil

Environment
===========

- emacs version: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0)
of 2023-11-16
- system type: gnu/linux

[1] https://www.github.com/progfolio/yodel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]