emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Karl Stump <karlstump@gmail.com>
To: emacs-orgmode@gnu.org
Cc: Karl Stump <karlstump@gmail.com>
Subject: [PATCH] Fixed lstset where language= wipes out previous definitions
Date: Fri, 28 May 2021 18:40:59 -0400	[thread overview]
Message-ID: <20210528224059.2972-1-karlstump@gmail.com> (raw)

* ox-latex.el (org-latex-src-block): moved (("language" ,lst-lang)) to the head of the list.
This fixes wiping out preceding definitions given in `org-latex-listings-options'.
TINYCHANGE
---
 lisp/ox-latex.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index b9ecf070a..f956c851e 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -3075,13 +3075,13 @@ contextual information."
 	    (concat
 	     (org-latex--make-option-string
 	      (append
-	       lst-opt
+               `(("language" ,lst-lang))
+               lst-opt
 	       (cond
 		((and (not float) (plist-member attributes :float)) nil)
 		((string= "multicolumn" float) '(("float" "*")))
 		((and float (not (assoc "float" lst-opt)))
 		 `(("float" ,(plist-get info :latex-default-figure-position)))))
-	       `(("language" ,lst-lang))
 	       (if label
 		   `(("label" ,(org-latex--label src-block info)))
 		 '(("label" " ")))
-- 
2.31.0



             reply	other threads:[~2021-05-28 22:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 22:40 Karl Stump [this message]
2021-09-19 13:02 ` Timothy
2021-09-26  9:07   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210528224059.2972-1-karlstump@gmail.com \
    --to=karlstump@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [PATCH] Fixed lstset where language= wipes out previous definitions' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).