emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: emacs mailing list <emacs-orgmode@gnu.org>
Subject: Re: [patch] LaTeX export of lists
Date: Sun, 28 Nov 2010 16:54:02 +0100	[thread overview]
Message-ID: <87mxoth2at.wl%n.goaziou@gmail.com> (raw)
In-Reply-To: <87pqtph4j0.wl%n.goaziou@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 101 bytes --]

Thomas,

Could you please test this patch and tell me if it breaks something?

Regards,

-- Nicolas


[-- Attachment #2: 0001-Exporting-lists-to-LaTeX-respects-blank-lines.patch --]
[-- Type: text/plain, Size: 1548 bytes --]

From 8fdd9ff682306cc5161f0b230d43493abff1d5e2 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
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


[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

  reply	other threads:[~2010-11-28 15:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28 14:33 LaTeX export of lists Thomas S. Dye
2010-11-28 15:05 ` Nicolas Goaziou
2010-11-28 15:54   ` Nicolas Goaziou [this message]
2010-11-28 19:02     ` [patch] " Thomas S. Dye
2010-11-28 21:15       ` Nicolas Goaziou
2010-11-29  8:42         ` Sébastien Mengin
2010-11-29 12:17           ` Nicolas Goaziou
2010-11-28 18:40   ` Thomas S. Dye
2010-11-29  8:43     ` Sébastien Mengin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mxoth2at.wl%n.goaziou@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tsd@tsdye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).