Hi Ye, Ihor, Max, The change seems to come from this commit: commit d7a55bbd537314d2776b082bd92a1a08b3edc84e Date: Wed Sep 28 12:07:14 2022 +0800 org-latex-export-to-latex: Do not suppress major modes in babel It replaces 'write-file' with 'write-region', but, according to the documentation of 'require-final-newline', 'write-region' ignores 'require-final-newline'. See attached diff that reverts the problematic change. In summary, before this commit, Emacs was fixing exported text files (HTML, markdown, etc.) for free, adding a newline if needed for text files. It's not anymore. I'm not sure what would be the best way to fix this though. Bruno