I am trying to efficiently filter and copy entries with specific headings in an Org mode file using Emacs. I want to extract all entries whose headings match a particular regular expression. However, I am relatively new to Emacs and Org mode, and I am not sure about the most effective way to achieve this.

I have attempted to use the org-match-sparse-tree command, but I'm unsure how to copy the filtered entries after this step. Are there any built-in functions or packages that can facilitate this process? Can someone provide a step-by-step guide or a code snippet to accomplish this task? I would greatly appreciate any insights or recommendations on how to effectively filter and copy Org mode entries matching a specified expression in Emacs.

Thank you in advance for any assistance or guidance!

  • Copy them where? To a list in memory? To another file? I guess what's missing is: what are you planning to do with the filtered entries after you have got them?
    – NickD
    Oct 23, 2023 at 22:15


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.