From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#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 Date: Thu, 11 Nov 2021 19:35:19 +0200 Message-ID: <831r3m1tpk.fsf@gnu.org> References: <87mtmalrs1.fsf@localhost> <837dde200c.fsf@gnu.org> <87k0helmig.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28874"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51766@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 11 18:36:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlDzh-0007J3-Il for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Nov 2021 18:36:13 +0100 Original-Received: from localhost ([::1]:38708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mlDzg-0001Vs-N9 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Nov 2021 12:36:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlDzW-0001VG-MT for bug-gnu-emacs@gnu.org; Thu, 11 Nov 2021 12:36:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mlDzW-0008DG-EG for bug-gnu-emacs@gnu.org; Thu, 11 Nov 2021 12:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mlDzW-0004tl-Ad for bug-gnu-emacs@gnu.org; Thu, 11 Nov 2021 12:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Nov 2021 17:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51766 X-GNU-PR-Package: emacs Original-Received: via spool by 51766-submit@debbugs.gnu.org id=B51766.163665212918779 (code B ref 51766); Thu, 11 Nov 2021 17:36:02 +0000 Original-Received: (at 51766) by debbugs.gnu.org; 11 Nov 2021 17:35:29 +0000 Original-Received: from localhost ([127.0.0.1]:42164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlDyz-0004so-AN for submit@debbugs.gnu.org; Thu, 11 Nov 2021 12:35:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlDyx-0004sc-T8 for 51766@debbugs.gnu.org; Thu, 11 Nov 2021 12:35:28 -0500 Original-Received: from [2001:470:142:3::e] (port=36244 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlDys-00088i-L7; Thu, 11 Nov 2021 12:35:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=EvnVey7rDE3FLlDCoKnPJbUds7w7RB2pPwmybu5mW0s=; b=Cv40xZO9MLFg mvdOjl4S3w7GYji13sscWyy7LdHR5yMopsd0+zbmXzmk3JF8DWbmql4fhQrGGtTgjmkfw9/pffsek DPLA2U83ewqitoOIJOAgrKDGlBru6L6oN1bm5Khc2uU7nLoXONZIWuF2epqLj2qRO85tn3geQEtr3 TYf7kZxBkPO6KyhdegY/4zavqeOuj80SPqu5l+C9s44OvM/zd7vkNZvd/zHlpB5hkVWlv4+zSV+mF aAteu8QQE2zJA4CACqnexOAjUHhANQiuNLfgOSZ53Gc5Ox2i3pQc/NIto/ajWrYHfut500D7VSTP0 Nirv1G07wTYqim2l8ERHKg==; Original-Received: from [87.69.77.57] (port=3166 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlDys-0000Rw-8h; Thu, 11 Nov 2021 12:35:22 -0500 In-Reply-To: <87k0helmig.fsf@localhost> (message from Ihor Radchenko on Thu, 11 Nov 2021 23:50:31 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219661 Archived-At: > From: Ihor Radchenko > Cc: 51766@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.