Add more functions to the shortdoc init group

This commit is contained in:
Gerard Vermeulen 2022-04-17 19:06:34 +02:00
parent eeae503add
commit b3f5952e66

View File

@ -595,8 +595,18 @@ defined in this Org file.
(set-default-face-height
:no-manual t)
"Org"
(org-babel-execute:latex-extra-header
:no-manual t)
(org-babel-execute:latex-header
:no-manual t)
(org-electric-dollar
:no-manual t)
(org-eval-emacs-lisp-setup-blocks
:no-manual t)
(org-eval-python-setup-blocks
:no-manual t)
(org-eval-infixed-blocks
:no-manual t)
(org-syntax-convert-keyword-case-to-lower
:no-manual t))))
#+end_src
@ -1889,36 +1899,35 @@ new [[info:org#Editing Source Code][<LANGUAGE>-modes]]: =latex-header= and =late
#+caption: easily.
#+name: lst:emacs-lisp-setup-latex-header
#+begin_src emacs-lisp :exports code :silent
(with-eval-after-load 'org-src
(add-to-list 'org-src-lang-modes '("toml" . conf-toml))
(with-eval-after-load 'emacs
(defun prefix-all-lines (prefix body)
(with-temp-buffer
(insert body)
(string-insert-rectangle (point-min) (point-max) prefix)
(buffer-string)))
(add-to-list 'org-src-lang-modes '("latex-header" . latex))
(defvar org-babel-default-header-args:latex-header
'((:exports . "results") (:results . "raw")))
(defun org-babel-execute:latex-extra-header (body _params)
"Execute a block of LaTeX extra header lines with org-babel.
This function is called by `org-babel-execute-src-block' and
prefixes all lines with \"#+latex_extra_header: \"."
(prefix-all-lines "#+latex_extra_header: " body))
(defun org-babel-execute:latex-header (body _params)
"Execute a block of LaTeX preamble lines with org-babel.
"Execute a block of LaTeX header lines with org-babel.
This function is called by `org-babel-execute-src-block' and
prefixes all lines with \"#+latex_header: \"."
(prefix-all-lines "#+latex_header: " body))
(add-to-list 'org-src-lang-modes '("latex-extra-header" . latex))
(defvar org-babel-default-header-args:latex-extra-header
'((:exports . "results") (:results . "raw")))
(defun org-babel-execute:latex-extra-header (body _params)
"Execute a block of LaTeX preamble lines with org-babel.
This function is called by `org-babel-execute-src-block' and
prefixes all lines with \"#+latex_extra_header: \"."
(prefix-all-lines "#+latex_extra_header: " body)))
(defvar org-babel-default-header-args:latex-header
'((:exports . "results") (:results . "raw")))
(with-eval-after-load 'org-src
(add-to-list 'org-src-lang-modes '("toml" . conf-toml))
(add-to-list 'org-src-lang-modes '("latex-header" . latex))
(add-to-list 'org-src-lang-modes '("latex-extra-header" . latex))))
#+end_src
The old way is to use a special export attribute as in the function