aboutsummaryrefslogtreecommitdiff
path: root/tests/test-custom-comments-delete-buffer-comments.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-24 07:21:44 -0500
committerCraig Jennings <c@cjennings.net>2026-05-24 07:21:44 -0500
commitd9564c446850964758b3c833f584f088df4f4c54 (patch)
tree22a4c429e8a1195c58976129575858ada64646bd /tests/test-custom-comments-delete-buffer-comments.el
parente4a1b27ea6eba86911e9e5deb7939e00a46cc522 (diff)
downloaddotemacs-d9564c446850964758b3c833f584f088df4f4c54.tar.gz
dotemacs-d9564c446850964758b3c833f584f088df4f4c54.zip
fix(org): surface directory-scan failures instead of crashing or hiding them
The refile target scan caught permission-denied and silently dropped the directory, and would crash outright on a missing root (only permission-denied was caught, so a missing code-dir/projects-dir raised file-missing and aborted the whole build). The agenda build had the same crash: cj/add-files-to-org-agenda-files-list called directory-files on projects-dir with no existence check. Extracted cj/--org-refile-scan-dir, which warns (display-warning) and returns nil for a missing, unreadable, or permission-denied root so the rest of the scan continues. Guarded the agenda scan the same way. Both now log a concise warning naming the skipped directory rather than failing silently or fatally. Also fixed a latent bug surfaced here: org-refile-targets was never declared special, so under make compile cj/org-refile-in-file let-bound it lexically and the scoped targets never reached org-refile. Added (defvar org-refile-targets) so the binding stays dynamic when byte-compiled. Tests cover the helper (missing/permission-denied/normal) and the agenda missing-dir guard.
Diffstat (limited to 'tests/test-custom-comments-delete-buffer-comments.el')
0 files changed, 0 insertions, 0 deletions