emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Karl Voit <news2042@Karl-Voit.at>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <875yqxhx0i.fsf@localhost> (raw)
In-Reply-To: <2022-01-06T12-13-17@devnull.Karl-Voit.at>

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	other threads:[~2022-01-06 12:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 20:22 [BUG] org-element--cache gives "Unregistered buffer modifications" warning [9.5 (9.5-g859984 @ /home/john/.emacs.d/straight/build/org/)] John Mathena
2021-11-08  5:59 ` Ihor Radchenko
2021-12-16  2:29   ` Kaushal Modi
2021-12-16  2:34     ` Kaushal Modi
2021-12-16  4:20       ` Ihor Radchenko
2021-12-16 14:33         ` Kaushal Modi
2021-12-16 15:18           ` Ihor Radchenko
2021-12-16 16:16             ` Kaushal Modi
2021-12-18  4:35               ` Ihor Radchenko
2021-12-18 17:43                 ` Kaushal Modi
2021-12-19  9:47                   ` Ihor Radchenko
2022-04-24  3:37                 ` Difference seen in org-version strings when built from git Kaushal Modi
2022-04-24  3:59                   ` Ihor Radchenko
2022-01-06 11:17 ` [BUG] org-element--cache gives "Unregistered buffer modifications" warning [9.5 (9.5-g859984 @ /home/john/.emacs.d/straight/build/org/)] Karl Voit
2022-01-06 12:25   ` Ihor Radchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yqxhx0i.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=news2042@Karl-Voit.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).