107587e01f
* Implement headers and footers for export to LaTeX. * Implement a title page for export to LaTeX. * Improve the text in many places. * Configure export to LaTeX using buffer local variables.
33 lines
889 B
Bash
Executable File
33 lines
889 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
emacs -Q --batch --eval "
|
|
(progn
|
|
(require 'org)
|
|
(require 'ob-latex)
|
|
(defun my-org-eval-blocks-named (name)
|
|
(when (eq major-mode 'org-mode)
|
|
(let ((blocks
|
|
(org-element-map
|
|
(org-element-parse-buffer 'greater-element nil) 'src-block
|
|
(lambda (block)
|
|
(when (string= name (org-element-property :name block))
|
|
block)))))
|
|
(dolist (block blocks)
|
|
(goto-char (org-element-property :begin block))
|
|
(org-babel-execute-src-block)))))
|
|
|
|
(add-to-list 'safe-local-eval-forms
|
|
'(apply 'my-org-eval-blocks-named '(\"emacs-lisp-setup\")))
|
|
|
|
(setq org-confirm-babel-evaluate nil)
|
|
(setq python-indent-guess-indent-offset nil)
|
|
|
|
(org-babel-tangle-file \"$1\"))
|
|
"
|
|
|
|
# Local Variables:
|
|
# mode: shell-script
|
|
# sh-indentation: 2
|
|
# sh-basic-offset: 2
|
|
# End:
|