From: "Victor A. Stoichita" <victor@svictor.net>
To: Org-mode <emacs-orgmode@gnu.org>
Subject: problem with org-map-entries and the doc for export hooks
Date: Wed, 07 Jun 2023 17:59:04 +0200 [thread overview]
Message-ID: <877csf6yva.fsf@svictor.net> (raw)
Greetings all!
I’m trying to use the example given here in the manual for "Export
hooks": https://orgmode.org/manual/Advanced-Export-Configuration.html
--8<---------------cut here---------------start------------->8---
(defun my-headline-removal (backend)
"Remove all headlines in the current buffer.
BACKEND is the export back-end being used, as a symbol."
(org-map-entries
(lambda () (delete-region (point) (line-beginning-position 2)))))
(add-hook 'org-export-before-parsing-hook #'my-headline-removal)
--8<---------------cut here---------------end--------------->8---
However the export process hangs indefinitely emacs after evaluating this.
I have to C-g to quit.
The same happens with the newer org-export-before-parsing-functions
instead of org-export-before-parsing-hook.
Is there something else that needs to be updated for the example to work?
Regards,
Victor
next reply other threads:[~2023-06-07 16:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 15:59 Victor A. Stoichita [this message]
2023-06-07 17:30 ` problem with org-map-entries and the doc for export hooks Ihor Radchenko
2023-06-07 20:20 ` Victor A. Stoichita
2023-06-08 13:22 ` Ihor Radchenko
2023-06-09 7:01 ` Victor A. Stoichita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877csf6yva.fsf@svictor.net \
--to=victor@svictor.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).