From 8fdd9ff682306cc5161f0b230d43493abff1d5e2 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 28 Nov 2010 16:51:14 +0100 Subject: [PATCH] Exporting lists to LaTeX respects blank lines * lisp/org-latex.el (org-export-latex-lists): do not add an unnecessary newline character after a list. * lisp/org-list.el (org-list-bottom-point-with-indent): ensure bottom point is just after a non blank line. --- lisp/org-latex.el | 2 +- lisp/org-list.el | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 91bf380..1a0aaf7 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -2383,7 +2383,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER." "\n" (match-string 1 res)) t t res))) - (insert res "\n")))) + (insert res)))) (defconst org-latex-entities '("\\!" diff --git a/lisp/org-list.el b/lisp/org-list.el index 2290b4a..07a15e4 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -518,7 +518,11 @@ List ending is determined by the indentation of text. See (setq ind-ref ind) (forward-line 1)) ((<= ind ind-ref) - (throw 'exit (point-at-bol))) + (throw 'exit (progn + ;; Ensure bottom is just after a + ;; non-blank line. + (skip-chars-backward " \r\t\n") + (min (point-max) (1+ (point-at-eol)))))) ((looking-at "#\\+begin_") (re-search-forward "[ \t]*#\\+end_") (forward-line 1)) -- 1.7.3.2