Bastien wrote: > Hi Nick, > > Nick Dokos writes: > > > * foo > > > > Verbiage to begin the paragraph > > #+begin_src shell > > get-config.py var section [section ...] > > #+end_src > > and verbiage to end the same paragraph. > > > > * bar > > > > Verbiage to begin the paragraph > > #+begin_example > > get-config.py var section [section ...] > > #+end_example > > and verbiage to end the same paragraph. > > I tested your patch with the example above and I get this: > > ,---- > | Verbiage to begin the paragraph > | > | \lstset{language=shell} > | \begin{lstlisting} > | get-config.py var section [section ...] > | \end{lstlisting} > | > | and verbiage to end the same paragraph. > | \section*{bar} > | \label{sec-2} > | > | > | Verbiage to begin the paragraph > | > | \begin{verbatim} > | get-config.py var section [section ...] > | \end{verbatim} > | and verbiage to end the same paragraph. > `---- > > It looks better than the current export (less white lines) but still > has a problem with the first "and verbiage..." being indented. > > Is this intentional? Or do you want the same behavior for #+begin_src > and #+begin_example? > > In overall, I think number of white lines should be the same in the Org > source file and in the LaTeX exported file, so a patch here is welcome. > But maybe I misunderstood something in Eric's reply. > So here's another patch to get rid of some more newlines, these ones after a listings or minted environment. I tried both with the previously posted file and setting org-export-latex-listings to t or 'minted. AFAICT, it works as it should and should not break anything else, but... This is to be applied on top of the previous one (and it's still very much a trial balloon). BTW, the defcustom of org-export-latex-listings seems to be outdated: custom thinks it's a boolean, but it can now take at least one more value (minted - see the docstring). Thanks, Nick