From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Holst Subject: Bug in export to LaTex: Lists with source code blocks Date: Tue, 25 Oct 2011 13:32:27 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIfZq-0000d4-Dc for emacs-orgmode@gnu.org; Tue, 25 Oct 2011 07:53:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIfZo-0002yY-UZ for emacs-orgmode@gnu.org; Tue, 25 Oct 2011 07:53:54 -0400 Received: from imta22.fe.bosch.de ([139.15.243.26]:16397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIfZo-0002yJ-Mg for emacs-orgmode@gnu.org; Tue, 25 Oct 2011 07:53:52 -0400 Received: from smtp2-v.fe.bosch.de (imta23.fe.bosch.de [139.15.243.227]) by imta22.fe.bosch.de (Postfix) with ESMTP id 8BFB43FE8B65 for ; Tue, 25 Oct 2011 13:46:32 +0200 (CEST) Received: from vsmta14.fe.internet.bosch.com (unknown [10.4.98.30]) by imta23.fe.bosch.de (Postfix) with ESMTP id 2945958207FD for ; Tue, 25 Oct 2011 13:44:47 +0200 (CEST) Received: from localhost (vsgw2.fe.internet.bosch.com [10.4.98.13]) by vsmta14.fe.internet.bosch.com (Postfix) with SMTP id 3474C32B0115 for ; Tue, 25 Oct 2011 13:44:47 +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 Hello, there is a bug when exporting to LaTeX if there is a source code block inside a list. I have a file with the following contents: #+begin_org #+TITLE: Lists mit Source-Blocks #+AUTHOR: thomas.holst@gmx.de #+EMAIL: Thomas Holst #+DATE: 25.10.2011 #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:{} -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport * A heading 1. First Item #+begin_src perl print "First example:\n"; #+end_src Text in first item. 2. Second Item #+begin_src perl print "Second example:\n"; #+end_src Text in second item. #+end_org The exportet LaTeX file contains the following: #+begin_src latex % [ ... snip ... ] \begin{document} % [ ... snip ... ] \begin{enumerate} \item First Item \lstset{language=Perl} \begin{lstlisting} print "First example:\n"; \end{lstlisting} \end{enumerate} %^^^^^^^^^^^^^^ Text in first item. \begin{enumerate} %^^^^^^^^^^^^^^^^ \item Second Item \lstset{language=Perl} \begin{lstlisting} print "Second example:\n"; \end{lstlisting} \end{enumerate} %^^^^^^^^^^^^^^ Text in second item. ORG-LIST-END-MARKER %^^^^^^^^^^^^^^^^^^ \end{document} #+end_src The enumerate environment is ended after the source code block and started before the next item again. There is a line saying 'ORG-LIST-END-MARKER' which should not be there. I marked the relevant lines with comments. This happens with: (emacs-version) "GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-09-19 on 3249CTO" on WinXP (org-version) "Org-mode version 7.7 (release_7.7.396.gfaaa)" Tested with a minimal setup file: #+begin_src emacs-lisp ;; ----------------------------------------------------------------------------- ;; set path to local org repo ;; ----------------------------------------------------------------------------- (add-to-list 'load-path "~/git/org-mode/lisp") ;; pfad zu contib/lisp (add-to-list 'load-path "~/git/org-mode/contrib/lisp") (add-to-list 'load-path "~/git/org-mode/contrib/babel/lisp") (require 'org-install) (require 'org-latex) (find-file "~/emacs/Testing/ListsSCB.org") (org-export-as-latex-to-buffer 3) #+end_src : emacs -Q --eval "(load-file \"~/emacs/Testing/start-exp-test.el\")" In "Org-mode version 7.7 (release_7.7)" the bug does not exist. 'git bisect' showed that the bug was introduced by: commit 707897c25c8f2412a31d5f47bc2c201c5bcf8d1d Author: Nick Dokos Date: Fri Aug 19 05:02:57 2011 -0400 Eliminate extra newline(s) after example or src block. Signed-off-by: Nick Dokos -- Bis neulich ... Thomas