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#70541: track-changes-mode logs warnings (with input method, in Eglot buffer) Date: Sun, 28 Apr 2024 14:21:19 -0400 Message-ID: References: <86ttjr2pzw.fsf@gnu.org> <86edau3gyy.fsf@gnu.org> <8634ra36ny.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="33539"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: rcopley@gmail.com, 70541@debbugs.gnu.org, joaotavora@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 28 20:22:09 2024 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 1s19A9-0008WM-0j for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Apr 2024 20:22:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s199l-0005K9-2y; Sun, 28 Apr 2024 14:21:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s199j-0005Jt-2K for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2024 14:21:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s199i-0000UX-L4 for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2024 14:21:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s19A1-0005CX-Rz for bug-gnu-emacs@gnu.org; Sun, 28 Apr 2024 14:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Apr 2024 18:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70541 X-GNU-PR-Package: emacs Original-Received: via spool by 70541-submit@debbugs.gnu.org id=B70541.171432851119985 (code B ref 70541); Sun, 28 Apr 2024 18:22:01 +0000 Original-Received: (at 70541) by debbugs.gnu.org; 28 Apr 2024 18:21:51 +0000 Original-Received: from localhost ([127.0.0.1]:51583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s199q-0005CH-Sh for submit@debbugs.gnu.org; Sun, 28 Apr 2024 14:21:51 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:43719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s199o-0005CB-QI for 70541@debbugs.gnu.org; Sun, 28 Apr 2024 14:21:49 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id DD056100170; Sun, 28 Apr 2024 14:21:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1714328480; bh=vuwlT5yZ7ECdWUnMpWqgv94HN3zRsTZIjySti+uleoE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Aw0zOCyFsr2ZqchR4fJGIZpTTIbbeN4VFVDxph/y+9LwSRvckDFyX6rIie2q/OVGo +4jVLBHXr0albUt0lCUav7t8KoHrG607cuMBG1h0Oj5DWcWPKsltCSfB8mtvVReuMa SWdOU6XLoAHnNV5Vb9d/SowNDx5PoWYdxGfqtWxfZ7am/Lhlc52VUGop15LmmgmnUW PcTOufPGpnxkjsRr8HZp2fD4ETTU93rf3QIh0APESYoE0KjRNZwhFzWZVYyXGmqWPJ czAgVWYeTLTi37C4vSSvNPzBK4kZTJbrJLU3AtaXJz7v95aZXTohNj8BHUsBtFyg/q b/8jVxybq4NYw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 904961000AD; Sun, 28 Apr 2024 14:21:20 -0400 (EDT) Original-Received: from pastel (unknown [45.72.201.215]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6219512033B; Sun, 28 Apr 2024 14:21:20 -0400 (EDT) In-Reply-To: <8634ra36ny.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 24 Apr 2024 22:24:49 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284103 Archived-At: >> The buffer state is modified by Quail. It's somewhat temporary but >> there's still a lot that can happen during that temporary state. > It isn't just temporary: it's a change that "isn't supposed to exist". > It's just a side effect of how Quail is implemented. But what does it mean concretely? In which sense is it supposed not to exist? And more to the point, what makes it important to hide those changes? >> > So maybe Eglot should learn that when it sees this and a Quail input >> > is in progress, it should pretend it didn't see anything? >> >> That seems very yucky. Suddenly packages like Eglot, lsp-mode, crdt, >> TeXpresso, CriticalMarkup, ... need to learn about that special >> interaction with Quail. > > It isn't suddenly, it's because you switched Eglot to the new > track-changes method, right? No, the problem was there before just as well. The difference is that `track-changes.el` is more careful both to detect and to report such problems. > It worked fine before that, with the same Quail, right? Yes and no: in some cases the old code failed to detect the problem and that could result in broken behavior. When the old and new code detect the problem, they both "work fine" in the sense that the behavior is correct but at an extra cost because after detecting the inconsistency Eglot does a full resync with the server. > Or am I missing something? It also works correctly with the new code. The difference is that we report it (notice the `Subject:` says "warning"). [ Note also that `track-changes.el` does not warn about it when running in a released version of Emacs (see `track-changes-record-errors`), because I assume it's less useful. ] >> And how are they going to deal with it? > By ignoring the changes performed while that flag is set. Define "ignore". The change are there. `point`, `point-max`, `current-column`, etc... are affected. >> This is pretty ugly in my book, sounds like workarounds on top >> of workarounds. Can we try the patch I suggested first? > We could try, but how many times do we need to make changes like that > in Quail that bite us elsewhere before we learn the simple truth that > we shouldn't try that anymore? Which other times are you referring to? Stefan