OrgMode : roam dailies removed.

This commit is contained in:
2021-11-03 16:38:59 +09:00
parent 980a6dc02a
commit 53fbb87b6d

View File

@ -416,7 +416,6 @@ This makes nov to ugly
"f R" '(revert-buffer :which-key "Revert Buffer")
"t t" '(toggle-truncate-lines :which-key "Toggle truncate lines")
;; Shortcut
"f d a" '(lambda () (interactive) (find-file (expand-file-name "~/Agenda")) :which-key "open agenda folder")
"f d d" '(lambda () (interactive) (find-file (expand-file-name "~/.emacs.d/desktop.org")) :which-key "open exwm config")
"f d e" '(lambda () (interactive) (find-file (expand-file-name "~/.emacs.d/emacs.org")) :which-key "open emacs config"))
#+end_src
@ -839,10 +838,7 @@ https://emacs.stackexchange.com/a/30691
(setq org-agenda-start-with-log-mode t)
(setq org-log-done 'time)
(setq org-log-into-drawer t)
(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.8))
(setq org-agenda-files
'("/home/jaeus/Agenda/Agenda-2021-6th.org")))
(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.8)))
(use-package org-superstar :after org :hook (org-mode . org-superstar-mode))
(use-package org-attach-screenshot)
(use-package org-download)
@ -899,18 +895,8 @@ https://emacs.stackexchange.com/a/30691
:custom
(org-roam-directory "~/Roam")
(org-roam-completion-everywhere t)
;; Org capture
(org-roam-dailies-capture-templates
'(("d" "default" entry "* %<%I:%M %p>: %?"
:if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n"))))
:bind (:map org-mode-map
("C-M-i" . completion-at-point)
:map org-roam-dailies-map
("Y" . org-roam-dailies-capture-yesterday)
("T" . org-roam-dailies-capture-tomorrow))
:config
(require 'org-roam-dailies) ;; Ensure the keymap is available
(org-roam-db-autosync-mode))
;;(org-roam-setup))
(ju/leader-key-def
@ -918,10 +904,7 @@ https://emacs.stackexchange.com/a/30691
"rf" 'org-roam-node-find
"ri" 'org-roam-node-insert
"rI" 'org-roam-node-insert-immediate
"rp" 'my/org-roam-find-project
"rt" 'my/org-roam-capture-task
"rb" 'my/org-roam-capture-inbox
"rd" 'org-roam-dailies-map)
"rp" 'my/org-roam-find-project)
(defun org-roam-node-insert-immediate (arg &rest args)
(interactive "P")
@ -969,49 +952,10 @@ https://emacs.stackexchange.com/a/30691
nil
(my/org-roam-filter-by-tag "Project")
:templates
'(("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n"
'(("p" "project" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* History\n\n* Notes\n\n"
:if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+category: ${title}\n#+filetags: Project")
:unnarrowed t))))
(defun my/org-roam-capture-inbox ()
(interactive)
(org-roam-capture- :node (org-roam-node-create)
:templates '(("i" "inbox" plain "* %?"
:if-new (file+head "Inbox.org" "#+title: Inbox\n")))))
(defun my/org-roam-capture-task ()
(interactive)
;; Add the project file to the agenda after capture is finished
(add-hook 'org-capture-after-finalize-hook #'my/org-roam-project-finalize-hook)
;; Capture the new task, creating the project file if necessary
(org-roam-capture- :node (org-roam-node-read
nil
(my/org-roam-filter-by-tag "Project"))
:templates '(("p" "project" plain "** TODO %?"
:if-new (file+head+olp "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+category: ${title}\n#+filetags: Project"
("Tasks"))))))
(defun my/org-roam-copy-todo-to-today ()
(interactive)
(let ((org-refile-keep t) ;; Set this to nil to delete the original!
(org-roam-dailies-capture-templates
'(("t" "tasks" entry "%?"
:if-new (file+head+olp "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n" ("Tasks")))))
(org-after-refile-insert-hook #'save-buffer)
today-file
pos)
(save-window-excursion
(org-roam-dailies--capture (current-time) t)
(setq today-file (buffer-file-name))
(setq pos (point)))
;; Only refile if the target file is different than the current file
(unless (equal (file-truename today-file)
(file-truename (buffer-file-name)))
(org-refile nil nil (list "Tasks" today-file nil pos)))))
(add-to-list 'org-after-todo-state-change-hook
(lambda ()
(when (equal org-state "DONE")