emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] org-element--cache gives "Unregistered buffer modifications" w


From: Ihor Radchenko
Subject: Re: [BUG] org-element--cache gives "Unregistered buffer modifications" warning [9.5 (9.5-g859984 @ /home/john/.emacs.d/straight/build/org/)]
Date: Thu, 06 Jan 2022 20:25:01 +0800

Karl Voit <devnull@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

[Prev in Thread] Current Thread [Next in Thread]