From mboxrd@z Thu Jan 1 00:00:00 1970 From: jca+org@wxcvbn.org (=?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges-Angla?= =?utf-8?Q?s?=) Subject: [PATCH] org-latex.el: append final newline to export buffer Date: Wed, 11 Apr 2012 20:41:33 +0200 Message-ID: <87sjgai00y.fsf@moo.wxcvbn.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SI2UH-0003AC-AG for emacs-orgmode@gnu.org; Wed, 11 Apr 2012 14:41:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SI2UF-0002Sq-FJ for emacs-orgmode@gnu.org; Wed, 11 Apr 2012 14:41:48 -0400 Received: from chomsky.autogeree.net ([91.216.110.36]:49443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SI2UF-0002RU-6y for emacs-orgmode@gnu.org; Wed, 11 Apr 2012 14:41:47 -0400 Received: from localhost (1000@localhost [IPv6:::1]) by moo.wxcvbn.org (OpenSMTPD) with ESMTP id 6c019a1c for ; Wed, 11 Apr 2012 20:41:38 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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? =2D-=20 J=C3=A9r=C3=A9mie Courr=C3=A8ges-Anglas GPG fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-latex.el-append-final-newline-to-export-buffer.patch Content-Transfer-Encoding: quoted-printable Content-Description: Patch From=202cf51a01885071c948d20c641d2d2fded6c2d1e6 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?J=3DC3=3DA9r=3DC3=3DA9mie=3D20Courr=3DC3=3DA8ges-Anglas?= =3D 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 buffe= r. TINYCHANGE =2D-- 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 =2D-- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1034,6 +1034,11 @@ when PUB-DIR is set, use this as the publishing dire= ctory." (if (looking-at "[\n \t]+") (replace-match "\n"))) =20 + ;; 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)) =2D-=20 1.7.6 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (OpenBSD) iQIcBAEBCAAGBQJPhdBdAAoJEGGRj78GoRSUMFkQAK+zZdNLmrxyLVWKrQv+kvTX Ea0fyd+H/T/lk0+MKTFjANmVn2n8mygkrcKLInqej13L9InZRwCP2/UEXG7y78wW yMnIVVqHdLhY/pGwy68b3f9lcABETTubUzrcCyRGFakHwXtqNi7/wwBWvDsWQFT+ Yq6vv1OUtPTZqDCUuKxTPvF67Kdow3WGFaaJ4LFWDG8NjxecfjUPgHPMsY8cI/9l reeA/uvXDa+aHAvkHCTWbjNp5qxZqMrWLbnDtpraAS8tnS+tcmLlLxKopzLLR1vu 31wHBQQKrhyzKWL9QJI4Y1j4hQvLEbk1ZPoAELXjvysHtfC6x26LVLVlhGTFZYtc 8O0RqDUv1MwccDcyqSCoRPIL6bTxEaE31+DEgUNWZmu38xUsga0AoJC/dq6OZxjd Qp3iiMR1NjcLR8iFAf3uzkqgwX9KjuYdiKQRgrfjRww9qIj1TmU+odGJjpkjoOEP a7y7BELvEZC6ffvKCYaKjxGO2hfo6NJ8XSO33vlu2pHYPejqL6N421qSFf1pwvS4 mPoI6GuAgpGca6t0DN2i8V0/5Mq8rHwHert/Dz/v9ksGh3vNygX8xqWa6Iu8O2uu pN3zkC5UgDxoV79vBI5RVggl99miXDiWX/DslpqoiYjRn9YQcR3MyV2hKUH4Brog uMR7bv0fATyQNVZOp7b/ =6gPT -----END PGP SIGNATURE----- --==-=-=--