diff options
Diffstat (limited to 'suweren/home/emacs-roam.el')
-rw-r--r-- | suweren/home/emacs-roam.el | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/suweren/home/emacs-roam.el b/suweren/home/emacs-roam.el deleted file mode 100644 index 4e0673d..0000000 --- a/suweren/home/emacs-roam.el +++ /dev/null @@ -1,62 +0,0 @@ -(require 'org-roam) - -(defun org-roam-db-query-tasks () - (concat "The query constructor to receive a list of files with tasks.") - (org-roam-db-query [:select - :distinct [file] - :from nodes - :where (like todo "TODO") - :or (like todo "DONE")])) - -(defun org-roam-dailies-with-tasks () - (concat "List of distinct Org Roam files with tasks,\n" - "obtained with Roam’s SQLite database query.\n" - "\n" - "The application of append is necessary to unpack the query result.") - (apply 'append - (funcall #'org-roam-db-query-tasks))) - -(defvar org-roam-merged-agenda-files - (append org-agenda-files - (org-roam-dailies-with-tasks)) - (concat "List of Roam’s agenda files merged with agenda files set earlier.")) - -(defun org-roam-update-agenda-files (&rest _) - (concat "Refresh the list of agenda files before opening the agenda.") - (setq org-agenda-files (org-roam-dailies-with-tasks))) - -(use-package org-roam - :init - (setq org-roam-v2-ack t) - - :config - (require 'org-roam-dailies) - (org-roam-db-autosync-mode) - (advice-add 'org-agenda - :before - #'org-roam-update-agenda-files) - (advice-add 'org-todo-list - :before - #'org-roam-update-agenda-files) - - :bind - (("C-c n f" . org-roam-node-find) - ("C-c n i" . org-roam-node-insert) - ("C-c n l" . org-roam-buffer-toggle) - :map - org-roam-dailies-map - ("T" . org-roam-dailies-capture-tomorrow) - ("Y" . org-roam-dailies-capture-yesterday)) - - :bind-keymap - ("C-c n d" . org-roam-dailies-map) - - :custom - (org-roam-directory "~/Dokumenty/Baza") - (org-roam-dailies-directory "Dziennik/") - (org-roam-capture-templates '(("d" "default" plain "%?" - :target (file+head "${slug}.org" - "#+title: ${title}\n") - :unnarrowed t))) - - :ensure t) |