emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: LaTeX export of org file uses listings instead of minted, why?
Date: Wed, 19 Apr 2017 20:31:25 -0400	[thread overview]
Message-ID: <87vapz9axu.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: 716767555.11851481492641343868.JavaMail.httpd@webmail-30.iol.local

"vendo.libri@libero.it" <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

  reply	other threads:[~2017-04-20  0:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 22:35 LaTeX export of org file uses listings instead of minted, why? vendo.libri
2017-04-20  0:31 ` Nick Dokos [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-04-23 12:02 vendo.libri
2017-04-23 13:00 ` Kaushal Modi
2017-04-23 16:03 vendo.libri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vapz9axu.fsf@alphaville.usersys.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).