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 | 39dba091171327ff9f8beb5a31eed3136b9d78cf (patch) | |
| tree | 0d500c537c8750fd3965fec2c0643a3fd3ed8ec2 /modules/prog-python.el | |
| parent | b2bb273bec6d4a5deb19a3ff55904b8430091567 (diff) | |
| download | dotemacs-39dba091171327ff9f8beb5a31eed3136b9d78cf.tar.gz dotemacs-39dba091171327ff9f8beb5a31eed3136b9d78cf.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 'modules/prog-python.el')
0 files changed, 0 insertions, 0 deletions
