[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] org-latex.el: append final newline to export buffer
From: |
Jérémie Courrèges-Angla s |
Subject: |
[O] [PATCH] org-latex.el: append final newline to export buffer |
Date: |
Wed, 11 Apr 2012 20:41:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.95 (berkeley-unix) |
Hi.
org-export-as-latex (sometimes?) doesn't add a final newline to the
exported buffer. It's getting in my way as I set require-final-newline
to 'query. Opinions?
--
Jérémie Courrèges-Anglas
GPG fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494
From 2cf51a01885071c948d20c641d2d2fded6c2d1e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= <address@hidden>
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
pgphmHDqXcY81.pgp
Description: PGP signature
- [O] [PATCH] org-latex.el: append final newline to export buffer,
Jérémie Courrèges-Angla s <=