diff --git a/dotfiles/.emacs.d/config.org b/dotfiles/.emacs.d/config.org index a33dbdf..c1fef7d 100644 --- a/dotfiles/.emacs.d/config.org +++ b/dotfiles/.emacs.d/config.org @@ -2,6 +2,15 @@ General configuration is configuration of vanilla Emacs. This includes making Emacs more minimal. +** Global Constants + +Constants used throughout my emacs config. + +#+begin_src emacs-lisp +(defconst jm/cloud-root "~/Nextcloud") +(defconst jm/notes-directory (expand-file-name "org" jm/cloud-root)) +#+end_src + ** Disable Error Bell Disable error bell and visual bell. Visual bell would be nice on Linux, but on mac it is just annoying so I removed it temp. @@ -460,8 +469,8 @@ Ledger is a Unix program that implements a finance tracking system or /ledger/. :mode ("\\.ledger\\'") :config (setq ledger-report-use-strict t - ledger-master-file (file-truename "~/Nextcloud/Ledger/toc.ledger") - ledger-accounts-file (file-truename "~/Nextcloud/Ledger/accounts.ledger")) + ledger-master-file (expand-file-name "Ledger/toc.ledger" jm/cloud-root) + ledger-accounts-file (expand-file-name "Ledger/accounts.ledger" jm/cloud-root)) (setq ledger-reports `(("bal" ,(format "%%(binary) -f %s bal" ledger-master-file)) ("budget" ,(format "%%(binary) -f %s --budget -p 'this month' bal Expenses" ledger-master-file)) diff --git a/dotfiles/.emacs.d/org.org b/dotfiles/.emacs.d/org.org index 5d78898..220a594 100644 --- a/dotfiles/.emacs.d/org.org +++ b/dotfiles/.emacs.d/org.org @@ -16,7 +16,7 @@ This installs the org package and creates a setup function to enable/disable cer (use-package org :hook (org-mode . jm/org-mode-setup) :config - (setq jm/inbox-file "~/Nextcloud/org/inbox.org" + (setq jm/inbox-file (expand-file-name "inbox.org" jm/notes-directory) org-ellipsis " ▾" org-pretty-entities t org-hide-emphasis-markers t @@ -219,7 +219,7 @@ Below is the main config for org-roam. (use-package org-roam :init (require 'org-roam-dailies) :custom - (org-roam-directory (file-truename "~/Nextcloud/org")) + (org-roam-directory jm/notes-directory) (org-roam-node-display-template "${title:60} ${file-title}") :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . jm/org-roam-find) @@ -274,6 +274,17 @@ Below is the main config for org-roam. (org-roam-db-autosync-mode)) #+end_src +** Consult Integration + +Consult Org Roam is a package that integrates searching from consult with ~org-roam~ which adds functionality such as full text searches over notes. + +#+begin_src emacs-lisp +(use-package consult-org-roam + :after org-roam + :bind (("C-c n s" . consult-org-roam-search)) + :init (consult-org-roam-mode 1)) +#+end_src + * Fix Snippets This is required as of org 9.2 as snippets such as ~