Thx Deigo for the detailed answer! Really appreciate it!i think though it’s a bit over my head as i have limited lisp knowledge :)Does this export to standard markdown files or leanpub format? Honestly at this stage im willing to export to any flavor of markdown but basic or MMD would work best. Any tips on how i can adjust the code for that?if not can i just run your code to get a different markdown format? What the main function you run after evaluating the code in emacs?i apologize in advance for the silly questions :)thx againZOn Sun, Jan 12, 2020 at 7:20 AM Diego Zamboni <diego@zzamboni.org> wrote:Hi Z,I do something similar in my ox-leanpub-book module [1], which exports each top-level heading to a different file. The general idea is to use =org-map-entries= to loop over the entire buffer [2]. The function you call can then check whether the current entry is a header at the level you want [3] and then export it to the corresponding file. The title can be used to deduct the filename [4].I found that I had to mark the entire subtree before calling the export function [5], otherwise the headline was not getting included in the export.I based my code originally on this blog post, which might be a simpler starting point: https://medium.com/@lakshminp/publishing-a-book-using-org-mode-9e817a56d144 - this code does not select the entire subtree before exporting, which means only the contents of the section is exported, but not the headline itself.Hope this helps!--DiegoOn Sun, Jan 12, 2020 at 4:54 AM Xebar Saram <zeltakc@gmail.com> wrote:Hi allFor work specific needs at uni i have a need to take a comprehensive org file with hundreds of headers and split each header into separate .md files (with the header name as file name//first header in the md file).Has anyone done anything remotely similar? Or if not can someone point me in the right direction on how to even start dealing with this?thx a lot in advance any tips would be very much appreciatedkind regardsZ