Skip to content

feat: grove profiles for separate note vaults#8

Open
sdoyle88 wants to merge 3 commits into
jonathanchu:mainfrom
sdoyle88:grove-profiles
Open

feat: grove profiles for separate note vaults#8
sdoyle88 wants to merge 3 commits into
jonathanchu:mainfrom
sdoyle88:grove-profiles

Conversation

@sdoyle88
Copy link
Copy Markdown

@sdoyle88 sdoyle88 commented May 8, 2026

Grove Profiles

First, I really enjoy this package! Thank you for starting it. I've been struggling with my knowledge base and have tried other packages such as org-roam and denote. These packages are amazing! But I find sometimes that it's overwhelming and I just want to manage more with vanilla org-mode with a helpful wrapping mechanism around them, and that's why this package piqued my interest.

One feature I enjoy with denote is the ability to have separate note locations on disk for work vs personal notes/knowledge bases. I wanted to introduce this PR as a potential path forward for that. It still allows viewing notes in different profiles by opening the file in Emacs, but the grove commands are tied to a specific profile while selected, and these are kept in different locations on disk to allow separation (say for sensitive data that should stay locally but personal notes that can be kept in a fileshare across machines). As such, I wanted to introduce a configuration option for grove-profiles that lets users maintain multiple independent note vaults and switch between them with a single command.

Note: If PR #5 goes into the codebase, I'll refactor to include this across those updates as well (which is why I am leaving in draft for discussion), as the main grove-directory and grove--cache variables are updated to new "meta" variables depending on if a grove-profile plist is set or not. Existing grove-directory configs continue to work unchanged, and will fallback if grove-profiles not set, ensuring backwards compatibility. Essentially, swapped grove-directory to grove--active-directory and grove--cache to grove--active-cache in all helper functions as meta variables.

Example config

  (setq grove-profiles
    '((personal :directory "~/notes/personal")
      (work     :directory "~/notes/work")))

Changes Introduced

  • Profile switching (C-c v p / M-x grove-switch-profile) — selects the active profile, immediately refreshes the file tree sidebar to reflect the new vault.

  • Auto-prompt on first use — if profiles are configured but none is active, any grove command (including C-c v v) prompts the user to pick a profile rather than falling through to a directory prompt.

  • Per-profile lazy cache — each profile maintains its own note cache, populated on first access. Switching profiles is instant; no rescan unless the vault has changed.

  • Strict isolation — all commands (search, capture, daily notes, backlinks, graph, inbox review) are scoped to the active profile. The file tree header shows the active profile name. Buffers remain open and can be viewed across profile, but all grove actions apply to the selected profile

  • Cross-profile awareness — following a wikilink to a note that exists in another profile shows a message indicating which profile to switch to, rather than offering to create a duplicate note. Backlinks similarly report the correct profile when a note is open from the wrong vault.

@sdoyle88 sdoyle88 marked this pull request as ready for review May 9, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant