From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 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: Fri, 17 Jun 2022 09:16:34 -0400 Message-ID: References: <87mtmalrs1.fsf@localhost> <837dde200c.fsf@gnu.org> <87k0helmig.fsf@localhost> <831r3m1tpk.fsf@gnu.org> <8735o1r31q.fsf@localhost> <834k8hzi10.fsf@gnu.org> <87zgq9pmb6.fsf@localhost> <831r3lzfk4.fsf@gnu.org> <87wnldpk5x.fsf@localhost> <83zgq9xv1y.fsf@gnu.org> <87r1bkpgjw.fsf@localhost> <83r13nq2ai.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3695"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51766@debbugs.gnu.org, yantar92@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 17 15:17:37 2022 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 1o2Bqy-0000i1-PW for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Jun 2022 15:17:37 +0200 Original-Received: from localhost ([::1]:44412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2Bqx-0006HY-CM for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Jun 2022 09:17:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2BqQ-0006Gd-U0 for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2022 09:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2BqQ-0004lt-9F for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2022 09:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2BqQ-0004Kn-3w for bug-gnu-emacs@gnu.org; Fri, 17 Jun 2022 09:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Jun 2022 13:17: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.165547180715960 (code B ref 51766); Fri, 17 Jun 2022 13:17:02 +0000 Original-Received: (at 51766) by debbugs.gnu.org; 17 Jun 2022 13:16:47 +0000 Original-Received: from localhost ([127.0.0.1]:44332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2BqB-00048y-AN for submit@debbugs.gnu.org; Fri, 17 Jun 2022 09:16:47 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:30154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2Bq7-00041f-Ck for 51766@debbugs.gnu.org; Fri, 17 Jun 2022 09:16:45 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B348A4410EA; Fri, 17 Jun 2022 09:16:37 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 54262440C7C; Fri, 17 Jun 2022 09:16:36 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1655471796; bh=WC7co+3i4YCtMO45kmiph6AWjV80mOI15zZbubNntF8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ks0BRVelTBWPMAsTcNgzRht1BSzFRhQhYlBK+LGowFqnfYhRseTLJ1UUy2wIxS4YQ 8nR2rAXerg3+eA6/6zUTTxeueYLdXEY09mMvYf7PK5y5HI8dE/s0epduhc7vtqTd8p N3qfYs1Q9CB50T9ySjA7noHg+b8hQbOvdiE7TYe+jNyjTUw0iQJSFf6r/OLOX/V6Zz LQJD9bkP2ebC+Wbl/IOvi6qhaXet9tsPIGLpt1Fmt5qjJHvheYgdVZUYAmHTpjvQuz jhxndBXV7LKiXRWpKlXU4mTK3qdzI/LuuVp4QvYMwNwATYm4ksDFCR1Sic/rjjjXlJ p/qRU0rkxlRwQ== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2384812047F; Fri, 17 Jun 2022 09:16:36 -0400 (EDT) In-Reply-To: <83r13nq2ai.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 17 Jun 2022 08:36:37 +0300") 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:234689 Archived-At: Eli Zaretskii [2022-06-17 08:36:37] wrote: >> From: Stefan Monnier >> Cc: Eli Zaretskii , 51766@debbugs.gnu.org >> Date: Thu, 16 Jun 2022 22:54:22 -0400 >> >> I think the better way to proceed is to figure out why/when >> significant changes are made while `inhibit-modification-hooks` is >> non-nil, since that's the origin of your problems, AFAICT. > > I thought that was clear from the rest of the discussion: it's quail's > input methods that cause the issue, because quail tries to pretend > that just one character was inserted, when in fact the user could type > several characters. AFAIK in the case of Quail the char-modified-ticks changes (so there's some insertions/deletions going on) while `inhibit-modification-hooks` is set, but the state of the buffer at the next `before-change-functions` is correct, e.g. the buffer-hash is unchanged. IOW in the cse of Quail the Org mode code doesn't need to flush the whole parser's state, which means that the code that flushes the parser state when char-modified-ticks is modified silently was written to defend against *other* problems. Stefan