aboutsummaryrefslogtreecommitdiff
path: root/modules/jumper.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-24 14:33:21 -0500
committerCraig Jennings <c@cjennings.net>2026-05-24 14:33:21 -0500
commitd6f579ab2e2a99efab4e65101d5681ea97ce5f56 (patch)
tree6f625c9b01416c0a98af76cd5c63adff6e541028 /modules/jumper.el
parenteed13bd4b8510ba5e0f48aa6d8dc15f77d1e335d (diff)
downloaddotemacs-d6f579ab2e2a99efab4e65101d5681ea97ce5f56.tar.gz
dotemacs-d6f579ab2e2a99efab4e65101d5681ea97ce5f56.zip
fix(org-roam): guard move-branch-to-roam against data loss
cj/move-org-branch-to-roam cut the subtree from the source buffer before writing the new roam file, so a failure in the demote/format/write/db-sync steps left the subtree gone from the source and not persisted anywhere — a destructive operation with no rollback. Reordered so the node file is written and verified on disk before org-cut-subtree runs; a failed write now aborts with the source untouched. Added a no-clobber guard (refuse an existing target file) and a confirmation prompt for large subtrees (>= cj/move-org-branch-confirm-lines, 30) or buffers with unsaved changes. The source buffer is deliberately left modified and undoable rather than auto-saved, so the move stays reversible. New test drives the write-failure-preserves-source invariant via an unwritable roam dir; the existing creates-roam-file test gained the confirm mock.
Diffstat (limited to 'modules/jumper.el')
0 files changed, 0 insertions, 0 deletions