I'm using org-beamer exporter, and I would like to do the following:

  (defalias 'org-babel-execute:emacs-lisp lisp 'org-babel-execute:emacs lisp)

My problem is 'org-babel-execute:emacs lisp has a space character, which I need so the code in latex appears as:

\begin{minted}[frame=lines,fontsize=\scriptsize,linenos]{emacs lisp}
(defalias 'org-babel-execute:emacs-lisp 'org-babel-execute:emacs lisp)

minted uses pygments, which defines emacs lisp, with space.

  • What does org-babel-execute:emacs-lisp have to do with LaTeX? Please provide full details of what you are trying to do: I cannot guess from your question where you are starting from and where you want to end up. Edit your question and clarify.
    – NickD
    Sep 24, 2021 at 17:05
  • If you are trying to export an Org mode document with an emacs-lisp source code block, this works out of the box for me. In particular, pygmentize -L lexers | grep emacs shows that emacs, elisp and emacs-lisp are all recognized. What problem are you facing exactly? Do you get an error? What's the error message?
    – NickD
    Sep 24, 2021 at 18:06
  • See e.g. github.com/pygments/pygments/issues/914
    – NickD
    Sep 25, 2021 at 0:11
  • Actually, I the problem seem I have to run the code in the .tex file, exported by .org, so to codes in minted blocks to work. I don't know why. But, that's how it's behaving
    – BuddhiLW
    Sep 25, 2021 at 1:31
  • Can you provide a complete example? A small Org mode file, how you export it (the exact key sequence), what the resulting LaTeX file looks like and what happens when you compile that file. You should include all of that in your question. Otherwise, I cannot help you.
    – NickD
    Sep 25, 2021 at 12:41


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.