GNU bug report logs -
#51766
29.0.50; Return value of buffer-chars-modified-tick changes when buffer text is not yet changed before inserting a character for non-latin input methods
Previous Next
Full log
View this message in rfc822 format
> From: Ihor Radchenko <yantar92 <at> gmail.com>
> Cc: 51766 <at> debbugs.gnu.org
> Date: Thu, 11 Nov 2021 23:50:31 +0800
>
> Of course, there might be some kind of invisible change in buffer. I.e.
> text is added and immediately deleted from the buffer without redisplay.
That's exactly what happens: quail.el deletes the inserted character
and then reinserts it (for reasons unrelated to this issue). So the
count of the changes is not equal to the number of characters actually
inserted. I see no problem here, since the documentation never
promises that the difference between the values returned by successive
calls to buffer-chars-modified-tick will be exactly equal to the
number of inserted or deleted characters.
So if Org relies on such an equality, it's a bug in Org (but I didn't
look at the relevant Org code, and don't have a clear idea of how
exactly it uses the above function for whatever it is caching).
> However, even if there is any change like that, before-change-functions
> and after-change-functions are not triggered. That would be another bug
> then.
quail.el inhibit buffer modifications in places, since otherwise you'd
have too many of them. It wants to pretend that just one character
was inserted.
This bug report was last modified 3 years and 48 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.