aboutsummaryrefslogtreecommitdiff
path: root/modules/org-export-config.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
commit11325e85a0129ca2bccaf6cd2ed44938883d8848 (patch)
tree5e83c98768e25f3deb463e90d458502a95c56d22 /modules/org-export-config.el
parent0abca06edb6a48b15fd20767470966c7d795701e (diff)
downloaddotemacs-11325e85a0129ca2bccaf6cd2ed44938883d8848.tar.gz
dotemacs-11325e85a0129ca2bccaf6cd2ed44938883d8848.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/org-export-config.el')
0 files changed, 0 insertions, 0 deletions