From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: LaTeX export of org file uses listings instead of minted, why? Date: Wed, 19 Apr 2017 20:31:25 -0400 Message-ID: <87vapz9axu.fsf@alphaville.usersys.redhat.com> References: <716767555.11851481492641343868.JavaMail.httpd@webmail-30.iol.local> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d100a-0008FO-U6 for emacs-orgmode@gnu.org; Wed, 19 Apr 2017 20:31:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d100W-0004bA-JZ for emacs-orgmode@gnu.org; Wed, 19 Apr 2017 20:31:40 -0400 Received: from [195.159.176.226] (port=58340 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d100W-0004ak-D2 for emacs-orgmode@gnu.org; Wed, 19 Apr 2017 20:31:36 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d100N-0007kz-DU for emacs-orgmode@gnu.org; Thu, 20 Apr 2017 02:31:27 +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" To: emacs-orgmode@gnu.org "vendo.libri@libero.it" writes: > Hello there! > I'm having a bit of a problem telling emacs to use MINTED instead of LISTINGS to handle code blocks > enclosed within #+BEGIN_SRC and #+END_SRC when exporting from an org file. > > I've had to Customize Org Groups using the GUI menu `Org' but as soon as I close and restart emacs, it > goes back to LISTINGS. I know this because when I export a minimum working example org file, the > resulting pdf does not recognize code. If I manually change the .tex file and run it, it works > perfectly. > > I've added a few lines into my .emac file (please find it attached to this mail) but because it's > uneven, often repetitive and scrappy, I suspect there's some conflict going on which I, as a simple user > of orgmode, am not able to detect. > > Can someone please check the file and tell me why emacs/orgmode keeps reverting to LISTINGS every time I > shut down and restart emacs? > > I'm running org mode 8.2, emacs 24 on a Windows 7 machine. I also have a working TeX Live 2015 distro > with MINTED pkg properly working in AUCTeX and I have python's pygmentize.exe in my C:\Python27\Scrips\ > directory. What am I missing? Can you help me fix this? > > Is your .emacs read at all? From the SE exchange, I have my doubts, but a Windows user might be able to steer you in the right direction. I would use a minimal init file and invoke emacs with (the Windows equivalent of) emacs -q -l /path/to/minimal/init/file and then evaluate the variable C-h v org-latex-listings RET and try to export your org file. The minimal init file should do the minimum possible. Mine looks like this: --8<---------------cut here---------------start------------->8--- (add-to-list 'load-path "~/src/emacs/org/org-mode/lisp") (require 'org-loaddefs) (require 'org) (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-cc" 'org-capture) (global-set-key "\C-ca" 'org-agenda) ;;; https://emacs.stackexchange.com/questions/32225/latex-export-uses-lstlisting-instead-of-minted-why#comment49631_32225 (setq org-latex-listings 'minted org-latex-packages-alist '(("" "minted")) org-latex-pdf-process '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")) --8<---------------cut here---------------end--------------->8--- and as I said on SE it works fine on Fedora 24 with emacs 26.0.50 and org-mode 9.0.5. That's more recent than yours but I tried it with org-mode 8.2.10 as well and it works there too. Can you post the org file and the resulting TeX file after this experiment? -- Nick