Neorg dirman: Auto‑creation of missing workspace directories during setup
0 reputation · 26 Feb 2023, 21:17 UTC
Goal
The goal is to recover safely from a failed Neorg upgrade that leaves workspace mappings pointing to non‑existent directories. When neorg.setup loads, it maps workspace names to filesystem paths, but the corresponding directories and index.norg files are not created automatically.
Constraints & Uncertainty
After an upgrade, the dirman.workspaces table may still reference old paths that no longer exist, and attempting :Neorg dirman index <workspace> triggers an error because the directory or index.norg is missing. Neorg does not create these directories during neorg.setup and the :Neorg dirman create-workspace command must be invoked manually. It is unclear whether a configuration option can enable automatic creation of missing workspaces, and which recovery steps are recommended for a user who has just upgraded and found their workspace structure broken.
Specific Questions
- Does Neorg automatically create missing workspace directories during
neorg.setup, or is manual creation required? - Is there a configuration flag or setting that can enable automatic creation of missing workspace directories or
index.norgfiles during setup? - What is the recommended sequence of actions to recover a workspace after an upgrade that leaves its root directory or index file missing?