summaryrefslogtreecommitdiff
path: root/scripts/remote-repository-reset.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-11 17:17:53 -0500
committerCraig Jennings <c@cjennings.net>2026-05-11 17:17:53 -0500
commitccd40ac53b920c1925d369408cb3405fc8d6dad3 (patch)
tree0d500c537c8750fd3965fec2c0643a3fd3ed8ec2 /scripts/remote-repository-reset.sh
parentffa143dc939d4e05f3d33989a0cb58a40fa383e1 (diff)
downloaddotemacs-ccd40ac53b920c1925d369408cb3405fc8d6dad3.tar.gz
dotemacs-ccd40ac53b920c1925d369408cb3405fc8d6dad3.zip
perf(org-capture): cache file+headline target markers
A task capture took 15-20 seconds: Org resolves a `(file+headline FILE "Headline")' target by opening the file, widening, and regex-scanning from the top for the headline, and the inbox template captures to `(file+headline inbox-file "Inbox")' over and over. An `:around' advice on `org-capture-set-target-location' caches a marker per resolved file/headline. On the next capture it validates the marker (still live, still in an Org buffer, still at a heading, headline text still matches) and jumps straight there. On any mismatch it falls back to the normal scan/create and refreshes the cache. `M-x cj/org-capture-clear-target-cache' resets it. Tests cover the cache hit, marker invalidation after the headline text changes, and creating a missing headline.
Diffstat (limited to 'scripts/remote-repository-reset.sh')
0 files changed, 0 insertions, 0 deletions