From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [patch] LaTeX export of lists Date: Sun, 28 Nov 2010 16:54:02 +0100 Message-ID: <87mxoth2at.wl%n.goaziou@gmail.com> References: <87pqtph4j0.wl%n.goaziou@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Sun_Nov_28_16:54:02_2010-1" Return-path: Received: from [140.186.70.92] (port=56476 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMjZn-0003SN-Ce for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 10:54:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMjZl-0007or-TG for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 10:54:07 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:41531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMjZl-0007oj-Oc for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 10:54:05 -0500 Received: by wyb42 with SMTP id 42so11603783wyb.0 for ; Sun, 28 Nov 2010 07:54:04 -0800 (PST) In-Reply-To: <87pqtph4j0.wl%n.goaziou@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: emacs mailing list --Multipart_Sun_Nov_28_16:54:02_2010-1 Content-Type: text/plain; charset=US-ASCII Thomas, Could you please test this patch and tell me if it breaks something? Regards, -- Nicolas --Multipart_Sun_Nov_28_16:54:02_2010-1 Content-Type: text/plain; type=patch; charset=US-ASCII Content-Disposition: attachment; filename="0001-Exporting-lists-to-LaTeX-respects-blank-lines.patch" Content-Transfer-Encoding: 7bit >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 --Multipart_Sun_Nov_28_16:54:02_2010-1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Multipart_Sun_Nov_28_16:54:02_2010-1--