From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Bug: src code blocks of type compilation-minor don't work when generating PDF [9.1.14 (9.1.14-dist @ /path/to/org/install/emacs/site-lisp/org/)] Date: Fri, 01 Feb 2019 14:04:27 -0500 Message-ID: <87y36zqqis.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpe7V-0006HD-7J for emacs-orgmode@gnu.org; Fri, 01 Feb 2019 14:04:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpe7U-0002if-6t for emacs-orgmode@gnu.org; Fri, 01 Feb 2019 14:04:57 -0500 Received: from [195.159.176.226] (port=47692 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpe7T-0002bh-VD for emacs-orgmode@gnu.org; Fri, 01 Feb 2019 14:04:56 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gpe78-000UyO-E3 for emacs-orgmode@gnu.org; Fri, 01 Feb 2019 20:04:34 +0100 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" To: emacs-orgmode@gnu.org John Ciolfi writes: > Hi > > Using following > > emacs -q --batch -L /path/to/org/install/emacs/site-lisp/org -l my-org-to-pdf.el > > the generated PDF is incorrect. The "compilation-minor" code block gets > replaced with the "c" code block, i.e. the c code block is > duplicated. If you generate HTML all is good. Running org-lint doesn't > indicate that one cannot use compilation-minor code blocks. Hi John, Given that the produced foo.tex file looks correct, it seems that since minted does not know what to do with the "compilation-minor" "language", it goes off a cliff. If you compile it by hand: pdflatex --shell-escape foo.tex it produces an error message: ,---- | (./foo.out.pyg) (./foo.out.pyg) (./foo.toc) (./foo.out.pyg)Error: no | lexer for alias 'compilation-minor' found system returned with code | 256 (./foo.out.pyg) `---- but since it produces a (wrong) PDF, the org exporter does not dig any further. Changing the language to "c" in the tex file (or in the source block before re-exporting) produces something a bit better. Ideally, you'd need to define a lexer for the "compilation-minor" "language", but that's a minted/pygments project. Not sure whether it's worth doing anything about this on the org mode side, but that's not my call. HTH. PS. Constantine says "Hi" :-) -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler