Use file local variables instead of buffer local variables

This commit is contained in:
Gerard Vermeulen 2024-02-11 16:19:02 +01:00
parent c408bdb50d
commit 8602371251

View File

@ -4341,7 +4341,7 @@ exporting from Org-mode to LaTeX.
(when (require 'ox-latex nil 'noerror) (when (require 'ox-latex nil 'noerror)
;; https://emacs.stackexchange.com/questions/47347/ ;; https://emacs.stackexchange.com/questions/47347/
;; customizing-org-latex-title-command-to-edit-title-page ;; customizing-org-latex-title-command-to-edit-title-page
(make-variable-buffer-local 'org-latex-classes) (make-local-variable 'org-latex-classes)
(cl-pushnew '("article-local" (cl-pushnew '("article-local"
"\\documentclass[11pt]{article} "\\documentclass[11pt]{article}
[NO-DEFAULT-PACKAGES] [NO-DEFAULT-PACKAGES]
@ -4354,19 +4354,14 @@ exporting from Org-mode to LaTeX.
("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
org-latex-classes :key #'car :test #'equal) org-latex-classes :key #'car :test #'equal)
(make-variable-buffer-local 'org-latex-title-command) (setq-local org-latex-title-command (concat title-page))
(setq org-latex-title-command (concat title-page)) (setq-local org-latex-toc-command "
(make-variable-buffer-local 'org-latex-toc-command)
(setq org-latex-toc-command "
\\tableofcontents\\label{toc} \\tableofcontents\\label{toc}
\\listoflistings \\listoflistings
\\listoftables \\listoftables
\\newpage \\newpage
") ")
(setq-local org-latex-subtitle-format ""))
(make-variable-buffer-local 'org-latex-subtitle-format)
(setq org-latex-subtitle-format ""))
#+end_src #+end_src
#+caption[Show a title-page example for =org-latex-title-command=]: #+caption[Show a title-page example for =org-latex-title-command=]: