summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-09-06 09:23:22 -0700
committerFranck Cuny <franck@fcuny.net>2024-09-06 09:23:22 -0700
commit17e05728bc09e92d5438544843a763b8cfa69dc5 (patch)
tree8ed6f4fdc13eed85d1717d3da34b70269a89169b
parentgoing to try howm (diff)
downloademacs.d-17e05728bc09e92d5438544843a763b8cfa69dc5.tar.gz
Revert "going to try howm"
This reverts commit 45b7eeca226e33af2488b2416236ca15888ecade.
-rw-r--r--config/init-notes.el82
1 files changed, 53 insertions, 29 deletions
diff --git a/config/init-notes.el b/config/init-notes.el
index 55d3620..0d393c4 100644
--- a/config/init-notes.el
+++ b/config/init-notes.el
@@ -7,37 +7,25 @@
 
 ;;; Code:
 
-(use-package howm
+(use-package denote
   :ensure t
+  :hook (dired-mode . denote-dired-mode)
   :init
-  ;; Org-compatible filenames and syntax.
-  (setq howm-file-name-format "%Y/%m/%Y-%m-%d-%H%M%S.org")
-  (setq howm-view-title-header "*")
-
-  ;; Use ripgrep for fast searching.
-  (setq howm-view-use-grep t)
-  (setq howm-view-grep-command "rg")
-  (setq howm-view-grep-option "-nH --no-heading --color never")
-  (setq howm-view-grep-extended-option nil)
-  (setq howm-view-grep-fixed-option "-F")
-  (setq howm-view-grep-expr-option nil)
-  (setq howm-view-grep-file-stdin-option nil)
-
-  ;; Make the "comefrom links" case-insensitive.
-  (setq howm-keyword-case-fold-search t)
-
-  ;; Get rid of the old-fashioned separators.
-  (setq howm-view-summary-sep "\t")
-
-  ;; Where to store data.
-  (setq howm-directory "~/Documents/notes")
-  (setq howm-home-directory howm-directory)
-  :config
-  (custom-set-faces
-   '(howm-menu-list-face ((t (:foreground "#a9a9a9"))))
-   '(howm-reminder-normal-face ((t (:foreground "#ab82ff"))))
-   '(howm-reminder-today-face ((t (:background "#993333" :foreground "white"))))
-   '(howm-reminder-todo-face ((t (:foreground "#ffb90f"))))))
+  (use-package denote-org-extras
+    :ensure nil)
+  (use-package denote-journal-extras
+    :ensure nil)
+  :bind (("C-c n r" . denote-rename-file)
+	 ("C-c n t" . denote-journal-extras-new-or-existing-entry)
+	 ("C-c n n" . denote-subdirectory))
+  :custom
+  (denote-rename-buffer-mode 1)
+  (denote-journal-extras-directory (concat denote-directory "journal/" (format-time-string "%Y")))
+  (denote-file-type "org")
+  (denote-org-capture-specifiers "%i\n%?")
+  (denote-dired-directories (list denote-directory))
+  (denote-dired-directories-include-subdirectories t)
+  (denote-journal-extras-title-format 'day-date-month-year))
 
 (use-package org
   :hook
@@ -47,6 +35,8 @@
 
   :custom
   (org-directory "~/Documents/notes")
+  (org-default-notes-file (expand-file-name "tasks.org" org-directory))
+  (org-agenda-files '("tasks.org"))
   
   (org-startup-folded t)
   (org-startup-indented t)
@@ -56,6 +46,19 @@
   (org-enforce-todo-dependencies t)
   (org-enforce-todo-checkbox-dependencies t)
 
+  ;; quick access for todo states
+  (org-todo-keywords
+   '((sequence "TODO(t)" "NEXT(n)" "WAITING(w!)" "|" "DONE(d)")
+     (sequence "|" "CANCELLED(c)")))
+
+  (org-log-done 'time)
+  (org-log-into-drawer t)
+
+  ;; org-refile options
+  (org-refile-allow-creating-parent-nodes (quote confirm))
+  (org-refile-targets '(("tasks.org" :tag . "target")))
+  (org-refile-use-outline-path 'file)
+
   (org-hide-emphasis-markers t)
   (org-hide-leading-stars t)
   (org-pretty-entities t)
@@ -85,6 +88,27 @@
      ("q" . "quote")
      ("V" . "verbatim"))))
 
+(use-package org-capture
+  :ensure nil
+  :after org
+  :bind
+  ("C-c c" . org-capture)
+  :config
+  (setq org-capture-templates
+        `(("t" "Tasks" entry (file+olp "tasks.org" "Inbox")
+	   "* TODO %?\n%U" :prepend t :empty-lines 0)
+	  ("n" "note" plain (file denote-last-path) #'denote-org-capture
+           :no-save t :immediate-finish nil :kill-buffer t :jump-to-captured nil))))
+
+(use-package org-agenda
+  :ensure nil
+  :after org
+  :bind
+  ("C-c a" . org-agenda)
+  :custom
+  (org-agenda-hide-tags-regexp (regexp-opt '("target")))
+  (org-agenda-start-on-weekday 1))
+  
 (use-package org-auto-tangle
   :ensure t
   :hook (org-mode . org-auto-tangle-mode))