From a281f040cd35dffe171d5b7d6b00fe03163be6a0 Mon Sep 17 00:00:00 2001
From: Tom Willemsen
Date: Sun, 17 Feb 2013 23:09:24 +0100
Subject: Move .emacs.d to emacs
Since it's no longer placed directly in the home directory it doesn't
need to be named exacly the same.
---
emacs/snippets/Makefile | 4 +++
emacs/snippets/html-mode/Makefile | 4 +++
emacs/snippets/html-mode/for | 8 +++++
emacs/snippets/html-mode/generic-block | 8 +++++
emacs/snippets/org-mode/Makefile | 4 +++
emacs/snippets/org-mode/codeblock | 7 ++++
emacs/snippets/org-mode/heading | 9 +++++
emacs/snippets/org-mode/project | 51 +++++++++++++++++++++++++++++
emacs/snippets/org-mode/snippet | 14 ++++++++
emacs/snippets/python-mode/Makefile | 4 +++
emacs/snippets/python-mode/defm_empty | 7 ++++
emacs/snippets/python-mode/form | 9 +++++
emacs/snippets/python-mode/form_valid | 8 +++++
emacs/snippets/python-mode/import_from | 6 ++++
emacs/snippets/python-mode/permission_guard | 9 +++++
emacs/snippets/python-mode/url | 5 +++
16 files changed, 157 insertions(+)
create mode 100644 emacs/snippets/Makefile
create mode 100644 emacs/snippets/html-mode/Makefile
create mode 100644 emacs/snippets/html-mode/for
create mode 100644 emacs/snippets/html-mode/generic-block
create mode 100644 emacs/snippets/org-mode/Makefile
create mode 100644 emacs/snippets/org-mode/codeblock
create mode 100644 emacs/snippets/org-mode/heading
create mode 100644 emacs/snippets/org-mode/project
create mode 100644 emacs/snippets/org-mode/snippet
create mode 100644 emacs/snippets/python-mode/Makefile
create mode 100644 emacs/snippets/python-mode/defm_empty
create mode 100644 emacs/snippets/python-mode/form
create mode 100644 emacs/snippets/python-mode/form_valid
create mode 100644 emacs/snippets/python-mode/import_from
create mode 100644 emacs/snippets/python-mode/permission_guard
create mode 100644 emacs/snippets/python-mode/url
(limited to 'emacs/snippets')
diff --git a/emacs/snippets/Makefile b/emacs/snippets/Makefile
new file mode 100644
index 0000000..12ff544
--- /dev/null
+++ b/emacs/snippets/Makefile
@@ -0,0 +1,4 @@
+DESTDIR:=$(DESTDIR)/snippets
+modules=html-mode org-mode python-mode
+
+include ../../dotfiles.mk
diff --git a/emacs/snippets/html-mode/Makefile b/emacs/snippets/html-mode/Makefile
new file mode 100644
index 0000000..b2dff78
--- /dev/null
+++ b/emacs/snippets/html-mode/Makefile
@@ -0,0 +1,4 @@
+DESTDIR:=$(DESTDIR)/html-mode
+objects=for generic-block
+
+include ../../../dotfiles.mk
diff --git a/emacs/snippets/html-mode/for b/emacs/snippets/html-mode/for
new file mode 100644
index 0000000..01d9c44
--- /dev/null
+++ b/emacs/snippets/html-mode/for
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: for
+# key: for
+# condition: pony-tpl-minor-mode
+# --
+{% for $1 in $2 %}
+ $0
+{% endfor %}
\ No newline at end of file
diff --git a/emacs/snippets/html-mode/generic-block b/emacs/snippets/html-mode/generic-block
new file mode 100644
index 0000000..82d40c7
--- /dev/null
+++ b/emacs/snippets/html-mode/generic-block
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: Template Block
+# key: %
+# condition: pony-tpl-minor-mode
+# --
+{% $1 %}
+ $0
+{% end$1 %}
\ No newline at end of file
diff --git a/emacs/snippets/org-mode/Makefile b/emacs/snippets/org-mode/Makefile
new file mode 100644
index 0000000..34d4cd9
--- /dev/null
+++ b/emacs/snippets/org-mode/Makefile
@@ -0,0 +1,4 @@
+DESTDIR:=$(DESTDIR)/org-mode
+objects=codeblock heading project snippet
+
+include ../../../dotfiles.mk
diff --git a/emacs/snippets/org-mode/codeblock b/emacs/snippets/org-mode/codeblock
new file mode 100644
index 0000000..a200b08
--- /dev/null
+++ b/emacs/snippets/org-mode/codeblock
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: codeblock
+# key: code
+# --
+#+begin_src $1
+ $0
+#+end_src
\ No newline at end of file
diff --git a/emacs/snippets/org-mode/heading b/emacs/snippets/org-mode/heading
new file mode 100644
index 0000000..9d5451e
--- /dev/null
+++ b/emacs/snippets/org-mode/heading
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: Heading
+# key: *
+# --
+${1:*} ${2:TODO} $3
+${1:$(make-string (length text) ?\ )} :PROPERTIES:
+${1:$(make-string (length text) ?\ )} :CATEGORY: $4
+${1:$(make-string (length text) ?\ )} :END:
+${1:$(make-string (length text) ?\ )} $0
\ No newline at end of file
diff --git a/emacs/snippets/org-mode/project b/emacs/snippets/org-mode/project
new file mode 100644
index 0000000..269d655
--- /dev/null
+++ b/emacs/snippets/org-mode/project
@@ -0,0 +1,51 @@
+# -*- mode: snippet -*-
+# name: project
+# key: project
+# --
+#+TITLE: ${1:project_name}
+#+LINK: src ${2:http://code.ryuslash.org/cgit.cgi/$3$1/}
+#+LINK: tar_gz $2${4:snapshot/$1-master}.tar.gz
+#+LINK: zip $2$4.zip
+#+STARTUP: showall
+
+#+begin_html
+
+
+#+end_html
+
+#+INCLUDE: "dlmenu.inc"
+
+* About
+
+ ${5:A short description about $1}
+
+ | $0Status | $6 |
+ | Language | $7 |
+ | License | ${8:GPLv3} |
+
+* Why?
+
+ ${9:Why did you even think of writing $1?}
+
+* Features
+
+ ${10:$1 does...}
+
+* Dependencies
+
+ ${11:$1 needs to have...}
+
+* Download
+
+ ${12:To download $1...}
+
+* Install
+
+ ${13:To install $1...}
+
+* Usage
+
+ ${14:Using $1...}
\ No newline at end of file
diff --git a/emacs/snippets/org-mode/snippet b/emacs/snippets/org-mode/snippet
new file mode 100644
index 0000000..67f15d5
--- /dev/null
+++ b/emacs/snippets/org-mode/snippet
@@ -0,0 +1,14 @@
+# -*- mode: snippet -*-
+# name: snippet
+# key: snippet
+# --
+#+TITLE: ${1:snippet-name}
+#+OPTIONS: toc:nil
+
+* $1
+
+ ${2:A short description abount $1}
+
+ #+BEGIN_SRC $3 :tangle yes
+$0
+ #+END_SRC
\ No newline at end of file
diff --git a/emacs/snippets/python-mode/Makefile b/emacs/snippets/python-mode/Makefile
new file mode 100644
index 0000000..192657b
--- /dev/null
+++ b/emacs/snippets/python-mode/Makefile
@@ -0,0 +1,4 @@
+DESTDIR:=$(DESTDIR)/python-mode
+objects=defm_empty form form_valid import_from permission_guard url
+
+include ../../../dotfiles.mk
diff --git a/emacs/snippets/python-mode/defm_empty b/emacs/snippets/python-mode/defm_empty
new file mode 100644
index 0000000..baa976e
--- /dev/null
+++ b/emacs/snippets/python-mode/defm_empty
@@ -0,0 +1,7 @@
+# -*- coding: utf-8 -*-
+# name: Empty Defmethod
+# key: defm
+# --
+def ${1:name}(self, *args, **kwargs):
+ '''$2'''
+ return super(${3:`(progn (re-search-backward "^[ \t]*class \\(.+\\)(") (match-string 1)))`}, self).$1(*args, **kwargs)
\ No newline at end of file
diff --git a/emacs/snippets/python-mode/form b/emacs/snippets/python-mode/form
new file mode 100644
index 0000000..225d5e4
--- /dev/null
+++ b/emacs/snippets/python-mode/form
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: Model Form
+# key: form
+# --
+class ${1:Model}Form(forms.ModelForm):
+ '''Form for the $1 model.'''
+
+ class Meta:
+ model = $1
\ No newline at end of file
diff --git a/emacs/snippets/python-mode/form_valid b/emacs/snippets/python-mode/form_valid
new file mode 100644
index 0000000..c5a7e58
--- /dev/null
+++ b/emacs/snippets/python-mode/form_valid
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: Record form
+# key: defm
+# --
+@record_activity(model=${1:`(progn (re-search-backward "^[ \t]*model = \\([a-zA-Z_].*\\)$") (match-string 1))`})
+def form_valid(self, form):
+ '''Make sure any changes to the $1 model get logged.'''
+ return super(${2:`(progn (re-search-backward "^[ \t]*class \\(.+\\)(") (match-string 1)))`}, self).form_valid(form)
\ No newline at end of file
diff --git a/emacs/snippets/python-mode/import_from b/emacs/snippets/python-mode/import_from
new file mode 100644
index 0000000..5c23b8e
--- /dev/null
+++ b/emacs/snippets/python-mode/import_from
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# name: from ... import ...
+# contributor: Tom Willemsen
+# key: from
+# --
+from ${1:module} import ${2:class_or_module}
\ No newline at end of file
diff --git a/emacs/snippets/python-mode/permission_guard b/emacs/snippets/python-mode/permission_guard
new file mode 100644
index 0000000..ab53895
--- /dev/null
+++ b/emacs/snippets/python-mode/permission_guard
@@ -0,0 +1,9 @@
+# -*- mode: snippet -*-
+# name: Permission guard
+# key: defm
+# --
+@method_decorator(permission_required('$1',
+ raise_exception=True))
+def dispatch(self, *args, **kwargs):
+ '''Make sure the user has the $1 permission.'''
+ return super(${3:`(progn (re-search-backward "^[ \t]*class \\(.+\\)(") (match-string 1)))`}, self).dispatch(*args, **kwargs)
\ No newline at end of file
diff --git a/emacs/snippets/python-mode/url b/emacs/snippets/python-mode/url
new file mode 100644
index 0000000..00ade72
--- /dev/null
+++ b/emacs/snippets/python-mode/url
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: url
+# key: url
+# --
+url(r'^$1', $2, name='$3'),
\ No newline at end of file
--
cgit v1.3-2-g0d8e
From d07f2eb138231656b671ff8b0bd2e26d046d415f Mon Sep 17 00:00:00 2001
From: Tom Willemse
Date: Wed, 10 Apr 2013 22:05:48 +0200
Subject: More
---
.hgrc | 2 +-
emacs/gnus.el | 1 +
emacs/init.el | 2 +-
emacs/site-lisp/dzen.el | 4 ++--
emacs/site-lisp/eltuki.el | 4 ++--
emacs/site-lisp/ext.el | 4 ++--
emacs/site-lisp/metalexpress.el | 4 ++--
emacs/site-lisp/mu4e-init.el | 4 ++--
emacs/site-lisp/oni.el | 4 ++--
emacs/site-lisp/org-init.el | 4 ++--
emacs/site-lisp/quick-edit-mode.el | 4 ++--
emacs/snippets/python-mode/import_from | 4 ++--
12 files changed, 21 insertions(+), 20 deletions(-)
(limited to 'emacs/snippets')
diff --git a/.hgrc b/.hgrc
index 4fa66ab..adef43b 100644
--- a/.hgrc
+++ b/.hgrc
@@ -1,4 +1,4 @@
[ui]
-username = Tom Willemsen
+username = Tom Willemse
[extensions]
hgext.bookmarks =
diff --git a/emacs/gnus.el b/emacs/gnus.el
index aac7c6e..49b3931 100644
--- a/emacs/gnus.el
+++ b/emacs/gnus.el
@@ -45,6 +45,7 @@
(address "tom.willemsen@archlinux.us")
(eval (setq message-sendmail-extra-arguments '("-a" "arch"))))
("aethon:"
+ (name "Tom Willemsen")
(address "thomas@aethon.nl")
(signature-file "~/documents/work/aethon/signature.txt")
(eval (setq message-sendmail-extra-arguments '("-a" "aethon")
diff --git a/emacs/init.el b/emacs/init.el
index 60ba521..176d904 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -415,7 +415,7 @@ Also change directories to current working directory."
(setq type-break-keystroke-threshold '(nil . nil))
(setq uniquify-buffer-name-style 'post-forward)
(setq use-dialog-box nil)
-(setq user-full-name "Tom Willemsen")
+(setq user-full-name "Tom Willemse")
(setq user-mail-address "tom@ryuslash.org")
(setq w3m-fill-column 72)
(setq window-combination-resize t)
diff --git a/emacs/site-lisp/dzen.el b/emacs/site-lisp/dzen.el
index 6cc3eae..da83099 100644
--- a/emacs/site-lisp/dzen.el
+++ b/emacs/site-lisp/dzen.el
@@ -1,8 +1,8 @@
;;; dzen.el --- Control DZEN2 from emacs
-;; Copyright (C) 2012 Tom Willemsen
+;; Copyright (C) 2012 Tom Willemse
-;; Author: Tom Willemsen
+;; Author: Tom Willemse
;; Keywords: convenience
;; This program is free software; you can redistribute it and/or modify
diff --git a/emacs/site-lisp/eltuki.el b/emacs/site-lisp/eltuki.el
index 224e9ab..d457a0f 100644
--- a/emacs/site-lisp/eltuki.el
+++ b/emacs/site-lisp/eltuki.el
@@ -1,8 +1,8 @@
;;; eltuki.el --- Tekuti functions
-;; Copyright (C) 2012 Tom Willemsen
+;; Copyright (C) 2012 Tom Willemse
-;; Author: Tom Willemsen
+;; Author: Tom Willemse
;; Keywords: convenience
;; This program is free software; you can redistribute it and/or modify
diff --git a/emacs/site-lisp/ext.el b/emacs/site-lisp/ext.el
index 2ed65d4..eb84a3f 100644
--- a/emacs/site-lisp/ext.el
+++ b/emacs/site-lisp/ext.el
@@ -1,8 +1,8 @@
;;; ext.el --- More emacs functions
-;; Copyright (C) 2012 Tom Willemsen
+;; Copyright (C) 2012 Tom Willemse
-;; Author: Tom Willemsen
+;; Author: Tom Willemse
;; Keywords: local
;; This program is free software; you can redistribute it and/or modify
diff --git a/emacs/site-lisp/metalexpress.el b/emacs/site-lisp/metalexpress.el
index 0c4539a..d4a92d7 100644
--- a/emacs/site-lisp/metalexpress.el
+++ b/emacs/site-lisp/metalexpress.el
@@ -1,8 +1,8 @@
;;; metalexpress.el --- Listen to Metal Express Radio
-;; Copyright (C) 2012 Tom Willemsen
+;; Copyright (C) 2012 Tom Willemse
-;; Author: Tom Willemsen
+;; Author: Tom Willemse
;; Keywords: multimedia
;; This program is free software; you can redistribute it and/or modify
diff --git a/emacs/site-lisp/mu4e-init.el b/emacs/site-lisp/mu4e-init.el
index 258a6ef..e11baf5 100644
--- a/emacs/site-lisp/mu4e-init.el
+++ b/emacs/site-lisp/mu4e-init.el
@@ -1,8 +1,8 @@
;;; mu4e-init.el --- mu4e initialization
-;; Copyright (C) 2012 Tom Willemsen
+;; Copyright (C) 2012 Tom Willemse
-;; Author: Tom Willemsen
+;; Author: Tom Willemse
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
diff --git a/emacs/site-lisp/oni.el b/emacs/site-lisp/oni.el
index 027463b..2076093 100644
--- a/emacs/site-lisp/oni.el
+++ b/emacs/site-lisp/oni.el
@@ -1,8 +1,8 @@
;;; oni.el --- Functions for emacs
-;; Copyright (C) 2012 Tom Willemsen
+;; Copyright (C) 2012 Tom Willemse
-;; Author: Tom Willemsen
+;; Author: Tom Willemse
;; Keywords: local
;; This program is free software; you can redistribute it and/or modify
diff --git a/emacs/site-lisp/org-init.el b/emacs/site-lisp/org-init.el
index 789b1bb..3c698d2 100644
--- a/emacs/site-lisp/org-init.el
+++ b/emacs/site-lisp/org-init.el
@@ -1,8 +1,8 @@
;;; org-init.el --- Org initialization
-;; Copyright (C) 2012 Tom Willemsen
+;; Copyright (C) 2012 Tom Willemse
-;; Author: Tom Willemsen
+;; Author: Tom Willemse
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
diff --git a/emacs/site-lisp/quick-edit-mode.el b/emacs/site-lisp/quick-edit-mode.el
index 821c738..898d7c2 100644
--- a/emacs/site-lisp/quick-edit-mode.el
+++ b/emacs/site-lisp/quick-edit-mode.el
@@ -1,8 +1,8 @@
;;; quick-edit-mode.el --- Quickly edit stuff
-;; Copyright (C) 2012 Tom Willemsen
+;; Copyright (C) 2012 Tom Willemse
-;; Author: Tom Willemsen
+;; Author: Tom Willemse
;; Keywords: convenience
;; This program is free software; you can redistribute it and/or modify
diff --git a/emacs/snippets/python-mode/import_from b/emacs/snippets/python-mode/import_from
index 5c23b8e..d9cc4e2 100644
--- a/emacs/snippets/python-mode/import_from
+++ b/emacs/snippets/python-mode/import_from
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# name: from ... import ...
-# contributor: Tom Willemsen
+# contributor: Tom Willemse
# key: from
# --
-from ${1:module} import ${2:class_or_module}
\ No newline at end of file
+from ${1:module} import ${2:class_or_module}
--
cgit v1.3-2-g0d8e