-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use buffer-chars-modified-tick instead of buffer-modified-tick #203
Use buffer-chars-modified-tick instead of buffer-modified-tick #203
Conversation
Thanks, this may be a good change to make. You may be right that property changes don't matter, but ISTR that some Org code does put text properties on headings (tags or properties, something like that). Or maybe I'm thinking of the Agenda code you mentioned. Could you elaborate a little on what you may know about this? Also, it might be good for this to be tested in a branch for a little while before being merged. What do you think? Thanks. |
There is a caching mechanism involving text properties. It used by org-agenda and mapping API. The central functions are In general, changes made in property cache always reflect changes in the text. However, changes in text do not guarantee that property cache is updated. It must be done manually, according to my understanding of the code. So, for the purpose of I personally use Org's property cache to speed up queries of properties that are not very frequently used. Property cache does a single pass across the org file updating properties incrementally. See [1] and first src block in [2] for example usage.
So far it is working fine for me. It has been one week from the time I added this commit to my fork. [2] https://github.com/yantar92/emacs-config/blob/master/config.org#archiving |
Also, it might be good for this to be tested in a branch for a little while before being merged.
Still no issues :)
|
Thanks. I haven't had time to work on these packages lately, but I'll plan to make this change in 0.6. |
I'm going to defer this to 0.7 so I can release 0.6 sooner. As soon as I do that, I'll merge this to master. |
4f5fbc4
to
d0acc8c
Compare
b80775b
to
675d333
Compare
buffer-modified-tick
invalidates buffer cache even when changes to text properties are made (i.e. each time agenda view is refreshed).buffer-chars-modified-tick
reacts only to actual canges in buffer text. AFAIK there is no reason to invalidate change when text in org buffer is not changed.