dotfiles/emacs/templates/org-mode/__

29 lines
891 B
Plaintext
Raw Normal View History

# -*- mode: snippet -*-
# name: Org template
# --
#+TITLE: ${1:`
(string-join
(mapcar #'capitalize
;; Replace -,_... with space
(split-string
(let (case-fold-search)
;; Seperating lower from upper: hello|World
(replace-regexp-in-string
"\\([[:lower:]]\\)\\([[:upper:]]\\)" "\\1 \\2"
;; Separating upper from (upper and lower): HTTP|Server
(replace-regexp-in-string "\\([[:upper:]]\\)\\([[:upper:]][0-9[:lower:]]\\)"
"\\1 \\2" (file-name-base buffer-file-name))))
"[^[:word:]0-9]+"
)) " " )
`}
#+AUTHOR: "`user-full-name`"
#+EMAIL: "`user-mail-address`"
#+DATE: "`(format-time-string "%Y-%m-%d %T %:z")`"
#+DATE_MODIFIED: "`(format-time-string "%Y-%m-%d %T %:z")`"
#+LANGUAGE: en
#+OPTIONS: toc:t
#+PROPERTY: header-args :exports both
$0