summaryrefslogtreecommitdiffstats
path: root/.emacs.d/site-lisp
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2013-01-04 00:06:15 +0100
committerGravatar Tom Willemsen2013-01-04 00:06:15 +0100
commit12fbc83cc7637548bcefaed1d0b7aea81064c67f (patch)
tree7cf66d3804a87e9154479d6d00f72d17002a14bf /.emacs.d/site-lisp
parentef288f8ad6c5fe22161fd55d69792e5d0f340b01 (diff)
parent1be69078ad8c1af62de79b80345a72d2b8490b04 (diff)
downloaddotfiles-12fbc83cc7637548bcefaed1d0b7aea81064c67f.tar.gz
dotfiles-12fbc83cc7637548bcefaed1d0b7aea81064c67f.zip
Merge remote-tracking branch 'origin/master' into phoenix
Conflicts: .emacs.d/init.el
Diffstat (limited to '.emacs.d/site-lisp')
-rw-r--r--.emacs.d/site-lisp/eltuki.el52
-rw-r--r--.emacs.d/site-lisp/newsticker-init.el102
-rw-r--r--.emacs.d/site-lisp/oni.el17
-rw-r--r--.emacs.d/site-lisp/org-init.el21
4 files changed, 61 insertions, 131 deletions
diff --git a/.emacs.d/site-lisp/eltuki.el b/.emacs.d/site-lisp/eltuki.el
index 4815108..224e9ab 100644
--- a/.emacs.d/site-lisp/eltuki.el
+++ b/.emacs.d/site-lisp/eltuki.el
@@ -46,10 +46,20 @@
: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))
+ (org-mode)
+ (eltuki-post))
(defun eltuki-get-title ()
(save-excursion
@@ -163,9 +173,13 @@
(eltuki-slugify-string (eltuki-get-title))))
(defun eltuki-write-content (dir)
- (with-current-buffer (org-export-region-as-html
- (point-min) (point-max) t "*eltuki-html*")
- (write-region (point-min) (point-max) (concat dir "/content"))))
+ (let ((org-export-with-toc nil)
+ (filename (concat dir "/content")))
+ (with-current-buffer (org-export-region-as-html
+ (point-min) (point-max) t "*eltuki-html*")
+ (write-region (point-min) (point-max) filename)
+ (kill-buffer))
+ filename))
(defun eltuki-write-metadata (dir)
(let ((timestamp (eltuki-get-timestamp))
@@ -173,7 +187,8 @@
(status (eltuki-get-status))
(title (eltuki-get-title))
(name (eltuki-slugify-string (eltuki-get-title)))
- (commentstatus (eltuki-get-comment-status)))
+ (commentstatus (eltuki-get-comment-status))
+ (filename (concat dir "/metadata")))
(with-temp-buffer
(insert "timestamp: " timestamp "\n"
"tags: " tags "\n"
@@ -181,17 +196,36 @@
"title: " title "\n"
"name: " name "\n"
"comment_status: " commentstatus)
- (write-region (point-min) (point-max) (concat dir "/metadata")))))
+ (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 (get-buffer "*eltuki*"))
+ (let ((buffer (or (get-buffer "*eltuki*")
+ (current-buffer)))
(dest (eltuki-get-directory)))
(unless (file-exists-p dest)
(mkdir dest))
- (eltuki-write-content dest)
- (eltuki-write-metadata dest)
+ (mapc #'eltuki-git-add
+ (list (eltuki-write-content dest)
+ (eltuki-write-metadata dest)
+ (eltuki-save-org buffer dest)))
+
+ (eltuki-commit)
(kill-buffer buffer)))
(provide 'eltuki)
diff --git a/.emacs.d/site-lisp/newsticker-init.el b/.emacs.d/site-lisp/newsticker-init.el
index 5d60850..c393df1 100644
--- a/.emacs.d/site-lisp/newsticker-init.el
+++ b/.emacs.d/site-lisp/newsticker-init.el
@@ -1,108 +1,6 @@
-(defmacro reddit-feed (name)
- "Return a reddit feed url"
- (concat "http://www.reddit.com/r/" name "/new/.rss?sort=new"))
-
(setq newsticker-automatically-mark-items-as-old nil)
(setq newsticker-html-renderer 'w3m-region)
(setq newsticker-obsolete-item-max-age 604800)
-(setq newsticker-url-list
- `(("Irreal"
- "http://irreal.org/blog/?feed=rss2" nil nil nil)
- ("Arch Linux - Keeping it Simple"
- ,(reddit-feed "archlinux") nil nil nil)
- ("The C programming language"
- ,(reddit-feed "c_language") nil nil nil)
- ("C"
- ,(reddit-feed "C_Programming") nil nil nil)
- ("coding"
- ,(reddit-feed "coding") nil nil nil)
- ("Command Line"
- ,(reddit-feed "commandline") nil nil nil)
- ("Django"
- ,(reddit-feed "django") nil nil nil)
- ("M-x emacs-reddit"
- ,(reddit-feed "emacs") nil nil nil)
- ("git"
- ,(reddit-feed "git") nil nil nil)
- ("JavaScript"
- ,(reddit-feed "javascript") nil nil nil)
- ("r/Linux"
- ,(reddit-feed "linux") nil nil nil)
- ("Linux Gaming on Reddit"
- ,(reddit-feed "linux_gaming") nil nil nil)
- ("Lisp"
- ,(reddit-feed "lisp") nil nil nil)
- ("Open Source on Reddit"
- ,(reddit-feed "opensource") nil nil nil)
- ("PHP: The latest news in the PHP world"
- ,(reddit-feed "PHP") nil nil nil)
- ("programming"
- ,(reddit-feed "programming") nil nil nil)
- ("Python"
- ,(reddit-feed "Python") nil nil nil)
- ("Scheme Programming Language articles"
- ,(reddit-feed "scheme") nil nil nil)
- ("The Wayland Display Server"
- ,(reddit-feed "wayland") nil nil nil)
- ("Identity at Mozilla"
- "http://identity.mozilla.com/rss" nil nil nil)
- ("jd:/dev/blog"
- "http://julien.danjou.info/blog/index.xml" nil nil nil)
- ("KaKaRoTo's Blog"
- "http://kakaroto.homelinux.net/feed/" nil nil nil)
- ("Awhan Patnaik"
- "http://awhan.wordpress.com/feed/" nil nil nil)
- ("The Gitorious Blog"
- "http://blog.gitorious.org/feed/" nil nil nil)
- ;; ("Dieter on the web"
- ;; "http://dieter.plaetinck.be/index.rss" nil nil nil)
- ("Public Git Hosting - conkeror.git/atom log"
- "http://repo.or.cz/w/conkeror.git/atom" nil nil nil)
- ("Stevey's Blog Rants"
- "http://steve-yegge.blogspot.com/feeds/posts/default"
- nil nil nil)
- ("Script Tutorials"
- "http://www.script-tutorials.com/feed/rss/" nil nil nil)
- ("Hacker News"
- "http://news.ycombinator.com/rss" nil nil nil)
- ("HowtoForge - Linux Howtos and Tutorials -"
- "http://www.howtoforge.com/node/feed" nil nil nil)
- ("Linuxtoday.com"
- "http://linuxtoday.com/backend/biglt.rss" nil nil nil)
- ("Linux.com - Content Feed"
- "http://linux.com/rss/feeds.php" nil nil nil)
- ("TuxRadar feed"
- "http://www.tuxradar.com/rss" nil nil nil)
- ("Planet Emacsen"
- "http://planet.emacsen.org/atom.xml" nil nil nil)
- ("M-x all-things-emacs"
- "http://emacsblog.org/feed/" nil nil nil)
- ;; ("Xah Emacs Blog"
- ;; "http://feeds.feedburner.com/XahsEmacsBlog" nil nil nil)
- ;; ("Mastering Emacs"
- ;; "http://www.masteringemacs.org/feed/" nil nil nil)
- ("WikEmacs - Recent changes [en]"
- "http://wikemacs.org/w/index.php?title=Special:RecentChanges&feed=atom"
- nil nil nil)
- ("newest questions tagged emacs - Stack Overflow"
- "http://stackoverflow.com/feeds/tag?tagnames=emacs&sort=newest"
- nil nil nil)
- ("newest questions tagged elisp - Stack Overflow"
- "http://stackoverflow.com/feeds/tag?tagnames=elisp&sort=newest"
- nil nil nil)
- ("Recent Commits to python-django.el:master"
- "https://github.com/fgallina/python-django.el/commits/master.atom"
- nil nil nil)
- ("git.tuxfamily.org Git - sawfish.main.git/atom log"
- "http://git.tuxfamily.org/sawfish/main.git?p=sawfish/main.git;a=atom"
- nil nil nil)
- ("BLABBERMOUTH.NET Latest News"
- "http://feeds.feedburner.com/blabbermouth" nil nil nil)
- ("QJ.NET"
- "http://feeds.feedburner.com/QjGameNewsOpinionsBlogsandMore"
- nil nil nil)
- ("Beej's Bit Bucket"
- "http://beej.us/blog/rss.xml" nil nil nil)))
(setq newsticker-use-full-width nil)
(provide 'newsticker-init)
diff --git a/.emacs.d/site-lisp/oni.el b/.emacs.d/site-lisp/oni.el
index b3a7987..979e804 100644
--- a/.emacs.d/site-lisp/oni.el
+++ b/.emacs.d/site-lisp/oni.el
@@ -68,8 +68,10 @@ DOT are intentionally being skipped."
"Function for `after-save-hook'."
(oni:compile-el)
(executable-make-buffer-file-executable-if-script-p)
- (let ((dom-dir (locate-dominating-file (buffer-file-name) "Makefile")))
- (when dom-dir
+ (let* ((dom-dir (locate-dominating-file (buffer-file-name) "Makefile"))
+ (TAGSp (not (string= "" (shell-command-to-string
+ (concat "grep \"^TAGS:\" " dom-dir "Makefile"))))))
+ (when (and dom-dir TAGSp)
(shell-command
(concat "make -C " dom-dir " TAGS >/dev/null 2>&1")))))
@@ -286,13 +288,6 @@ If COUNT has been specified indent by that much, otherwise look at
(kill-region (region-beginning) (region-end))
(kill-line)))
-(defun oni:load-hippie-exp (other)
- "Make sure both hippie-expand and yasnippet are loaded in order
- to add yasnippet's expand function to hippie-expand."
- (require other)
- (add-to-list 'hippie-expand-try-functions-list
- 'yas/hippie-try-expand t))
-
(defun oni:lua-mode-func()
"Function for `lua-mode-hook'."
(local-unset-key (kbd ")"))
@@ -601,6 +596,7 @@ If no direction is given, don't split."
(defun oni:texinfo-mode-func ()
"Function for `texinfo-mode-hook'."
+ (setq-local comment-auto-fill-only-comments nil)
(auto-fill-mode))
(defun oni:view-mail (inbox)
@@ -624,7 +620,8 @@ for easy selection."
(defun oni:yas-minor-mode-func ()
"Function for `yas-minor-mode-hook'."
(define-key yas-minor-mode-map (kbd "TAB") nil)
- (define-key yas-minor-mode-map [(tab)] nil))
+ (define-key yas-minor-mode-map [(tab)] nil)
+ (define-key yas-minor-mode-map (kbd "C-\\") 'yas-expand))
(define-skeleton html-tag
"Testing creation of an html tag"
diff --git a/.emacs.d/site-lisp/org-init.el b/.emacs.d/site-lisp/org-init.el
index 793b453..23ae6a5 100644
--- a/.emacs.d/site-lisp/org-init.el
+++ b/.emacs.d/site-lisp/org-init.el
@@ -70,6 +70,7 @@
"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)
@@ -80,16 +81,16 @@
(setq org-tags-column -101)
(setq org-tags-exclude-from-inheritance '("crypt"))
(setq org-todo-keyword-faces
- '(("TODO" :background "red")
- ("DONE" :background "forest green")
- ("SUCCEEDED" :background "forest green")
- ("WAITING" :background "orange" :foreground "black")
- ("CANCELLED" :background "orange red")
- ("FAILED" :background "orange red")
- ("WIP" :background "#ff9800" :foreground "black")
- ("HOLD" :background "orange" :foreground "black")
- ("ACQUIRE" :background "red")
- ("IGNORED" :background "#555555")))
+ '(("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"))))
(setq org-use-fast-todo-selection t)
(setq org-use-property-inheritance '("slug"))