On 2023-11-27 21:30, Ihor Radchenko wrote: > Fixed, on main. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6d7c7917a
Which is currently my HEAD, and there are still edge cases that do not seem to be handled well. Start off from "make vanilla" and the following buffer ------------------------- test.org ------------------------- #+begin_src shell foo #+end_src bar ------------------------- test.org ------------------------- Navigate to BOL of the "#+end_src" line and M-: (org-in-src-block-p t) => nil As expected. Now add a space on the empty line *after* the "#+end_src" line, navigate back to BOL of the "#+end_src" line and M-: (org-in-src-block-p t) => t When I wrote my own inner-boundary function, I looked with envy at the elegance of the arithmetic done in `org-in-src-block-p' but thought that this probably would not always work ... or did I misunderstand something here? Thanks Jens Here is the lossage corresponding to my test case, just in case: C-s ;; isearch-forward # ;; isearch-printing-char + ;; isearch-printing-char e ;; isearch-printing-char n ;; isearch-printing-char d ;; isearch-printing-char C-a ;; org-beginning-of-line M-: (org-in-src-block-p t) <return> ;; read--expression-try-read C-n ;; next-line SPC ;; org-self-insert-command C-a ;; org-beginning-of-line C-p ;; previous-line M-: (org-in-src-block-p t) <return> ;; read--expression-try-read