[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 6ef33b6dd6: org-latex-src-block--listings: Put opti
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 6ef33b6dd6: org-latex-src-block--listings: Put options within lstlisting environment |
Date: |
Mon, 31 Oct 2022 04:57:52 -0400 (EDT) |
branch: externals/org
commit 6ef33b6dd6e61d5e8bccb5b086f9f09500e81fab
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-latex-src-block--listings: Put options within lstlisting environment
* lisp/ox-latex.el (org-latex-src-block--listings): Do not use global
\lstset to set options. Prefer optional argument to lstlisting
environment instead.
Reported-by: Denis Bitouzé <denis.bitouze@univ-littoral.fr>
Link: https://orgmode.org/list/87pmepvb7u.fsf@example.com
---
lisp/ox-latex.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 6d72dab700..acc3df70cb 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3577,9 +3577,9 @@ and FLOAT are extracted from SRC-BLOCK and INFO in
`org-latex-src-block'."
(org-export-data main info))))))
(lst-opt (plist-get info :latex-listings-options)))
(concat
- ;; Options.
(format
- "\\lstset{%s}\n"
+ "\\begin{lstlisting}[%s]\n%s\\end{lstlisting}"
+ ;; Options.
(concat
(org-latex--make-option-string
(append
@@ -3600,10 +3600,8 @@ and FLOAT are extracted from SRC-BLOCK and INFO in
`org-latex-src-block'."
(t `(("firstnumber" ,(number-to-string (1+ num-start)))
("numbers" "left"))))))
(let ((local-options (plist-get attributes :options)))
- (and local-options (concat "," local-options)))))
- ;; Source code.
- (format
- "\\begin{lstlisting}\n%s\\end{lstlisting}"
+ (and local-options (concat "," local-options))))
+ ;; Source code.
(let* ((code-info (org-export-unravel-code src-block))
(max-width
(apply 'max
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 6ef33b6dd6: org-latex-src-block--listings: Put options within lstlisting environment,
ELPA Syncer <=