mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-28 07:44:49 +00:00
* doc/org-manual.org (Export hooks): Fix example hook
Set `org-map-continue-from' in the hook as otherwise the example won't work if user try the example on buffer with headings not separated by contents or empty lines. Reported-by: Victor A. Stoichita <victor@svictor.net> Link: https://orgmode.org/list/877csf6yva.fsf@svictor.net
This commit is contained in:
parent
ba8c468634
commit
16f15f9665
@ -16195,7 +16195,12 @@ can remove every headline in the buffer during export like this:
|
|||||||
"Remove all headlines in the current buffer.
|
"Remove all headlines in the current buffer.
|
||||||
BACKEND is the export backend being used, as a symbol."
|
BACKEND is the export backend being used, as a symbol."
|
||||||
(org-map-entries
|
(org-map-entries
|
||||||
(lambda () (delete-region (point) (line-beginning-position 2)))))
|
(lambda ()
|
||||||
|
(delete-region (point) (line-beginning-position 2))
|
||||||
|
;; We need to tell `org-map-entries' to not skip over heading at
|
||||||
|
;; point. Otherwise, it would continue from _next_ heading. See
|
||||||
|
;; the docstring of `org-map-entries' for details.
|
||||||
|
(setq org-map-continue-from (point)))))
|
||||||
|
|
||||||
(add-hook 'org-export-before-parsing-hook #'my-headline-removal)
|
(add-hook 'org-export-before-parsing-hook #'my-headline-removal)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
Loading…
Reference in New Issue
Block a user