Emacs config has moved on...
This commit is contained in:
parent
e718731f66
commit
cca8771d85
31 changed files with 0 additions and 2162 deletions
16
emacs/.gitignore
vendored
16
emacs/.gitignore
vendored
|
@ -1,16 +0,0 @@
|
||||||
tramp
|
|
||||||
elpa
|
|
||||||
bookmarks
|
|
||||||
abbrev_defs
|
|
||||||
custom.el
|
|
||||||
*.elc
|
|
||||||
ac-comphist.dat
|
|
||||||
auto-save-list/
|
|
||||||
url/
|
|
||||||
packages/
|
|
||||||
newsticker/
|
|
||||||
templates/
|
|
||||||
rinit.*
|
|
||||||
!rinit.org
|
|
||||||
history
|
|
||||||
*.html
|
|
|
@ -1,22 +0,0 @@
|
||||||
SUBDIR=.emacs.d
|
|
||||||
MODULES=eshell site-lisp snippets
|
|
||||||
EXCLUDE=auto-save-list/ elpa/ .org-id-locations abbrev_defs \
|
|
||||||
ac-comphist.dat bookmarks custom.el* emms-streams flymake.log \
|
|
||||||
geiser-history.guile history loaddefs.el smex-items srecode-map.el \
|
|
||||||
tramp elnode/ emms/ image-dired/ jabber-hist/ jabber/ newsticker/ \
|
|
||||||
packages/ semanticdb/ templates/ themes/ url/ var/ vendor-lisp/ \
|
|
||||||
init.html init.org project.el* _publish/
|
|
||||||
|
|
||||||
EMACS=emacs
|
|
||||||
|
|
||||||
include ../dotfiles2.mk
|
|
||||||
|
|
||||||
install: init.elc
|
|
||||||
|
|
||||||
# init.el: init.org
|
|
||||||
# $(EMACS) -Q -batch \
|
|
||||||
# -eval "(progn (require 'org) (require 'ob-tangle) \
|
|
||||||
# (org-babel-tangle-file \"$^\"))"
|
|
||||||
|
|
||||||
init.elc: init.el
|
|
||||||
$(EMACS) -Q -batch -eval "(byte-compile-file \"init.el\")"
|
|
|
@ -1,4 +0,0 @@
|
||||||
SUBDIR=eshell
|
|
||||||
EXCLUDE=login lastdir history
|
|
||||||
|
|
||||||
include ../../dotfiles2.mk
|
|
|
@ -1,9 +0,0 @@
|
||||||
alias hgit hgit --no-pager $*
|
|
||||||
alias newsbeuter ansi-term newsbeuter newsbeuter
|
|
||||||
alias d dired $1
|
|
||||||
alias o find-file $1
|
|
||||||
alias listen eshell-exec-visual mplayer http://usa7-vn.mixstream.net/listen/8248.pls
|
|
||||||
alias ncmpcpp ansi-term ncmpcpp ncmpcpp
|
|
||||||
alias sudo *sudo $*
|
|
||||||
alias rm rm -v $*
|
|
||||||
alias git git --no-pager $*
|
|
|
@ -1,58 +0,0 @@
|
||||||
(setq gnus-select-method '(nntp "news.gmane.org"))
|
|
||||||
(setq gnus-secondary-select-methods
|
|
||||||
'((nnmaildir "gmail"
|
|
||||||
(directory "~/documents/mail/gmail/"))
|
|
||||||
(nnmaildir "ninthfloor"
|
|
||||||
(directory "~/documents/mail/ninthfloor/"))
|
|
||||||
(nnmaildir "aethon"
|
|
||||||
(directory "~/documents/mail/aethon/"))
|
|
||||||
(nnmaildir "ryuslash"
|
|
||||||
(directory "~/documents/mail/ryuslash.org/"))
|
|
||||||
(nntp "news.gwene.org")))
|
|
||||||
(setq gnus-auto-subscribed-groups nil)
|
|
||||||
(setq gnus-extra-headers '(To))
|
|
||||||
(setq gnus-save-newsrc-file nil)
|
|
||||||
(setq gnus-read-newsrc-file nil)
|
|
||||||
(setq gnus-novice-user t)
|
|
||||||
(setq gnus-article-truncate-lines nil)
|
|
||||||
;; (setq gnus-parameters
|
|
||||||
;; '(("gmail"
|
|
||||||
;; (display . all))
|
|
||||||
;; ("aethon"
|
|
||||||
;; (display . all)
|
|
||||||
;; ("arch"
|
|
||||||
;; (display . all)))))
|
|
||||||
(setq gnus-permanently-visible-groups
|
|
||||||
(eval-when-compile
|
|
||||||
(regexp-opt '("gmail:inbox"
|
|
||||||
"aethon:inbox"
|
|
||||||
"ninthfloor:inbox"
|
|
||||||
"ryuslash:inbox"))))
|
|
||||||
(setq nntp-marks-is-evil t)
|
|
||||||
(setq gnus-check-new-newsgroups nil)
|
|
||||||
(setq gnus-posting-styles
|
|
||||||
'((".*"
|
|
||||||
(address "tom@ryuslash.org")
|
|
||||||
(eval (setq message-sendmail-extra-arguments '("-a" "ryuslash")
|
|
||||||
flyspell-default-dictionary "en")))
|
|
||||||
("gmail:"
|
|
||||||
(address "ryuslash@gmail.com")
|
|
||||||
(eval (setq message-sendmail-extra-arguments '("-a" "gmail"))))
|
|
||||||
("ninthfloor:"
|
|
||||||
(address "ryuslash@ninthfloor.org")
|
|
||||||
(eval (setq message-sendmail-extra-arguments '("-a" "ninthfloor"))))
|
|
||||||
("arch:"
|
|
||||||
(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")
|
|
||||||
flyspell-default-dictionary "nl")))))
|
|
||||||
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
|
|
||||||
;-----[ BBDB ]--------------------------------------------------------
|
|
||||||
;; (require 'bbdb)
|
|
||||||
;; (bbdb-initialize 'gnus 'message)
|
|
||||||
;; (bbdb-insinuate-gnus)
|
|
||||||
;; (setq bbdb-north-american-phone-numbers-p nil)
|
|
19
emacs/gtkrc
19
emacs/gtkrc
|
@ -1,19 +0,0 @@
|
||||||
gtk-font-name = "Envy Code R 12"
|
|
||||||
|
|
||||||
style "yoshi"
|
|
||||||
{
|
|
||||||
bg[NORMAL] = "#111113"
|
|
||||||
bg[SELECTED] = "#111113"
|
|
||||||
bg[INSENSITIVE] = "#111113"
|
|
||||||
bg[ACTIVE] = "#111113"
|
|
||||||
bg[PRELIGHT] = "#4a5b73"
|
|
||||||
|
|
||||||
fg[NORMAL] = "#eeeeec"
|
|
||||||
fg[SELECTED] = "#eeeeec"
|
|
||||||
fg[INSENSITIVE] = "#a5a5a4"
|
|
||||||
fg[ACTIVE] = "#eeeeec"
|
|
||||||
fg[PRELIGHT] = "#eeeeec"
|
|
||||||
}
|
|
||||||
|
|
||||||
widget "Emacs.*" style "yoshi"
|
|
||||||
widget_class "*Menu*" style "yoshi"
|
|
1139
emacs/init.el
1139
emacs/init.el
File diff suppressed because it is too large
Load diff
|
@ -1,8 +0,0 @@
|
||||||
SUBDIR=site-lisp
|
|
||||||
|
|
||||||
include ../../dotfiles2.mk
|
|
||||||
|
|
||||||
install: wm-init.elc
|
|
||||||
|
|
||||||
wm-init.elc: wm-init.el
|
|
||||||
emacs -Q -batch -eval "(byte-compile-file \"wm-init.el\")"
|
|
|
@ -1,86 +0,0 @@
|
||||||
;;; dzen.el --- Control DZEN2 from emacs
|
|
||||||
|
|
||||||
;; Copyright (C) 2012 Tom Willemse
|
|
||||||
|
|
||||||
;; Author: Tom Willemse <slash@drd>
|
|
||||||
;; Keywords: convenience
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation, either version 3 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(require 'newst-backend)
|
|
||||||
(require 'sawfish)
|
|
||||||
|
|
||||||
(defvar dzen-process nil
|
|
||||||
"Dzen2's process.")
|
|
||||||
|
|
||||||
(defvar dzen-timer nil
|
|
||||||
"Timer used to update the dzen line.")
|
|
||||||
|
|
||||||
(defun get-mail-count (account)
|
|
||||||
(length (directory-files (concat "/home/slash/documents/mail/"
|
|
||||||
account "/inbox/new") nil "^[^.]")))
|
|
||||||
|
|
||||||
(defun dzen-update ()
|
|
||||||
(let ((strl "")
|
|
||||||
(strc (if (boundp 'metal-express-radio-currently-playing)
|
|
||||||
metal-express-radio-currently-playing
|
|
||||||
""))
|
|
||||||
(strr (format
|
|
||||||
"jabber: %s ryu: %d gm: %d aet: %d 9n: %d rss: %d\n"
|
|
||||||
(oni:current-jabber-status)
|
|
||||||
(get-mail-count "ryuslash.org")
|
|
||||||
(get-mail-count "gmail")
|
|
||||||
(get-mail-count "aethon")
|
|
||||||
(get-mail-count "ninthfloor")
|
|
||||||
(newsticker--stat-num-items-total 'new))))
|
|
||||||
(process-send-string
|
|
||||||
"dzen2" (format "%s^p(_CENTER)^p(-%d)%s^p(_RIGHT)^p(-%d)%s"
|
|
||||||
strl
|
|
||||||
(* (floor (/ (length strc) 2)) 8) strc
|
|
||||||
(+ 8 (* 8 (length strr))) strr))))
|
|
||||||
|
|
||||||
(defun dzen-start ()
|
|
||||||
(interactive)
|
|
||||||
(if (or (null dzen-process) (not (process-live-p dzen-process)))
|
|
||||||
(progn
|
|
||||||
(setq dzen-process
|
|
||||||
(start-process "dzen2" "*dzen2*" "dzen2"
|
|
||||||
"-w" "1920"
|
|
||||||
"-fn" "Monaco-10"
|
|
||||||
"-bg" "#222224"
|
|
||||||
"-fg" "#eeeeec"
|
|
||||||
"-y" "1060"))
|
|
||||||
(dzen-update)
|
|
||||||
(setq dzen-timer (run-with-timer 1 1 #'dzen-update)))
|
|
||||||
(message "Dzen2 already running")))
|
|
||||||
|
|
||||||
(defun dzen-stop ()
|
|
||||||
(interactive)
|
|
||||||
(if (and dzen-process (process-live-p dzen-process))
|
|
||||||
(progn
|
|
||||||
(when dzen-timer
|
|
||||||
(cancel-timer dzen-timer))
|
|
||||||
(kill-process "dzen2"))
|
|
||||||
(message "Dzen2 is not running"))
|
|
||||||
(setq dzen-process nil
|
|
||||||
dzen-timer nil))
|
|
||||||
|
|
||||||
(provide 'dzen)
|
|
||||||
;;; dzen.el ends here
|
|
|
@ -1,266 +0,0 @@
|
||||||
;;; eltuki.el --- Tekuti functions
|
|
||||||
|
|
||||||
;; Copyright (C) 2012 Tom Willemse
|
|
||||||
|
|
||||||
;; Author: Tom Willemse <slash@drd>
|
|
||||||
;; Keywords: convenience
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation, either version 3 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;; Tekuti functions.
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(require 'org)
|
|
||||||
|
|
||||||
(defgroup eltuki
|
|
||||||
nil
|
|
||||||
"tekuti functions in Emacs."
|
|
||||||
:group 'external)
|
|
||||||
|
|
||||||
(defcustom eltuki-blog-dir "~/blog"
|
|
||||||
"Plain blog post directory, not the git repository."
|
|
||||||
:group 'eltuki
|
|
||||||
:type 'string)
|
|
||||||
|
|
||||||
(defcustom eltuki-default-status "publish"
|
|
||||||
"Default status to use when status is unknown."
|
|
||||||
:group 'eltuki
|
|
||||||
:type 'string)
|
|
||||||
|
|
||||||
(defcustom eltuki-default-comment-status "open"
|
|
||||||
"Default status for comments."
|
|
||||||
:group 'eltuki
|
|
||||||
:type 'string)
|
|
||||||
|
|
||||||
(define-skeleton eltuki-post
|
|
||||||
"Create a post template for eltuki."
|
|
||||||
""
|
|
||||||
"#+TITLE: " (skeleton-read "Title: ") "\n"
|
|
||||||
"#+TIMESTAMP: \n"
|
|
||||||
"#+TAGS: " (skeleton-read "Tags (comma separated): ") "\n"
|
|
||||||
"\n"
|
|
||||||
_)
|
|
||||||
|
|
||||||
(defun eltuki-new-post ()
|
|
||||||
(interactive)
|
|
||||||
(switch-to-buffer (get-buffer-create "*eltuki*"))
|
|
||||||
(org-mode)
|
|
||||||
(eltuki-post))
|
|
||||||
|
|
||||||
(defun eltuki-get-title ()
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(if (re-search-forward "^#\\+TITLE: \\(.*\\)$" nil t)
|
|
||||||
(buffer-substring-no-properties
|
|
||||||
(match-beginning 1) (match-end 1))
|
|
||||||
(error "Post has no title."))))
|
|
||||||
|
|
||||||
(defun eltuki-set-title (title)
|
|
||||||
(interactive "MTitle: ")
|
|
||||||
(setq title (concat " " title))
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(if (re-search-forward "^#\\+TITLE:\\(.*\\)$" nil t)
|
|
||||||
(replace-match title t t nil 1)
|
|
||||||
(insert "#+TITLE:" title "\n")
|
|
||||||
(unless (= (char-after) ?\n)
|
|
||||||
(insert-char ?\n)))))
|
|
||||||
|
|
||||||
(defun eltuki-get-timestamp ()
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(if (re-search-forward "^#\\+TIMESTAMP: \\([[:digit:]]+\\)$" nil t)
|
|
||||||
(match-string 1)
|
|
||||||
(format-time-string "%s"))))
|
|
||||||
|
|
||||||
(defun eltuki-set-timestamp ()
|
|
||||||
(interactive)
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(let ((newtime (format-time-string " %s")))
|
|
||||||
(if (re-search-forward "^#\\+TIMESTAMP:\\(.*\\)$" nil t)
|
|
||||||
(replace-match newtime nil t nil 1)
|
|
||||||
(when (search-forward "\n\n" nil t)
|
|
||||||
(backward-char))
|
|
||||||
(insert "#+TIMESTAMP:" newtime "\n")))))
|
|
||||||
|
|
||||||
(defun eltuki-get-tags ()
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(when (re-search-forward "^#\\+TAGS: \\(.*\\)$" nil t)
|
|
||||||
(buffer-substring-no-properties
|
|
||||||
(match-beginning 1) (match-end 1)))))
|
|
||||||
|
|
||||||
(defun eltuki-set-tags (tags)
|
|
||||||
(interactive "MTags: ")
|
|
||||||
(setq tags (concat " " tags))
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(if (re-search-forward "^#\\+TAGS:\\(.*\\)$" nil t)
|
|
||||||
(replace-match tags t t nil 1)
|
|
||||||
(when (search-forward "\n\n" nil t)
|
|
||||||
(backward-char))
|
|
||||||
(insert "#+TAGS:" tags "\n"))))
|
|
||||||
|
|
||||||
(defun eltuki-get-status ()
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(if (re-search-forward "^#\\+STATUS: \\(draft\\|publish\\)$" nil t)
|
|
||||||
(buffer-substring-no-properties
|
|
||||||
(match-beginning 1) (match-end 1))
|
|
||||||
eltuki-default-status)))
|
|
||||||
|
|
||||||
(defun eltuki-toggle-status ()
|
|
||||||
(interactive)
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(let ((newstatus (if (string= (eltuki-get-status) "draft")
|
|
||||||
" publish"
|
|
||||||
" draft")))
|
|
||||||
(if (re-search-forward "^#\\+STATUS:\\(.*\\)$" nil t)
|
|
||||||
(replace-match newstatus t t nil 1)
|
|
||||||
(when (search-forward "\n\n" nil t)
|
|
||||||
(backward-char))
|
|
||||||
(insert "#+STATUS:" newstatus "\n")))))
|
|
||||||
|
|
||||||
(defun eltuki-get-comment-status ()
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(if (re-search-forward
|
|
||||||
"^#\\+COMMENTSTATUS: \\(open\\|closed\\)$" nil t)
|
|
||||||
(buffer-substring-no-properties
|
|
||||||
(match-beginning 1) (match-end 1))
|
|
||||||
eltuki-default-comment-status)))
|
|
||||||
|
|
||||||
(defun eltuki-toggle-comment-status ()
|
|
||||||
(interactive)
|
|
||||||
(save-excursion
|
|
||||||
(goto-char (point-min))
|
|
||||||
(let ((newstatus (if (string= (eltuki-get-comment-status) "closed")
|
|
||||||
" open"
|
|
||||||
" closed")))
|
|
||||||
(if (re-search-forward "^#\\+COMMENTSTATUS:\\(.*\\)$" nil t)
|
|
||||||
(replace-match newstatus t t nil 1)
|
|
||||||
(when (search-forward "\n\n" nil t)
|
|
||||||
(backward-char))
|
|
||||||
(insert "#+COMMENTSTATUS:" newstatus "\n")))))
|
|
||||||
|
|
||||||
(defun eltuki-slugify-string (str)
|
|
||||||
(while (string-match "[^a-zA-Z0-9 ]+" str)
|
|
||||||
(setq str (replace-match "" nil t str)))
|
|
||||||
(while (string-match " +" str)
|
|
||||||
(setq str (replace-match "-" nil t str)))
|
|
||||||
(downcase str))
|
|
||||||
|
|
||||||
(defun eltuki-get-directory ()
|
|
||||||
(concat
|
|
||||||
eltuki-blog-dir "/"
|
|
||||||
(format-time-string "%Y%%2f%m%%2f%d%%2f")
|
|
||||||
(eltuki-slugify-string (eltuki-get-title))))
|
|
||||||
|
|
||||||
(defun eltuki-write-content (dir)
|
|
||||||
(let ((org-export-with-toc nil)
|
|
||||||
(org-export-with-section-numbers nil)
|
|
||||||
(filename (concat dir "/content"))
|
|
||||||
(org-export-show-temporary-export-buffer nil))
|
|
||||||
(org-html-export-as-html nil nil nil t)
|
|
||||||
(with-current-buffer "*Org HTML Export*"
|
|
||||||
(write-region (point-min) (point-max) filename)
|
|
||||||
(kill-buffer))
|
|
||||||
filename))
|
|
||||||
|
|
||||||
(defun eltuki-write-metadata (dir)
|
|
||||||
(let ((timestamp (eltuki-get-timestamp))
|
|
||||||
(tags (eltuki-get-tags))
|
|
||||||
(status (eltuki-get-status))
|
|
||||||
(title (eltuki-get-title))
|
|
||||||
(name (eltuki-slugify-string (eltuki-get-title)))
|
|
||||||
(commentstatus (eltuki-get-comment-status))
|
|
||||||
(filename (concat dir "/metadata")))
|
|
||||||
(with-temp-buffer
|
|
||||||
(insert "timestamp: " timestamp "\n"
|
|
||||||
"tags: " tags "\n"
|
|
||||||
"status: " status "\n"
|
|
||||||
"title: " title "\n"
|
|
||||||
"name: " name "\n"
|
|
||||||
"comment_status: " commentstatus)
|
|
||||||
(write-region (point-min) (point-max) filename))
|
|
||||||
filename))
|
|
||||||
|
|
||||||
(defun eltuki-save-org (buffer dir)
|
|
||||||
(let ((filename (concat dir "/post.org")))
|
|
||||||
(with-current-buffer buffer
|
|
||||||
(write-file filename))
|
|
||||||
filename))
|
|
||||||
|
|
||||||
(defun eltuki-git-add (file)
|
|
||||||
(shell-command (concat "cd " eltuki-blog-dir "; git add '" (expand-file-name file) "'")))
|
|
||||||
|
|
||||||
(defun eltuki-commit ()
|
|
||||||
(shell-command (concat "cd " eltuki-blog-dir "; git commit -m \"new post: \\\"" (eltuki-get-title)
|
|
||||||
"\\\"\"")))
|
|
||||||
|
|
||||||
(defun eltuki-finish ()
|
|
||||||
(interactive)
|
|
||||||
(let ((buffer (or (get-buffer "*eltuki*")
|
|
||||||
(current-buffer)))
|
|
||||||
(dest (eltuki-get-directory)))
|
|
||||||
(unless (file-exists-p dest)
|
|
||||||
(mkdir dest))
|
|
||||||
|
|
||||||
(mapc #'eltuki-git-add
|
|
||||||
(list (eltuki-write-content dest)
|
|
||||||
(eltuki-write-metadata dest)
|
|
||||||
(eltuki-save-org buffer dest)))
|
|
||||||
|
|
||||||
(eltuki-commit)
|
|
||||||
(kill-buffer buffer)))
|
|
||||||
|
|
||||||
(defun eltuki-process-sentinel (proc status)
|
|
||||||
"Print PROC's STATUS."
|
|
||||||
(message "git %s" (substring status 0 -1)))
|
|
||||||
|
|
||||||
(defun eltuki--passwd-prompt (string)
|
|
||||||
"Decide on what to prompt based on STRING."
|
|
||||||
(cond
|
|
||||||
((or
|
|
||||||
(string-match "^Enter passphrase for key '\\\(.*\\\)': $" string)
|
|
||||||
(string-match "^\\\(.*\\\)'s password:" string))
|
|
||||||
(format "Password for '%s': " (match-string 1 string)))
|
|
||||||
((string-match "^[pP]assword:" string)
|
|
||||||
"Password:")))
|
|
||||||
|
|
||||||
(defun eltuki-process-filter (proc string)
|
|
||||||
"Check if PROC is asking for a password in STRING."
|
|
||||||
(with-current-buffer (process-buffer proc)
|
|
||||||
(let ((inhibit-read-only t)
|
|
||||||
(ask (eltuki--passwd-prompt string)))
|
|
||||||
(if ask
|
|
||||||
(process-send-string proc (concat (read-passwd ask nil) "\n"))
|
|
||||||
(insert string)))))
|
|
||||||
|
|
||||||
(defun eltuki-publish ()
|
|
||||||
"Publish posts."
|
|
||||||
(interactive)
|
|
||||||
(let* ((default-directory (concat eltuki-blog-dir "/"))
|
|
||||||
(proc (start-process "eltuki-publish" "*eltuki-publish*"
|
|
||||||
"git" "push")))
|
|
||||||
(set-process-sentinel proc 'eltuki-process-sentinel)
|
|
||||||
(set-process-filter proc 'eltuki-process-filter)))
|
|
||||||
|
|
||||||
(provide 'eltuki)
|
|
||||||
;;; eltuki.el ends here
|
|
|
@ -1,80 +0,0 @@
|
||||||
;;; metalexpress.el --- Listen to Metal Express Radio
|
|
||||||
|
|
||||||
;; Copyright (C) 2012 Tom Willemse
|
|
||||||
|
|
||||||
;; Author: Tom Willemse <thomas@aethon.nl>
|
|
||||||
;; Keywords: multimedia
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation, either version 3 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;; Functions for easily listening to Metal Express Radio.
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(defgroup metal-express-radio nil
|
|
||||||
"Group for the Metal Express Radio listening functions."
|
|
||||||
:group 'multimedia)
|
|
||||||
|
|
||||||
(defcustom metal-express-radio-playlist-url
|
|
||||||
"http://usa7-vn.mixstream.net/listen/8248.m3u"
|
|
||||||
"The URL of the Metal Express Radio stream."
|
|
||||||
:group 'metal-express-radio
|
|
||||||
:type 'string)
|
|
||||||
|
|
||||||
(defcustom metal-express-radio-song-changed-hook nil
|
|
||||||
"Hook run when the currently playing song changes."
|
|
||||||
:type 'hook
|
|
||||||
:group 'metal-express-radio)
|
|
||||||
|
|
||||||
(defvar metal-express-radio-currently-playing nil
|
|
||||||
"The currently playing song.")
|
|
||||||
|
|
||||||
(defun mer-proc-filter (proc string)
|
|
||||||
(when (string-match "^ICY Info: StreamTitle='\\(.*\\)';StreamUrl='';"
|
|
||||||
string)
|
|
||||||
(setq metal-express-radio-currently-playing (match-string 1 string))
|
|
||||||
(run-hooks 'metal-express-radio-song-changed-hook)))
|
|
||||||
|
|
||||||
(defun metal-express-radio-echo-currently-playing ()
|
|
||||||
(interactive)
|
|
||||||
(message metal-express-radio-currently-playing))
|
|
||||||
|
|
||||||
(defun metal-express-radio-notify ()
|
|
||||||
(interactive)
|
|
||||||
(notifications-notify :title "Now playing:"
|
|
||||||
:body metal-express-radio-currently-playing))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun metal-express-radio-start ()
|
|
||||||
"Start listening to Metal Express Radio."
|
|
||||||
(interactive)
|
|
||||||
(let ((proc (start-process "metalexpress" "*Metal Express Radio*"
|
|
||||||
"mplayer" metal-express-radio-playlist-url)))
|
|
||||||
(set-process-filter proc #'mer-proc-filter)))
|
|
||||||
|
|
||||||
(defun metal-express-radio-stop ()
|
|
||||||
"Stop listening to Metal Express Radio."
|
|
||||||
(interactive)
|
|
||||||
(kill-process (get-buffer-process "*Metal Express Radio*"))
|
|
||||||
(setq metal-express-radio-currently-playing nil))
|
|
||||||
|
|
||||||
(add-hook 'metal-express-radio-song-changed-hook
|
|
||||||
'metal-express-radio-echo-currently-playing)
|
|
||||||
(add-hook 'metal-express-radio-song-changed-hook
|
|
||||||
'metal-express-radio-notify)
|
|
||||||
|
|
||||||
(provide 'metalexpress)
|
|
||||||
;;; metalexpress.el ends here
|
|
|
@ -1,54 +0,0 @@
|
||||||
;;; mu4e-init.el --- mu4e initialization
|
|
||||||
|
|
||||||
;; Copyright (C) 2012 Tom Willemse
|
|
||||||
|
|
||||||
;; Author: Tom Willemse <slash@drd>
|
|
||||||
;; Keywords:
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation, either version 3 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(require 'oni)
|
|
||||||
|
|
||||||
(oni:define-mailbox "aethon"
|
|
||||||
(oni:email thomas at aethon dot nl)
|
|
||||||
(expand-file-name "~/documents/work/aethon/signature.txt"))
|
|
||||||
(oni:define-mailbox "gmail" (oni:email ryuslash at gmail dot com))
|
|
||||||
(oni:define-mailbox "ninthfloor"
|
|
||||||
(oni:email ryuslash at ninthfloor dot org))
|
|
||||||
(oni:define-mailbox "ryuslash" (oni:email tom at ryuslash dot org)
|
|
||||||
nil "ryuslash.org")
|
|
||||||
|
|
||||||
(setq mu4e-headers-date-format "%d-%m %H:%M")
|
|
||||||
(setq mu4e-headers-fields '((:date . 11)
|
|
||||||
(:flags . 6)
|
|
||||||
(:to . 22)
|
|
||||||
(:from . 22)
|
|
||||||
(:subject)))
|
|
||||||
(setq mu4e-headers-show-threads nil)
|
|
||||||
(setq mu4e-headers-sort-revert nil)
|
|
||||||
(setq mu4e-html2text-command "w3m -dump -T text/HTML -cols 72")
|
|
||||||
(setq mu4e-my-email-addresses (list
|
|
||||||
(oni:email tom at ryuslash dot org)
|
|
||||||
(oni:email ryuslash at gmail dot com)
|
|
||||||
(oni:email ryuslash at ninthfloor dot org)
|
|
||||||
(oni:email thomas at aethon dot nl)))
|
|
||||||
|
|
||||||
(provide 'mu4e-init)
|
|
||||||
;;; mu4e-init.el ends here
|
|
|
@ -1,170 +0,0 @@
|
||||||
;;; org-init.el --- Org initialization
|
|
||||||
|
|
||||||
;; Copyright (C) 2012 Tom Willemse
|
|
||||||
|
|
||||||
;; Author: Tom Willemse <slash@drd>
|
|
||||||
;; Keywords:
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation, either version 3 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;;
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(require 'appt)
|
|
||||||
(require 'org-contacts)
|
|
||||||
(require 'org-habit)
|
|
||||||
(require 'org-protocol)
|
|
||||||
|
|
||||||
(autoload 'org-clocking-p "org-clock")
|
|
||||||
|
|
||||||
(eval-after-load "org-crypt"
|
|
||||||
'(org-crypt-use-before-save-magic))
|
|
||||||
|
|
||||||
(defun oni:note-template ()
|
|
||||||
(concat
|
|
||||||
"* %<%c>\n"
|
|
||||||
" :DIRECTORY: =" default-directory "=\n"
|
|
||||||
(when (buffer-file-name) " :FILE: [[file:%F][%F]]\n")
|
|
||||||
(when (org-clocking-p) " :TASK: %K\n")
|
|
||||||
"\n %?"))
|
|
||||||
|
|
||||||
(defun oni:org-maybe-outline-path ()
|
|
||||||
(let ((outline-path (org-format-outline-path (org-get-outline-path))))
|
|
||||||
(unless (string= outline-path "")
|
|
||||||
(setq outline-path (concat "[ " outline-path " ] ")))
|
|
||||||
outline-path))
|
|
||||||
|
|
||||||
(defun oni:set-org-agenda-files ()
|
|
||||||
"Set `org-agenda-files` according to the current time."
|
|
||||||
(interactive)
|
|
||||||
(let* ((current-time (decode-time))
|
|
||||||
(current-hour (nth 2 current-time))
|
|
||||||
(current-dow (nth 6 current-time)))
|
|
||||||
(if (or (= current-dow 6) (= current-dow 0) ; Saturday or Sunday
|
|
||||||
(< current-hour 9) (>= current-hour 17))
|
|
||||||
(setq org-agenda-files
|
|
||||||
(append oni:personal-agenda-files oni:common-agenda-files))
|
|
||||||
(setq org-agenda-files
|
|
||||||
(append oni:work-agenda-files oni:common-agenda-files)))))
|
|
||||||
|
|
||||||
(defvar oni:personal-agenda-files
|
|
||||||
(list (expand-file-name "~/documents/org/tasks"))
|
|
||||||
"My personal agenda, should only show up at times I don't have
|
|
||||||
to work.")
|
|
||||||
|
|
||||||
(defvar oni:work-agenda-files
|
|
||||||
(list (expand-file-name "~/documents/org/work"))
|
|
||||||
"My work agenda, should only show up at times I work.")
|
|
||||||
|
|
||||||
(defvar oni:common-agenda-files
|
|
||||||
(list (expand-file-name "~/documents/org/dailies")
|
|
||||||
(expand-file-name "~/documents/org/misc/contacts.org")
|
|
||||||
(expand-file-name "~/documents/org/misc/bookmarks.org"))
|
|
||||||
"Agenda files that are work-agnostic, should always show up.")
|
|
||||||
|
|
||||||
(setq org-agenda-cmp-user-defined (lambda (a b) 1))
|
|
||||||
(setq org-agenda-custom-commands
|
|
||||||
'(("P" . "Personal only")
|
|
||||||
("Pa" "Personal agenda" agenda ""
|
|
||||||
((org-agenda-files (append oni:personal-agenda-files
|
|
||||||
oni:common-agenda-files))))
|
|
||||||
("Pt" "Personal todo" todo ""
|
|
||||||
((org-agenda-files (append oni:personal-agenda-files
|
|
||||||
oni:common-agenda-files))))
|
|
||||||
("W" . "Work only")
|
|
||||||
("Wa" "Work agenda" agenda ""
|
|
||||||
((org-agenda-files (append oni:work-agenda-files
|
|
||||||
oni:common-agenda-files))))
|
|
||||||
("Wt" "Work todo" todo ""
|
|
||||||
((org-agenda-files (append oni:work-agenda-files
|
|
||||||
oni:common-agenda-files))))))
|
|
||||||
(setq org-agenda-prefix-format
|
|
||||||
'((agenda . " %i %-12:c%?-12t% s")
|
|
||||||
(timeline . " % s")
|
|
||||||
(todo . " %i %-12:c %(oni:org-maybe-outline-path)")
|
|
||||||
(tags . " %i %-12:c %(oni:org-maybe-outline-path)")
|
|
||||||
(search . " %i %-12:c")))
|
|
||||||
(setq org-agenda-sorting-strategy
|
|
||||||
'((agenda habit-down time-up priority-down category-keep)
|
|
||||||
(todo priority-down user-defined-down)
|
|
||||||
(tags priority-down category-keep)
|
|
||||||
(search category-keep)))
|
|
||||||
(setq org-agenda-tags-column (1+ (- (window-width))))
|
|
||||||
(setq org-directory (expand-file-name "~/documents/org"))
|
|
||||||
(setq org-default-notes-file (concat org-directory "/org"))
|
|
||||||
(setq org-capture-templates
|
|
||||||
`(("t" "Task" entry (file "~/documents/org/tasks")
|
|
||||||
"* TODO %?")
|
|
||||||
("T" "Linked task" entry (file "~/documents/org/tasks")
|
|
||||||
"* TODO %?\n\n %a")
|
|
||||||
("a" "Appointment" entry (file "~/documents/org/tasks")
|
|
||||||
"* %?\n SCHEDULED: %^T\n\n %a")
|
|
||||||
("n" "General note" entry (file ,org-default-notes-file)
|
|
||||||
(function oni:note-template))))
|
|
||||||
(setq org-contacts-files '("~/documents/org/misc/contacts.org"))
|
|
||||||
(setq org-agenda-show-outline-path nil)
|
|
||||||
(setq org-agenda-todo-ignore-deadlines 'far)
|
|
||||||
(setq org-agenda-todo-ignore-scheduled t)
|
|
||||||
(setq org-export-htmlize-output-type 'css)
|
|
||||||
(setq org-feed-alist
|
|
||||||
'(("MyEpisodes"
|
|
||||||
"http://www.myepisodes.com/rss.php?feed=mylist&uid=Slash&pwdmd5=04028968e1f0b7ee678b748a4320ac17"
|
|
||||||
"~/documents/org/tasks" "MyEpisodes"
|
|
||||||
:formatter oni:myepisodes-formatter)))
|
|
||||||
(setq org-fontify-done-headline t)
|
|
||||||
(setq org-hide-emphasis-markers t)
|
|
||||||
(setq org-outline-path-complete-in-steps t)
|
|
||||||
(setq org-refile-allow-creating-parent-nodes t)
|
|
||||||
(setq org-refile-targets `((,(append oni:personal-agenda-files
|
|
||||||
oni:work-agenda-files)
|
|
||||||
. (:maxlevel . 6))))
|
|
||||||
(setq org-refile-use-outline-path 'file)
|
|
||||||
(setq org-return-follows-link t)
|
|
||||||
(setq org-src-fontify-natively t)
|
|
||||||
(setq org-tags-column (- 70))
|
|
||||||
(setq org-tags-exclude-from-inheritance '("crypt"))
|
|
||||||
(setq org-todo-keyword-faces
|
|
||||||
'(("TODO" :foreground "#ff756e" :background "#171719" :box (:width 1 :color "#282830"))
|
|
||||||
("DONE" :foreground "#9ad870" :background "#222224" :box (:width 1 :color "#333335"))
|
|
||||||
("SUCCEEDED" :foreground "#9ad870" :background "#222224" :box (:width 1 :color "#333335"))
|
|
||||||
("WAITING" :foreground "#ffbb56" :background "#171719" :box (:width 1 :color "#282830"))
|
|
||||||
("CANCELLED" :foreground "#93d8d8" :background "#222224" :box (:width 1 :color "#333335"))
|
|
||||||
("FAILED" :foreground "#93d8d8" :background "#222224" :box (:width 1 :color "#333335"))
|
|
||||||
("WIP" :foreground "#ff756e" :background "#171719" :box (:width 1 :color "#282830"))
|
|
||||||
("HOLD" :foreground "#ffbb56" :background "#171719" :box (:width 1 :color "#282830"))
|
|
||||||
("ACQUIRE" :foreground "#ff756e" :background "#171719" :box (:width 1 :color "#282830"))
|
|
||||||
("IGNORED" :foreground "#999999" :background "#222224" :box (:width 1 :color "#333335"))
|
|
||||||
("COMMENT" :foreground "#969696" :background "#3d3d3d" :box (:line-width 2 :color "#3d3d3d"))))
|
|
||||||
(setq org-use-fast-todo-selection t)
|
|
||||||
(setq org-agenda-skip-function-global 'oni:skip-ex-tag)
|
|
||||||
(setq org-use-property-inheritance '("slug"))
|
|
||||||
|
|
||||||
(add-hook 'org-agenda-mode-hook 'org-agenda-to-appt)
|
|
||||||
|
|
||||||
(add-to-list 'org-modules 'habit)
|
|
||||||
|
|
||||||
(org-indent-mode t)
|
|
||||||
|
|
||||||
(org-agenda-to-appt)
|
|
||||||
(ad-activate 'org-agenda-redo)
|
|
||||||
|
|
||||||
(oni:set-org-agenda-files)
|
|
||||||
(run-at-time "09:01" (* 60 60 24) 'oni:set-org-agenda-files)
|
|
||||||
(run-at-time "17:01" (* 60 60 24) 'oni:set-org-agenda-files)
|
|
||||||
|
|
||||||
(provide 'org-init)
|
|
||||||
;;; org-init.el ends here
|
|
|
@ -1,74 +0,0 @@
|
||||||
;;; quick-edit-mode.el --- Quickly edit stuff
|
|
||||||
|
|
||||||
;; Copyright (C) 2012 Tom Willemse
|
|
||||||
|
|
||||||
;; Author: Tom Willemse <slash@drd>
|
|
||||||
;; Keywords: convenience
|
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
|
||||||
;; it under the terms of the GNU General Public License as published by
|
|
||||||
;; the Free Software Foundation, either version 3 of the License, or
|
|
||||||
;; (at your option) any later version.
|
|
||||||
|
|
||||||
;; This program is distributed in the hope that it will be useful,
|
|
||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
;; GNU General Public License for more details.
|
|
||||||
|
|
||||||
;; You should have received a copy of the GNU General Public License
|
|
||||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;; Quickly edit stuff
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(defvar quick-edit-map
|
|
||||||
(let ((map (make-sparse-keymap)))
|
|
||||||
(define-key map "/" 'undo)
|
|
||||||
(define-key map "0" 'delete-window)
|
|
||||||
(define-key map "1" 'delete-other-windows)
|
|
||||||
(define-key map "2" 'split-window-below)
|
|
||||||
(define-key map "3" 'split-window-right)
|
|
||||||
(define-key map "K" 'kill-whole-line)
|
|
||||||
(define-key map "V" 'scroll-down-command)
|
|
||||||
(define-key map "a" 'oni:move-beginning-of-dwim)
|
|
||||||
(define-key map "b" 'backward-char)
|
|
||||||
(define-key map "d" 'oni:kill-region-or-forward-char)
|
|
||||||
(define-key map "e" 'oni:move-end-of-dwim)
|
|
||||||
(define-key map "f" 'forward-char)
|
|
||||||
(define-key map "j" 'newline-and-indent)
|
|
||||||
(define-key map "k" 'oni:kill-region-or-line)
|
|
||||||
(define-key map "n" 'next-line)
|
|
||||||
(define-key map "o" 'other-window)
|
|
||||||
(define-key map "p" 'previous-line)
|
|
||||||
(define-key map "v" 'scroll-up-command)
|
|
||||||
(define-key map "w" 'oni:kill-region-or-backward-char)
|
|
||||||
(define-key map (kbd "C-b") 'electric-buffer-list)
|
|
||||||
(define-key map (kbd "C-g") 'quick-edit-mode)
|
|
||||||
(define-key map (kbd "RET") 'quick-edit-mode)
|
|
||||||
map)
|
|
||||||
"Keymap for quick-edit-mode.")
|
|
||||||
|
|
||||||
(defun qe-locally-disable ()
|
|
||||||
"Disable quick-edit mode in the minibuffer"
|
|
||||||
(when (eq overriding-local-map quick-edit-map)
|
|
||||||
(setq-local overriding-local-map nil)))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(define-minor-mode quick-edit-mode
|
|
||||||
"Quickly edit stuff."
|
|
||||||
:lighter " qe"
|
|
||||||
:global t
|
|
||||||
(if quick-edit-mode
|
|
||||||
(progn
|
|
||||||
(setq overriding-local-map quick-edit-map)
|
|
||||||
(add-hook 'minibuffer-setup-hook 'qe-locally-disable)
|
|
||||||
(add-hook 'special-mode-hook 'qe-locally-disable))
|
|
||||||
(setq overriding-local-map nil)
|
|
||||||
(remove-hook 'minibuffer-setup-hook 'qe-locally-disable)
|
|
||||||
(remove-hook 'special-mode-hook 'qe-locally-disable)))
|
|
||||||
|
|
||||||
(provide 'quick-edit-mode)
|
|
||||||
;;; quick-edit-mode.el ends here
|
|
|
@ -1,3 +0,0 @@
|
||||||
(async-shell-command "herbstluftwm" " herbstluftwm")
|
|
||||||
(async-shell-command "dunst" " dunst")
|
|
||||||
(async-shell-command "xbindkeys" " xbindkeys")
|
|
|
@ -1,4 +0,0 @@
|
||||||
SUBDIR=snippets
|
|
||||||
MODULES=html-mode org-mode python-mode
|
|
||||||
|
|
||||||
include ../../dotfiles2.mk
|
|
|
@ -1,3 +0,0 @@
|
||||||
SUBDIR=html-mode
|
|
||||||
|
|
||||||
include ../../../dotfiles2.mk
|
|
|
@ -1,8 +0,0 @@
|
||||||
# -*- mode: snippet -*-
|
|
||||||
# name: for
|
|
||||||
# key: for
|
|
||||||
# condition: pony-tpl-minor-mode
|
|
||||||
# --
|
|
||||||
{% for $1 in $2 %}
|
|
||||||
$0
|
|
||||||
{% endfor %}
|
|
|
@ -1,8 +0,0 @@
|
||||||
# -*- mode: snippet -*-
|
|
||||||
# name: Template Block
|
|
||||||
# key: %
|
|
||||||
# condition: pony-tpl-minor-mode
|
|
||||||
# --
|
|
||||||
{% $1 %}
|
|
||||||
$0
|
|
||||||
{% end$1 %}
|
|
|
@ -1,3 +0,0 @@
|
||||||
SUBDIR=org-mode
|
|
||||||
|
|
||||||
include ../../../dotfiles2.mk
|
|
|
@ -1,7 +0,0 @@
|
||||||
# -*- mode: snippet -*-
|
|
||||||
# name: codeblock
|
|
||||||
# key: code
|
|
||||||
# --
|
|
||||||
#+begin_src $1
|
|
||||||
$0
|
|
||||||
#+end_src
|
|
|
@ -1,9 +0,0 @@
|
||||||
# -*- 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
|
|
|
@ -1,51 +0,0 @@
|
||||||
# -*- 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
|
|
||||||
<script src="/keyjs.js" type="text/javascript"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
keyjs_initialize({ "u": [ "keyjs_goto", "../index.html" ],
|
|
||||||
"h": [ "keyjs_goto", "http://ryuslash.org" ] });
|
|
||||||
</script>
|
|
||||||
#+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...}
|
|
|
@ -1,14 +0,0 @@
|
||||||
# -*- 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
|
|
|
@ -1,3 +0,0 @@
|
||||||
SUBDIR=python-mode
|
|
||||||
|
|
||||||
include ../../../dotfiles2.mk
|
|
|
@ -1,7 +0,0 @@
|
||||||
# -*- 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)
|
|
|
@ -1,9 +0,0 @@
|
||||||
# -*- mode: snippet -*-
|
|
||||||
# name: Model Form
|
|
||||||
# key: form
|
|
||||||
# --
|
|
||||||
class ${1:Model}Form(forms.ModelForm):
|
|
||||||
'''Form for the $1 model.'''
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
model = $1
|
|
|
@ -1,8 +0,0 @@
|
||||||
# -*- 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)
|
|
|
@ -1,6 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# name: from ... import ...
|
|
||||||
# contributor: Tom Willemse
|
|
||||||
# key: from
|
|
||||||
# --
|
|
||||||
from ${1:module} import ${2:class_or_module}
|
|
|
@ -1,9 +0,0 @@
|
||||||
# -*- 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)
|
|
|
@ -1,5 +0,0 @@
|
||||||
# -*- mode: snippet -*-
|
|
||||||
# name: url
|
|
||||||
# key: url
|
|
||||||
# --
|
|
||||||
url(r'^$1', $2, name='$3'),
|
|
Loading…
Reference in a new issue