From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: 'listings' package used but not required in LaTeX export Date: Sun, 09 Jun 2013 09:34:48 +0200 Message-ID: <87bo7fwxd3.fsf@gmail.com> References: <8761xoqtjf.fsf@gmail.com> <87a9n0w5vx.fsf@pank.eu> <871u8cqhxa.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ula9D-0003mZ-Gu for emacs-orgmode@gnu.org; Sun, 09 Jun 2013 03:34:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ula9C-0000De-Ay for emacs-orgmode@gnu.org; Sun, 09 Jun 2013 03:34:43 -0400 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:60948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ula9B-0000Da-RT for emacs-orgmode@gnu.org; Sun, 09 Jun 2013 03:34:41 -0400 Received: by mail-wg0-f53.google.com with SMTP id y10so1635032wgg.8 for ; Sun, 09 Jun 2013 00:34:40 -0700 (PDT) In-Reply-To: <871u8cqhxa.fsf@gmail.com> (Thorsten Jolitz's message of "Sun, 09 Jun 2013 01:52:33 +0200") 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: Thorsten Jolitz Cc: emacs-orgmode@gnu.org Hello, Thorsten Jolitz writes: > Rasmus writes: > >> Thorsten Jolitz writes: >> >>> but there is no >>> >>> ,---------------------- >>> | \usepackage{listings} >>> `---------------------- >> >> This is a feature to my understanding. > > mmhh ... I would rather say that the defaults can be as simple as > possible (or desired), but should result in reasonable output without > any user interaction. But without adding a \usepackage{listings} or > modifying the variables you mention the LaTeX output is unusable in this > case. > >> Several packagess can format, and I for instance prefer pygments if I >> need code formatting. > > Then the default should be loading one of them rather than using package > macros in the exported LaTeX sources without loading a package that > contains those macros. > >> You could add listings to your packages list, either >> org-latex-packages-alist or even org-latex-default-packages-alist, if >> you really want to. >> >> You could probably also write a clever filter to load a package if it >> is missing. > > I could, and thanks for the tips, but I still think this can be > considered a bug (if I'm not the only one having the problem). By default, `org-latex-listings' is nil, which means no "listings" code is inserted in the output. Therefore, the problem comes from your configuration (i.e. you changed variable's value without reading its docstring). Regards, -- Nicolas Goaziou