add org macro mdate

This commit is contained in:
2026-01-28 18:36:05 +01:00
parent f99f844e25
commit b062fb98e3
2 changed files with 10 additions and 2 deletions

View File

@@ -1160,7 +1160,15 @@ except:
;; 'my-org-export-filter-hyphen-shy)
(setq org-export-with-smart-quotes t) ;; OPTIONS keyword, e.g., ":t".
(setq org-export-with-sub-superscripts '{}) ;; OPTIONS keyword, e.g., "^:{}".
;; see also https://orgmode.org/manual/Macro-Replacement.html
;; #+date: {{{mdate(%e %B %Y\, %H:%M)}}}
(setq org-export-global-macros
'((mdate . "(eval (let ()
(setq-local system-time-locale \"en_US.UTF-8\")
(format-time-string $1 (file-attribute-modification-time
(file-attributes (buffer-file-name))))))")))
;; http://permalink.gmane.org/gmane.emacs.orgmode/93971
;; https://emacs.stackexchange.com/questions/30575/adding-latex-newpage-before-a-heading/30892
(defun my-org-headline-string-element (headline backend info)