Ihor Radchenko writes: > I do not see how it is related. Do you see the error with your config > or with clean Emacs? Good point. Just with my config. Ignoring for now! > Oops. Another side-effect of `buffer-file-name'. Fixed now. Thank you! >> (2) no corruption happens to the original file after export. > > Done. Superb! >> (1) re-opening the file after export always re-opens it, and > > I am not sure how to test this part. How about the attached patch? It mirrors the manual steps (find-file, export, kill-buffer, find-file), except it calls just the 'org-export-copy-buffer' procedure instead of exporting to HTML. The test fails without your fix and passes with it. Rudy