2021-01-22 21:01:45 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
":"; exec emacs --quick --script "$0" -- "$@" # -*- mode: emacs-lisp; lexical-binding: t; -*-
|
|
|
|
|
2021-03-28 07:55:47 +00:00
|
|
|
(setq log-file (expand-file-name (format "%s-log.txt" (file-name-base load-file-name))))
|
2021-01-23 14:23:24 +00:00
|
|
|
|
2021-01-22 21:01:45 +00:00
|
|
|
(load (expand-file-name "initialise.el" (file-name-directory load-file-name)) nil t)
|
2021-01-25 02:19:59 +00:00
|
|
|
(initialise t)
|
2021-01-22 21:01:45 +00:00
|
|
|
|
|
|
|
;;; Actually do the exporting now
|
|
|
|
|
|
|
|
(message "[34] Opening config file: %s"
|
|
|
|
(expand-file-name "config.org" config-root))
|
|
|
|
|
|
|
|
(require 'vc) ; need this for modification-time macro
|
2021-01-25 02:19:59 +00:00
|
|
|
(require 'org)
|
2021-01-29 15:25:26 +00:00
|
|
|
(require 'ox-latex)
|
2021-01-22 21:01:45 +00:00
|
|
|
|
2021-11-07 05:00:22 +00:00
|
|
|
(require 'emojify) ; this should not be needed
|
|
|
|
|
2021-03-06 04:01:16 +00:00
|
|
|
(advice-add 'pdf-tools-install :around #'ignore)
|
|
|
|
(advice-add 'pdf-info-features :around #'ignore)
|
|
|
|
|
2022-04-23 08:19:02 +00:00
|
|
|
(setq org-link-parameters
|
|
|
|
(delq (assoc "pdf" org-link-parameters)
|
|
|
|
org-link-parameters))
|
|
|
|
|
2021-09-08 09:28:08 +00:00
|
|
|
;; For some faces
|
|
|
|
(require 'highlight-numbers)
|
|
|
|
(require 'highlight-quoted)
|
|
|
|
(require 'rainbow-delimiters)
|
|
|
|
|
2021-01-24 17:22:18 +00:00
|
|
|
(setq org-mode-hook nil)
|
2021-01-25 02:19:59 +00:00
|
|
|
(with-temp-buffer
|
2021-01-28 08:39:19 +00:00
|
|
|
(let ((default-directory config-root)
|
|
|
|
(buffer-file-name (expand-file-name "config.org" config-root))
|
2021-01-25 02:19:59 +00:00
|
|
|
(org-export-coding-system org-html-coding-system)
|
2021-01-28 08:39:19 +00:00
|
|
|
org-mode-hook org-load-hook)
|
2021-01-25 02:19:59 +00:00
|
|
|
(insert-file-contents (expand-file-name "config.org" config-root))
|
2021-01-30 20:49:31 +00:00
|
|
|
(goto-char (point-max))
|
|
|
|
(insert (shell-command-to-string (expand-file-name "./gen-org-snippets.sh" script-root)))
|
2021-01-25 02:19:59 +00:00
|
|
|
(message "[33] Exporting %s" (buffer-file-name))
|
2021-03-05 18:23:53 +00:00
|
|
|
(org-mode)
|
2021-03-25 18:43:34 +00:00
|
|
|
;; There isn't actually any Julia code in config.org
|
|
|
|
(setq org-latex-conditional-features
|
|
|
|
(delq (rassq 'julia-code org-latex-conditional-features)
|
|
|
|
org-latex-conditional-features))
|
2021-01-28 08:39:19 +00:00
|
|
|
(org-latex-export-to-pdf)))
|
2021-01-22 21:01:45 +00:00
|
|
|
|
2021-01-28 08:39:19 +00:00
|
|
|
(publish "config.pdf")
|
2021-01-23 12:14:39 +00:00
|
|
|
|
2021-01-22 21:01:45 +00:00
|
|
|
(message "[1;32] Config export complete!")
|
|
|
|
|
|
|
|
(setq inhibit-message t)
|
|
|
|
(kill-emacs exit-code)
|