Org export: modify creator string

This commit is contained in:
TEC 2021-06-16 04:47:48 +08:00
parent e25f9e0673
commit 5368679676
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 9 additions and 1 deletions

View File

@ -1656,7 +1656,8 @@ correct package statement needed.
:pre-build
(with-temp-file (doom-path (straight--repos-dir "org-mode") "org-version.el")
(insert "(fset 'org-release (lambda () \"9.5\"))\n"
"(fset 'org-git-version #'ignore)\n"
(format "(fset 'org-git-version (lambda () \"%s\"))\n"
(substring (shell-command-to-string "git rev-parse --short HEAD") 0 -1))
"(provide 'org-version)\n"))
:includes org)))
(prin1-to-string
@ -6727,6 +6728,13 @@ the final documents.
(ox-extras-activate '(ignore-headlines))
#+end_src
Since I (roughly) track Org ~HEAD~, it makes sense to include the git version in
the creator string.
#+begin_src emacs-lisp
(setq org-export-creator-string
(format "Emacs %s (Org mode %s %s)" emacs-version (org-release) (org-git-version)))
#+end_src
**** Acronym formatting
I like automatically using spaced small caps for acronyms. For strings I want to
be unaffected let's use ~;~ as a prefix to prevent the transformation --- i.e.