From mboxrd@z Thu Jan 1 00:00:00 1970 From: P-O Gustafsson Subject: Problem with src blocks line numbers when generating PDF output using latex listings. Date: Thu, 14 Jan 2016 19:21:53 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141ba066c1a4705294f5ceb Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJmWx-0007nA-Cj for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 13:21:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aJmWw-0003Yt-8z for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 13:21:55 -0500 Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]:34684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aJmWw-0003Yo-3J for emacs-orgmode@gnu.org; Thu, 14 Jan 2016 13:21:54 -0500 Received: by mail-io0-x234.google.com with SMTP id 1so414837630ion.1 for ; Thu, 14 Jan 2016 10:21:53 -0800 (PST) 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 --001a1141ba066c1a4705294f5ceb Content-Type: text/plain; charset=UTF-8 Hello, I ran into what I think is a bug in ox-latex.el. I tried to generate a PDF document that contains the source code for two files. The first file is split into two src block snippets and I used the switches '-n' and '+n' to have the line numbering starting in the first snippet and continue over to the second snippet. For the third snippet I used the '-n' switch and I expected the line numbering for snippet three to start a 1, but it continued with the line numbering sequence from snippet two. The line numbering behaved as I expected when I generated HTML output, so I had a look in ox-latex.el. I solved the problem by deleting the code on line 2800, but that might not be the best solution which is why I thought I'd report it so that someone who knows the code can take look. org-version: 8.3.3 Configuration: (add-to-list 'org-latex-packages-alist '("" "listings")) (add-to-list 'org-latex-packages-alist '("" "color")) (setq org-latex-listings t) Workaround: I deleted the code on line 2800 in ox-latex.el File Line Code ox-latex.el 2800 ((zerop num-start) '(("numbers" "left"))) Best regards Per --001a1141ba066c1a4705294f5ceb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I ran into what I think is a bug in ox-= latex.el. I tried to generate a PDF document that contains the source code = for two files. The first file is split into two src block snippets and I us= ed the switches '-n' and '+n' to have the line numbering st= arting in the first snippet and continue over to the second snippet. For th= e third snippet I used the '-n' switch and I expected the line numb= ering for snippet three to start a 1, but it continued with the line number= ing sequence from snippet two. The line numbering behaved as I expected whe= n I generated HTML output, so I had a look in ox-latex.el. I solved the pro= blem by deleting the code on line 2800, but that might not be the best solu= tion which is why I thought I'd report it so that someone who knows the= code can take look.

org-version: 8.3.3
Configuration:
(add-to-list 'org-latex-packages-alist '("&= quot; "listings"))
(add-to-list 'org-latex-packages-alist = '("" "color"))
(setq org-latex-listings t)
Workaround: I deleted the code on line 2800 in ox-latex.el
=
File=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 Line=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Code
ox-latex.el=C2=A0=C2=A0=C2=A0 2800=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 ((zerop num-start) '(("numbers" "l= eft")))

Best regards
Per
--001a1141ba066c1a4705294f5ceb--