From 2cf51a01885071c948d20c641d2d2fded6c2d1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Wed, 11 Apr 2012 20:36:10 +0200 Subject: [PATCH] org-latex.el: append final newline to export buffer * lisp/org-latex.el: Ensure a final newline is appended to the export buffer. TINYCHANGE --- lisp/org-latex.el | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 4418dee..8e05616 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1034,6 +1034,11 @@ when PUB-DIR is set, use this as the publishing directory." (if (looking-at "[\n \t]+") (replace-match "\n"))) + ;; Ensure we have a final newline + (goto-char (point-max)) + (or (eq (char-before) ?\n) + (insert ?\n)) + (run-hooks 'org-export-latex-final-hook) (if to-buffer (unless (eq major-mode 'latex-mode) (latex-mode)) -- 1.7.6