* problem with org-map-entries and the doc for export hooks @ 2023-06-07 15:59 Victor A. Stoichita 2023-06-07 17:30 ` Ihor Radchenko 0 siblings, 1 reply; 5+ messages in thread From: Victor A. Stoichita @ 2023-06-07 15:59 UTC (permalink / raw) To: Org-mode 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problem with org-map-entries and the doc for export hooks 2023-06-07 15:59 problem with org-map-entries and the doc for export hooks Victor A. Stoichita @ 2023-06-07 17:30 ` Ihor Radchenko 2023-06-07 20:20 ` Victor A. Stoichita 0 siblings, 1 reply; 5+ messages in thread From: Ihor Radchenko @ 2023-06-07 17:30 UTC (permalink / raw) To: Victor A. Stoichita; +Cc: Org-mode "Victor A. Stoichita" <victor@svictor.net> writes: > I’m trying to use the example given here in the manual for "Export > hooks": https://orgmode.org/manual/Advanced-Export-Configuration.html > ... > 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? 1. Update Org mode. I do not see any hangs with the latest stable Org release. 2. Use alternative example. The current example may not work if you have headings not separated by contents or empty lines. See https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=16f15f966 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problem with org-map-entries and the doc for export hooks 2023-06-07 17:30 ` Ihor Radchenko @ 2023-06-07 20:20 ` Victor A. Stoichita 2023-06-08 13:22 ` Ihor Radchenko 0 siblings, 1 reply; 5+ messages in thread From: Victor A. Stoichita @ 2023-06-07 20:20 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 718 bytes --] Le 07 Jun 2023, Ihor Radchenko <yantar92@posteo.net> a écrit : > 1. Update Org mode. I do not see any hangs with the latest stable > Org release. > 2. Use alternative example. The current example may not work if you have > headings not separated by contents or empty lines. > See https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=16f15f966 Thanks for the hints Ihor ! I still see the problem with org version 9.6.6 and your latest example code. I also checked with emacs -Q which has org version 9.6.1. I’m testing this on the attached file. I also see that if I set the export scope to "subtree" instead of "buffer" the process runs as expected. Cheers, Victor [-- Attachment #2: simple-org-file.org --] [-- Type: application/vnd\.lotus-organizer, Size: 107 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problem with org-map-entries and the doc for export hooks 2023-06-07 20:20 ` Victor A. Stoichita @ 2023-06-08 13:22 ` Ihor Radchenko 2023-06-09 7:01 ` Victor A. Stoichita 0 siblings, 1 reply; 5+ messages in thread From: Ihor Radchenko @ 2023-06-08 13:22 UTC (permalink / raw) To: Victor A. Stoichita; +Cc: emacs-orgmode "Victor A. Stoichita" <victor@svictor.net> writes: > I still see the problem with org version 9.6.6 and your latest example > code. > > I also checked with emacs -Q which has org version 9.6.1. > > I’m testing this on the attached file. Thanks for providing an example! You encountered a bug. Fixed, on bugfix. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=84e5a4da5 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problem with org-map-entries and the doc for export hooks 2023-06-08 13:22 ` Ihor Radchenko @ 2023-06-09 7:01 ` Victor A. Stoichita 0 siblings, 0 replies; 5+ messages in thread From: Victor A. Stoichita @ 2023-06-09 7:01 UTC (permalink / raw) To: Ihor Radchenko; +Cc: emacs-orgmode Le 08 Jun 2023, Ihor Radchenko <yantar92@posteo.net> a écrit : > "Victor A. Stoichita" <victor@svictor.net> writes: > >> I still see the problem with org version 9.6.6 and your latest example >> code. >> >> I also checked with emacs -Q which has org version 9.6.1. >> >> I’m testing this on the attached file. > > Thanks for providing an example! > You encountered a bug. > Fixed, on bugfix. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=84e5a4da5 Great! Thank you! ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-09 7:04 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-06-07 15:59 problem with org-map-entries and the doc for export hooks Victor A. Stoichita 2023-06-07 17:30 ` 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
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.