Hi, here is a feature request about the LaTeX export.
With ~(setq org-latex-listings t)~, code blocks such as: ┌──── │ #+BEGIN_SRC ⟨language⟩ :exports code │ ... │ #+END_SRC └──── are exported to LaTeX into: ┌──── │ \lstset{language=⟨language⟩,label= ,caption= ,captionpos=b,numbers=none} │ \begin{lstlisting} │ ... │ \end{lstlisting} └──── But the: ┌──── │ \lstset{language=⟨language⟩,label= ,caption= ,captionpos=b,numbers=none} └──── systematically added before each of the ~lstlisting~ LaTeX environments is not always desirable and let me explain why. Sometimes, you want the ~listings~ package to have some global settings that are overridden by this ~\lstset{...}~ added by Org. Typically, you may define some dialects ⟨dialect1⟩, ..., ⟨dialectN⟩ of a given ⟨language⟩ and you want to load them in addition to the (main) ⟨language⟩. This can be done by the following global setting: ┌──── │ \lstset{ │ language=⟨language⟩, │ alsolanguage=[⟨dialect1⟩]⟨language⟩, │ ... │ alsolanguage=[⟨dialectN⟩]⟨language⟩, │ } └──── Unfortunately, it is overridden by each ~\lstset{...}~ added by Org. So would it be possible to provide an option that prevents Org to add these systematic: ┌──── │ \lstset{language=⟨language⟩,label= ,caption= ,captionpos=b,numbers=none} └──── Thanks! -- Denis