Karl Voit <devn...@karl-voit.at> writes:

> Every time I execute =my-title-capitalization()= from
> https://github.com/novoid/dot-emacs/blob/master/config.org I get this:
>
> #+BEGIN_EXAMPLE
> Warning (emacs): Unrecognized key: _i_
> Warning (emacs): org-element--cache: Unregistered buffer modifications 
> detected. Resetting.
> ...
> Any thoughts?

Just one: this is soooo annoying :(

The problem is caused by `capitalize-word', which changes
`buffer-char-modified-tick' even when no real change is made in buffer
and `after-change-functions' are not called.

This is one of the cases when we are trying to be smart and detect
changes in buffers made with `with-silent-modifications', but Emacs
built-in functions trigger false-positive.

See https://list.orgmode.org/87ee7jdv70.fsf@localhost/T/#t

Feel free to set org-element--cache-diagnostics-modifications to nil. It
will disable the warning.

Also, if you use that title-capitalization command frequently, caching
will not be very effective. Cache is refreshed every time Org detects
inconsistency in buffer modifications (even if the detection is
false-positive, like in your case). You might try to set
`org-element--cache-silent-modification-check' to nil to speed things
up, but please read the docstring first.

Best,
Ihor

Reply via email to