From df280bc137261c89e1e30aba23f0a7744ea8fdc5 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 13 Dec 2014 21:29:48 -0800 Subject: [PATCH] org-todo-at-date --- dotfiles/emacs.d/init.el | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index ac860286..0bc0303d 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -650,12 +650,21 @@ The current directory is assumed to be the project's root otherwise." `("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)) + (defun org-date-time-to-internal-time (org-date) + `(,@(apply 'encode-time + (mapcar (lambda (elem) (if elem elem 0)) + (subseq (parse-time-string org-date) 0 6))) 0 0)) + + (defun org-todo-at-date (date) + (interactive (list (org-time-string-to-time (org-read-date)))) + (flet ((org-current-effective-time (&rest r) date)) + (org-todo))) + (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")) @@ -977,15 +986,16 @@ The current directory is assumed to be the project's root otherwise." (defun do-ag (&optional arg) (interactive "P") (if arg (helm-do-ag) (helm-projectile-ag))) - (unbind-key "C-c p s a" projectile-command-map) - (unbind-key "C-c p s g" projectile-command-map) - (unbind-key "C-c p s s" projectile-command-map) - (unbind-key "C-c p s" projectile-command-map) (projectile-global-mode) (setq projectile-enable-caching t) (setq projectile-completion-system 'helm) (helm-projectile-on) - (diminish 'projectile-mode)) + (diminish 'projectile-mode) + (unbind-key "C-c p s a" projectile-command-map) + (unbind-key "C-c p s g" projectile-command-map) + (unbind-key "C-c p s s" projectile-command-map) + (unbind-key "C-c p s" projectile-command-map) + (bind-key* "C-c p s" 'do-ag)) :bind (("C-x f" . projectile-find-file-in-known-projects)) :init (progn