bug#50555: [BUG] Org Latex export doesn't handle src blocks correctly

2021-09-18 Thread Younes Ben El

Daniel Fleischer  writes:

> Here is the hint: since "minted" is using a python package (pygments) for
> the highlighting, one need to add the "-shell-escape" to the call. Other
> than that, everything works as planned. Since it's a specific
> configuration for using "minted", I'll add a comment in the manual.
>
> If you feel that there is still an issue with the [], please provide an
> emacs -Q recipe that shows it, after adding the "-shell-escape" flag.

Ah, That's the deal. Updating The Manual Will do the trick Thanks for
taking time and looking up at this issue .


bug#50555: [BUG] Org Latex export doesn't handle src blocks correctly

2021-09-18 Thread Younes Ben El
I Apologize for the previous mail, seems like it didn't go through
correctly .
Actually it does compile and produces a pdf file , however there's some
issue with it as it doesn't display the code_block.
if we set our emacs config to
#+begin_src emacs-lisp
(require 'ox-latex)
(setq org-latex-listings 'minted)
#+end_src
Then Set In Our org file
#+begin_src org
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [letterpaper]
#+LATEX_HEADER: \usepackage{minted}
#+OPTIONS: toc:t
#+end_src
and edit our org file and then compile it , it will not produce a code_block.
probably because of empty options [] like i tested , after we remove them it 
works.
Digging little into the issue, if we specfied a pdf-export-commands , it will 
result into
the expected exported pdf.
#+begin_src emacs-lisp
(with-eval-after-load 'ox-latex
  (add-to-list 'org-latex-packages-alist '("" "minted"))
  (setq org-latex-listings 'minted)
  (setq org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o 
%f"
  "pdflatex -shell-escape -interaction nonstopmode -output-directory %o 
%f"
  "pdflatex -shell-escape -interaction nonstopmode -output-directory %o 
%f")))
#+end_src
Not sure why it needs these in order to export correctly.
Here's some screenshots of the 
issue,[[https://i.imgur.com/VB1leIW.png][Exported_pdf]],[[https://i.imgur.com/x8lIIFW.png][org_file]],[[https://i.imgur.com/Tm0lzp4.png][exported_tex]],[[https://i.imgur.com/bxdI7Ja.png][Removing_Brackets]]