add org macro mdate
This commit is contained in:
@@ -1160,7 +1160,15 @@ except:
|
|||||||
;; 'my-org-export-filter-hyphen-shy)
|
;; 'my-org-export-filter-hyphen-shy)
|
||||||
(setq org-export-with-smart-quotes t) ;; OPTIONS keyword, e.g., "’:t".
|
(setq org-export-with-smart-quotes t) ;; OPTIONS keyword, e.g., "’:t".
|
||||||
(setq org-export-with-sub-superscripts '{}) ;; OPTIONS keyword, e.g., "^:{}".
|
(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
|
;; http://permalink.gmane.org/gmane.emacs.orgmode/93971
|
||||||
;; https://emacs.stackexchange.com/questions/30575/adding-latex-newpage-before-a-heading/30892
|
;; https://emacs.stackexchange.com/questions/30575/adding-latex-newpage-before-a-heading/30892
|
||||||
(defun my-org-headline-string-element (headline backend info)
|
(defun my-org-headline-string-element (headline backend info)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# -*- ispell-local-dictionary: "english" -*-
|
# -*- ispell-local-dictionary: "english" -*-
|
||||||
#+TITLE: ${1:Title}
|
#+TITLE: ${1:Title}
|
||||||
#+SUBTITLE: ${2:Subtitle}
|
#+SUBTITLE: ${2:Subtitle}
|
||||||
#+DATE: ${3:{{{modification-time(%d.%m.%Y)}}}}
|
#+DATE: ${3:{{{mdate(%d %B %Y)}}}}
|
||||||
#+AUTHOR: ${4:My Name}
|
#+AUTHOR: ${4:My Name}
|
||||||
#+EMAIL: ${5:my.name@example.com}
|
#+EMAIL: ${5:my.name@example.com}
|
||||||
#+KEYWORDS:
|
#+KEYWORDS:
|
||||||
|
|||||||
Reference in New Issue
Block a user