lisp/org.el (org-block-map): Fix mapping over nested blocks
* lisp/org.el (org-block-map): Do not bypass the whole block when mapping. Look inside the block body for child blocks as well. Reported-by: mahmood sheikh <mahmod.m2015@gmail.com> Link: https://orgmode.org/list/CAOj1L_cx9XP5fS3_=x=UJSSt3xjcfcQ68Uef6E4DTi68Kr_ABw@mail.gmail.com
This commit is contained in:
parent
fffb87174e
commit
62356cb44b
|
@ -20346,11 +20346,12 @@ Optional arguments START and END can be used to limit the range."
|
|||
(end (or end (point-max))))
|
||||
(save-excursion
|
||||
(goto-char start)
|
||||
(while (and (< (point) end) (re-search-forward org-block-regexp end t))
|
||||
(while (and (< (point) end) (re-search-forward "^[ \t]*#\\+begin" end t))
|
||||
(save-excursion
|
||||
(save-match-data
|
||||
(goto-char (match-beginning 0))
|
||||
(funcall function)))))))
|
||||
(when (org-at-block-p)
|
||||
(funcall function))))))))
|
||||
|
||||
(defun org-next-block (arg &optional backward block-regexp)
|
||||
"Jump to the next block.
|
||||
|
|
Loading…
Reference in New Issue