From d6a4682082532faa4fc0b54cc8081831df0bf9d9 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 9 Dec 2014 19:31:59 -0800 Subject: [PATCH] Updates for new version of org-projectile --- dotfiles/emacs.d/.gitignore | 4 ++-- dotfiles/emacs.d/init.el | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/dotfiles/emacs.d/.gitignore b/dotfiles/emacs.d/.gitignore index 626c2c4a..c1a4d98f 100644 --- a/dotfiles/emacs.d/.gitignore +++ b/dotfiles/emacs.d/.gitignore @@ -8,7 +8,6 @@ backups eshell url bookmarks - elpa .python-environments/ tramp @@ -22,4 +21,5 @@ var skewer-cache .org-id-locations jabber-avatar-cache -this-machine.el \ No newline at end of file +this-machine.el +recentf \ No newline at end of file diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 6446d5b0..3ff6a41c 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -267,7 +267,13 @@ buffer is not visiting a file." (defun growl-notify (title message) (shell-command (format "grownotify -t %s -m %s" title message))) -(defvar notify-function 'notification-center) +(defun notify-send (title message) + (shell-command (format "notify-send -u critical %s %s" title message))) + +(defvar notify-function + (cond ((eq system-type 'darwin) 'notification-center) + ((eq system-type 'gnu/linux) 'notify-send))) + (defun project-root-of-file (filename) "Retrieves the root directory of a project if available. @@ -425,7 +431,7 @@ The current directory is assumed to be the project's root otherwise." (progn (diminish 'magit-auto-revert-mode) (use-package magit-filenotify - ;; Seems like OSX does not properly this. + ;; Seems like OSX does not support filenotify. :disabled t :ensure t :if (emacs24_4-p) @@ -601,15 +607,15 @@ The current directory is assumed to be the project's root otherwise." (add-to-list 'org-capture-templates `("g" "GTD Todo" entry (file+headline ,org-gtd-file "Tasks") "* TODO %?\n")) + (defun org-insert-habit () (interactive) (org-insert-todo-heading nil) (org-make-habit)) - (add-to-list 'org-capture-templates (org-projectile:project-todo-entry)) - - (add-to-list 'org-modules 'org-habit) + (add-to-list 'org-capture-templates (org-projectile:project-todo-entry "p")) + (add-to-list 'org-capture-templates (org-projectile:project-todo-entry "l" "* TODO %? %a\n")) (let ((this-week-high-priority '(tags-todo "+PRIORITY=\"A\"+DEADLINE<\"<+1w>\"DEADLINE>\"<+0d>\""