diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-11 17:17:53 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-11 17:17:53 -0500 |
| commit | 96ee689709ca45866e985fff2179c0e6797ec697 (patch) | |
| tree | 381d571336b9ad82c34e93d5d7390b85430cf1db /tests/test-system-utils-eval-buffer.el | |
| parent | e958410cbc14d2bfa0f97890aafe38031e082aa7 (diff) | |
| download | dotemacs-96ee689709ca45866e985fff2179c0e6797ec697.tar.gz dotemacs-96ee689709ca45866e985fff2179c0e6797ec697.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 'tests/test-system-utils-eval-buffer.el')
0 files changed, 0 insertions, 0 deletions
