On 25/04/2021 19:25, Bastien wrote:

Are you still using it?  Did anyone tested it?

I realized that I break cache a bit, so the patch should not be applied in the current form. I have an idea how to fix it but I have found more problems around (independent of my patch). I did not worried since the patch did not appeared on updates.orgmode.org (I guess, due to "git diff" instead of "git format patch".)

Cache key is regexp. With my patch, level and max-level options share the same regexp. I think, cache for both options could be generated as for max-level and filtered in the case of "level". It may simplify the code.

I would be grateful for other comments.

I have not realized how to reduce number of regexps inside the loop without duplication of some regegexps. I have seen a statement that cache for compiled regular expressions in emacs is rather small so several patterns used on each cycle is enough to make it useless with significant performance penalty.

Other issues:
- Indirect buffer created with C-x 4 c does not reuse cache created for the main buffer, so first call in new buffer have to generate its own cache. - C-u C-c C-j promises to use headings from the buffer, but in the case of subtree indirect buffer, headings are not filtered to the narrowed part. - I have not solved the problem with default option for `org-refile' and `org-goto'. Maybe more detailed structure should be stored in history and formatted accordingly to current option at the moment of invocation.


Reply via email to