mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-01-31 04:57:57 +00:00
29 lines
891 B
Plaintext
29 lines
891 B
Plaintext
|
# -*- 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
|