From: Andreas Gerler Date: Thu, 23 Jul 2015 07:20:10 +0000 (+0200) Subject: more org-mode snippets X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=1ab4700d7163150ebcc7e14baf6950f65e9595f3;p=emacsconfig.git more org-mode snippets thanks to http://howardism.org --- diff --git a/snippets/org-mode/babel-shell b/snippets/org-mode/babel-shell new file mode 100644 index 00000000..239486dc --- /dev/null +++ b/snippets/org-mode/babel-shell @@ -0,0 +1,14 @@ +# -*- mode: snippet -*- +# name: babel-shell +# key: babel-sh +# -- +* Technical Section + +This file originally came from an [[http://orgmode.org][org-mode]] file. +Create the script by tangling it with: =C-c C-v t= + + +#+PROPERTY: tangle ${1:~/bin/`(file-name-nondirectory (file-name-sans-extension (buffer-file-name)))`} +#+PROPERTY: comments org +#+PROPERTY: shebang #!/usr/bin/env ${2:sh} +#+DESCRIPTION: $0 diff --git a/snippets/org-mode/blog b/snippets/org-mode/blog new file mode 100644 index 00000000..f8da2b54 --- /dev/null +++ b/snippets/org-mode/blog @@ -0,0 +1,16 @@ +# -*- mode: snippet; require-final-newline: nil -*- +# name: blog +# key: blog +# -- +#+TITLE: ${1:`(replace-regexp-in-string "-" " " (capitalize (file-name-nondirectory (file-name-sans-extension (buffer-file-name)))))`} +#+AUTHOR: `(user-full-name)` +#+EMAIL: `user-mail-address` +#+DATE: `(format-time-string "%Y-%b-%d %a")` +#+URI: `(replace-regexp-in-string (concat (getenv "HOME") "/[^/]*/") "/" (file-name-sans-extension (buffer-file-name)))`/ +#+TAGS: $2 +#+KEYWORDS: $3 +#+LANGUAGE: en +#+OPTIONS: H:3 num:nil toc:nil \n:nil ::t |:t ^:nil -:nil f:t *:t <:t +#+DESCRIPTION: $4 + +$0 diff --git a/snippets/org-mode/title b/snippets/org-mode/title new file mode 100644 index 00000000..7ac589a3 --- /dev/null +++ b/snippets/org-mode/title @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: title +# key: title +# -- +#+TITLE: ${1:`(replace-regexp-in-string "-" " " (capitalize (file-name-nondirectory (file-name-sans-extension (buffer-file-name)))))`} +#+AUTHOR: `(user-full-name)` +#+EMAIL: `user-mail-address` +#+DATE: `(format-time-string "%Y %b %d")` +#+TAGS: $2 + +$0