GNU bug report logs - #70541
track-changes-mode logs warnings (with input method, in Eglot buffer)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Richard Copley <rcopley@HIDDEN>; dated Tue, 23 Apr 2024 20:46:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 4 May 2024 19:59:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 04 15:59:45 2024
Received: from localhost ([127.0.0.1]:55493 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s3LXs-0008GN-U6
	for submit <at> debbugs.gnu.org; Sat, 04 May 2024 15:59:45 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61252)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s3LXp-0008GH-K1
 for 70541 <at> debbugs.gnu.org; Sat, 04 May 2024 15:59:43 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C4AFE80A12;
 Sat,  4 May 2024 15:59:12 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1714852751;
 bh=pAMu3SCb1qitfapFwiqyRtw2kpld/beoLinluVtnTDk=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=YSXeuegGIqFO9gw4P+5DGqLIfQ6nqso+qVCmKp8mES0Xbt8cVxV/KTHuL2Nwi2jEf
 C9zwgKEolkeTd2tWCEzsc7GxY3u93SlyiRpxsG0+oV/QTaGgj0OVoAK8vcCgmpGphu
 ioNc1oSwCPv4wJaZCP6j5INIEqeQSCcH8DYWmxrB8seQEQYkhbXxleAy+CXYdjnGcx
 t18GW0R2PVXGC8L0/oKMBM7z6ytyGoFLBi9KKrrZIIIaYGPnQL+eLPrHCvglstwAmc
 AYcPoO5VyPjNDUrS3EJTJFVPNkgEr99E88yf8JR9NKxDQNM+eKCwYpwvraC/kAI2cc
 xRyKybLMQEzdA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id CF75380013;
 Sat,  4 May 2024 15:59:11 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9F9571204B0;
 Sat,  4 May 2024 15:59:11 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Richard Copley <rcopley@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <CAPM58oiP6J8Jz54Joa2frJe4KR13x8o7coHwL7wRrFJXke3rFA@HIDDEN>
 (Richard Copley's message of "Sat, 4 May 2024 19:08:14 +0100")
Message-ID: <jwvbk5l73pi.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
 <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
 <jwvh6fkrl0e.fsf-monnier+emacs@HIDDEN>
 <jwvh6festb8.fsf-monnier+emacs@HIDDEN>
 <jwva5l6sjln.fsf-monnier+emacs@HIDDEN>
 <CAPM58oiP6J8Jz54Joa2frJe4KR13x8o7coHwL7wRrFJXke3rFA@HIDDEN>
Date: Sat, 04 May 2024 15:59:10 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.044 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: 70541 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 =?windows-1252?B?Sm/jbyBU4XZvcmE=?= <joaotavora@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> * Start Eglot. (The "b" is highlighted to indicate an error.)
> * Enable the TeX input method.
> * Put point after the zero.
> * (Enter the bad state.) Quickly, type [<backspace> ^]. Pause.
> * Type [<backspace> y]. (No error highlight on "y".)
> * Move point to before the "x". (No "variable x" echo from Eldoc.)
> * Move point back to after the "y".
> * Type [<backspace> z] again. (Still no error highlight on "z".)
> * Type [SPC]. (Highlight on "b" is now rendered incorrectly.)
> * (Exit the bad state.) Type [C-n SPC <backspace>].

So you confirm that you don't see the "Missing/incorrect calls
..." warnings.  Thanks.  The fact that Eglot doesn't update until you
modify some "disjoint" part of the buffer was a known limitation of the
fix I installed.  I'll push a more complete fix RealSoonNow.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 4 May 2024 18:09:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 04 14:09:15 2024
Received: from localhost ([127.0.0.1]:55004 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s3Jow-0006qa-E9
	for submit <at> debbugs.gnu.org; Sat, 04 May 2024 14:09:15 -0400
Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]:53621)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rcopley@HIDDEN>) id 1s3Joq-0006qP-T9
 for 70541 <at> debbugs.gnu.org; Sat, 04 May 2024 14:09:12 -0400
Received: by mail-oa1-x31.google.com with SMTP id
 586e51a60fabf-22ed075a629so384789fac.3
 for <70541 <at> debbugs.gnu.org>; Sat, 04 May 2024 11:08:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714846120; x=1715450920; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=F5jffGqHk4WRFjzeoaKdex/CDiQB5dNukUP2dIaRE9o=;
 b=Wx2zM8znFjHwpRQuDFMc37xWyEv7IobdlN7/wYE8g7bAOFs38YBZBLxHasseLc9mxa
 aJygATmeR5o8DvyoACz102RB659NBS1aJc+ccYFMICqOz2y9Mb+LDX5m7+Gg7s6h6bpF
 WYTPC7+na89c8sStsCBa2KuJWToLxe2Rqrxr501Ish5Do6Q71BCkLbT5ea3Aq7WdMqv8
 GolnE9f/YXqYIj/b+tMh6q1dvoibmbHF7pv7FkupuP9F6t1Kx86bt82HqqjmYmuPwEdo
 4R3QUcPos/cPvwpbRTo3dJ2LEwNf4tB9IX3EXMxofMOUoG5rBhtkjqpQTE0M4Djyie4r
 USTg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714846120; x=1715450920;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=F5jffGqHk4WRFjzeoaKdex/CDiQB5dNukUP2dIaRE9o=;
 b=OeYx2lEUWtpCagKj+WVMNF1LYfbzH7ICv7Mj/1Lb0tgQliiv3O2GMirTJNNe1/Pswl
 fZY2sHUx8Fxm14+pu+ws/InoPxeZqzIwUoMoUu9naLrYWVasvurtUx3ud1OUyb+Pf3dJ
 GCiC18b7vNSxMRcVxVbqRhIrc++KcuxPVnxDsWk2ge3hoWQD3Wvus3leEq3LqpaDq/F0
 75/7JfSkdtu7/iI4m04kGDf8CDmYQrvdpmfrclwUIRc6r2GJkvYfeVFt8RPT8xFBktEt
 w6hVchPVTLasApUbwvqRS3hclwc6vQn4kLRBryUdO72nMHK3w6ElYwU4v+UYI6gvwo65
 NaWQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCV3ABFFZvVY4Ki0Xv52WdFqB8L6ndZep7Nf3SPEsNR+nZRm+CPTxyD6rCZXJpboqD3og/64QoSr72txaOo6/TSaRKLkUOQ=
X-Gm-Message-State: AOJu0YxIhP/sqtwqSJS7SeA8lcjF0hA14sYYpGlcsWlvvIK4S2R2vo1o
 y4Jw5pzHurYsxnJZzSTwWl+e4B3Pw1zBVnVSyzOA0pr62r9EMvaadHeTQ5Mtu+YFOsVBoysDkyh
 dWLb64dZ7Iizgh/n54nacsQsX03zSmnpl
X-Google-Smtp-Source: AGHT+IFlXY5kLY+HaffnSNvdk9fM2aRuqktspp8wBGmCHIMfOmdbOLWW0AjgPRXgYFKwvHDxNh+c0zMJJzNTX9bgokc=
X-Received: by 2002:a05:6870:d212:b0:239:792d:c6b8 with SMTP id
 g18-20020a056870d21200b00239792dc6b8mr7317679oac.0.1714846119826; Sat, 04 May
 2024 11:08:39 -0700 (PDT)
MIME-Version: 1.0
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
 <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
 <jwvh6fkrl0e.fsf-monnier+emacs@HIDDEN>
 <jwvh6festb8.fsf-monnier+emacs@HIDDEN>
 <jwva5l6sjln.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwva5l6sjln.fsf-monnier+emacs@HIDDEN>
From: Richard Copley <rcopley@HIDDEN>
Date: Sat, 4 May 2024 19:08:14 +0100
Message-ID: <CAPM58oiP6J8Jz54Joa2frJe4KR13x8o7coHwL7wRrFJXke3rFA@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70541
Cc: 70541 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Fri, 3 May 2024 at 18:27, Stefan Monnier <monnier@HIDDEN> wrote:
> I just pushed a patch to `master` which does that.
> Richard, can you confirm it fixes the problem on your end?

On Fri, 3 May 2024 at 21:56, Stefan Monnier <monnier@HIDDEN> wrote:
> It seems to work OK for me now, but I'd like to hear other people's
> experience with it.

Thanks Stefan.

One can trigger the track-changes signal in such a way as to defeat
the new check, as follows.

* Ensure clangd is on the path.
* Visit a C++ file with these contents:

void f () {
  int x = 0;
  int a = b;
}

* Start Eglot. (The "b" is highlighted to indicate an error.)
* Enable the TeX input method.
* Put point after the zero.
* (Enter the bad state.) Quickly, type [<backspace> ^]. Pause.
* Type [<backspace> y]. (No error highlight on "y".)
* Move point to before the "x". (No "variable x" echo from Eldoc.)
* Move point back to after the "y".
* Type [<backspace> z] again. (Still no error highlight on "z".)
* Type [SPC]. (Highlight on "b" is now rendered incorrectly.)
* (Exit the bad state.) Type [C-n SPC <backspace>].

Expected behaviour: After typing "y", Eglot sends "textDocument/didChange",
clangd sends "textDocument/publishDiagnostics" and Flymake highlights the
"y" to indicate an error.

Actual behaviour: After typing "y", no "textDocument/didChange" is sent
and the "y" is not highlighted. Further edits at the same buffer position
(even after moving point away and back again) do not recover the expected
highlighting, and point motion doesn't trigger LSP hover messages, until
one returns to a normal state by making changes elsewhere in the buffer.

If this happens when an edit was made with the intention of getting
feedback from the language server, it will be inconvenient.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 3 May 2024 20:56:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 03 16:56:40 2024
Received: from localhost ([127.0.0.1]:48671 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2zxQ-0007PI-2h
	for submit <at> debbugs.gnu.org; Fri, 03 May 2024 16:56:40 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13165)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s2zxM-0007PB-SK
 for 70541 <at> debbugs.gnu.org; Fri, 03 May 2024 16:56:39 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C33834418E4;
 Fri,  3 May 2024 16:56:07 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1714769766;
 bh=wmAnXi2J6GNGm1Pa1Xz2s9O+QhXNfGr8ADGXfZeBBYg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=PqWfsznNfipfcvMED2ANUoUQ9NiiXnkBm2hi+VwBtmvlujI7Af5d7TISOLOSDGz5V
 AHBD1u16NUbX0Ri+2exV7/zODVype9eTw2UNmTtgGaAMAqi6cqpEhfVQbYxuOIfdT0
 ujfk161jS6lNbHf0Aj+uAYS2eUptfbWMWRIHz2lsnh4t4nz4i2rfnMfaNRjW93hpFK
 ASoDUuiGpxz/8DcjX3hWoQEpz5s/sufilonDeSAKwF9LZTnMXZGrmc3/39HUJ1QHKY
 dPBOVYQ834ukoE2oiTOvnpSxJob1CcZFHkyBluSiq6EXQpVKGslVDfQxOsZgMAwWvy
 ZXQnIoKVEPjNw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 993224418CD;
 Fri,  3 May 2024 16:56:06 -0400 (EDT)
Received: from alfajor (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6937D120387;
 Fri,  3 May 2024 16:56:06 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= <joaotavora@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <jwvh6festb8.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Fri, 03 May 2024 13:27:45 -0400")
Message-ID: <jwva5l6sjln.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
 <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
 <jwvh6fkrl0e.fsf-monnier+emacs@HIDDEN>
 <jwvh6festb8.fsf-monnier+emacs@HIDDEN>
Date: Fri, 03 May 2024 16:56:05 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.001 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I just pushed a patch to `master` which does that.
> Richard, can you confirm it fixes the problem on your end?

Hmm... apparently my machine failed to read my mind and dutifully used
the Emacs I told it to use rather than the one I was working on, so
no wonder the tests worked fine.

I have pushed further fixes to my typo-laden code.
It seems to work OK for me now, but I'd like to hear other people's
experience with it.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 3 May 2024 17:28:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 03 13:28:19 2024
Received: from localhost ([127.0.0.1]:47508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s2whm-0004Ef-NM
	for submit <at> debbugs.gnu.org; Fri, 03 May 2024 13:28:19 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46461)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s2whk-0004Bk-Pn
 for 70541 <at> debbugs.gnu.org; Fri, 03 May 2024 13:28:17 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 49292806AA;
 Fri,  3 May 2024 13:27:47 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1714757266;
 bh=3fb3V0KlYju2gbcd1O2B60Mhh1/VXv5+enn2tbWP/GY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=A0+YLBBHHcDxq8etSePVbu2tfSUnAnxtYtDtQkxv/AsizZJGi7AYTE9nA76VmMWgn
 Swa2+LqzxxyhZ7ERYvlxQLB4jeauCnjxMIOOH/aftOeuVa7N16Conh0W+PO/GwxUl3
 8HtsgGHxwqSWAD/3nghxML01+yQfG9dTKMtOmqBBvVzQ0h7UC/eFP1jUziE4uUi+iB
 6OB4Cz7+IZrXHlo+fHPfpzgrC2XWVB9dr408BZORPi9GJZtjVmXpEx/+ZRvtYYpL91
 FPErdIVdjJSFOcLESBwP2Q/SEJY21eDah/s8YesLfmwLy/U0AM+ab4x9bSUDfZbwP1
 o9EuJB5SP0rOA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 20DF280136;
 Fri,  3 May 2024 13:27:46 -0400 (EDT)
Received: from alfajor (unknown [23.233.149.155])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EECC6120211;
 Fri,  3 May 2024 13:27:45 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= <joaotavora@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <jwvh6fkrl0e.fsf-monnier+emacs@HIDDEN> (Stefan Monnier's message
 of "Mon, 29 Apr 2024 16:27:42 -0400")
Message-ID: <jwvh6festb8.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
 <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
 <jwvh6fkrl0e.fsf-monnier+emacs@HIDDEN>
Date: Fri, 03 May 2024 13:27:45 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.061 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I guess we could add a function `track-change-inconsistent-state-p`
> which Eglot could consult before calling `track-changes-fetch` and if
> that returns non-nil, Eglot could reschedule the update to "later".

I just pushed a patch to `master` which does that.
Richard, can you confirm it fixes the problem on your end?

The problem of Quail binding
`inhibit-modification-hooks` remains, of course.  We should fix it
because it can affect many more things: all the code run in the middle
of a Quail input sequence (e.g. timers and process filters) are
effected, not just because they may see an "inconsistent" buffer state
but because the changes they make to buffers will themselves be
affected by the `inhibit-modification-hooks` binding.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 29 Apr 2024 20:53:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 16:53:41 2024
Received: from localhost ([127.0.0.1]:58783 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1Y0K-00037e-TM
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 16:53:41 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:10627)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s1Y0E-00037W-P2
 for 70541 <at> debbugs.gnu.org; Mon, 29 Apr 2024 16:53:38 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C327A1001E4;
 Mon, 29 Apr 2024 16:53:08 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1714423987;
 bh=rkmHwPjfhqaOKCeHYt8Dgejjevi/DG3lk+7P2wZMecE=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=fx61X+ZgL4tfYlqKyLxZopYl6Bbp+Sul7ixxAy9ayTRFnwM955P3y/95SnUAjacas
 Gp/5s9sisqmqyLTb/VgjCDYCZUPcpKEuxD7ajMKToy8e2/YFWf/mhiqFB4YqqLyNQF
 kF113WphSrH7EZyNdE4J1se1aMPcOhVmTLNQDVFp/ElONAzeesGnagisPqCp7OkSSU
 iXC9ATwCTWDPfYcqRlqWDvdaJZZU1L6J8QEYNATUZ6XQ6SapATKLfj7Dr6bQEoJ/YJ
 w6BlkxZGYA/DDFp4U24VcAKglOVRY5XTkyBU+XUHOLwyzQThzs+tC/3ncO7nj2pH/v
 9KfawGv5JLVtQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7A4D91000AD;
 Mon, 29 Apr 2024 16:53:07 -0400 (EDT)
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 69F74120191;
 Mon, 29 Apr 2024 16:53:07 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <861q6ou2cs.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 29 Apr
 2024 09:09:23 +0300")
Message-ID: <jwvbk5rsylx.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
Date: Mon, 29 Apr 2024 16:50:07 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.154 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> >> 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?
>
> The actual change is the character(s) inserted when the Quail input
> function completes its job.  Everything else is ephemeral, and Quail
> deletes it as part of its job.

While we can think of it as ephemeral, the fact is that it lasts through
redisplay, running timers, etc...

So it's not at all obvious why it should be treated differently from the
case where the users type something and then hit undo because they
realize they made a mistake, or when they type a short string followed
by `M-x expand-abbrev`.

There are many other forms of "ephemeral" changes, where we don't
inhibit modification hooks.  E.g. in `replace-match` we sometimes insert
the replacement and then capitalize it.  The intermediate
non-capitalized string is very much ephemeral: much more ephemeral than
Quail's (there's *very* little code run between the two operations).
Yet we call `before/after-change-functions` separately for both changes,
thereby exposing the intermediate state.

> So those insertions followed by deletions are not meant to change the
> buffer,

Yet they do.

> and should therefore be ignored.

I don't understand the "therefore".

Also, ignored by what?
Clearly they should not be ignored by redisplay (since the whole
purpose is to give guidance to the users).

Also, currently they're not ignored by `font-lock`.  Is that a bug?

>> 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.  ]
> So this is actually a non-issue?

It's a performance bug.

>> The change are there.  `point`, `point-max`, `current-column`,
>> etc... are affected.
> Why does Eglot need to react to those changes immediately when they
> happen?

It doesn't: it reacts to the changes in an idle timer.

But the idle timer can see Quail's intermediate state, exactly because
it is not nearly as ephemeral as would be needed for
`with-silent-modifications` to be acceptable.

> So I'd very much prefer that Quail signaled to applications that it's
> in the middle of handling some complex input, and that applications
> which track changes ignored the changes made during this period.

Eglot could pause its work during Quail input.  But note that with some
input methods, being in the middle of a Quail input can be very
common, so it's not a great solution because it could unduly delay the
work of Eglot.

And of course, other packages may not have that luxury.

> We might already have variables in Quail which could be used as such
> flags: quail-translating, quail-converting, quail-current-str, and
> quail-guidance-str, to name a few candidates.  Could any of them be
> used for this purpose?

I definitely would not want Track-Changes to lookup a Quail variable.
We should instead use/introduce some package-neutral var (which other
packages could use).  But I'd first like to know why it is that Quail
needs `inhibit-modification-hooks` to make sure we really need such
a workaround.
[ BTW, let-binding some dynbound variable would not do since
  track-changes would not see it if called from a separate thread.
  It would have to be a buffer-local var.  ]


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 29 Apr 2024 20:31:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 16:31:13 2024
Received: from localhost ([127.0.0.1]:58742 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1Xeb-0002oS-5L
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 16:31:13 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:59327)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s1XeX-0002oM-Dt
 for 70541 <at> debbugs.gnu.org; Mon, 29 Apr 2024 16:31:11 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6E19280A6A;
 Mon, 29 Apr 2024 16:30:43 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1714422642;
 bh=RuMnQMHNZC/i+MaFXh/1JywUpfuYCn2pgMZN6lfo8Ug=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=eTJh2ERihztAd8KmJpuYhlOlEq88H4vcE3Fi0Omxs+rbjCt0QYvOL7TPgCge+rIZ2
 4MXiv5/IVgH2wQfU7lJytwBtLeFVtXE9SsaUOwZOmK6RFwH03yBLIMc1nfMJqkZny5
 hquS869TnwEbcW5bzyw49Agc7o8XVTuT+8pwxWFtpz2byj+y8m9JvykdI08i9kVfNs
 ubWCvcCMZJbEjtwqvlWIo6fmImcB0ZM27NNNU8wJ9KxwaPCrnqzYTgJgvDhZ9BRms/
 7n2eK1Pxs8O8rEj8X0QqZPWs5roqVQeKxeJ94ij3/YvsOW4Tu0AIZUBofm4sf4e2JK
 dEziaN+7AQdrg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3C874806AA;
 Mon, 29 Apr 2024 16:30:42 -0400 (EDT)
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2DF9B120250;
 Mon, 29 Apr 2024 16:30:42 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= <joaotavora@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
 (=?windows-1252?Q?=22Jo=E3o_T=E1vora=22's?= message of "Mon, 29 Apr 2024
 09:28:47 +0100")
Message-ID: <jwvh6fkrl0e.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
 <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
Date: Mon, 29 Apr 2024 16:27:42 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.163 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> This idea is good, if I understand it correctly, though I would
> prefer if Eglot interfaced only with track-changes.el, and
> it would tell it that it should momentarily halt reports
> of changes to the server.

I guess we could add a function `track-change-inconsistent-state-p`
which Eglot could consult before calling `track-changes-fetch` and if
that returns non-nil, Eglot could reschedule the update to "later".

But that would just be a kludge usable by some packages like Eglot
because they have the luxury to reschedule.  For example, if some code
is run (e.g. via font-lock) which uses `syntax-ppss` while Quail's extra
chars are inserted, then `syntax-ppss` can't reschedule, and it may
record the resulting state in its cache after which
`inhibit-modification-hooks` may in turn prevent the cache from being
properly flushed when Quail removes its extra chars.

Removing the `inhibit-modification-hooks` would be a much
cleaner solution.  I asked Kenichi why he added that binding (back in
2005), but he hasn't replied yet.

> Can someone clarify in a simple example exactly what Eglot tells
> the LSP server as someone is inputting something with the Quail.
> I need to understand exactly where the "lie" is happening.

Here's the scenario: the user wants to insert `x=E1=B5=83` using the TeX in=
put
method (the same problem can occur with other methods, of course), so
Emacs will receive the following inputs:

    x ^ a

but let's assume the user pauses between `^` and `a`.
At this point, the `before/after-change-functions` have been called to
announce the insertion of `x` and nothing more, but the buffer also has
an (unannounced) `^` inserted at point.

So the buffer's content as seen by `before/after-change-functions` (and
hence by the LSP server) is out of sync because of this additional `^`.

Since Quail does not call the `before/after-change-functions`, Eglot
doesn't specifically send Quail's input to the LSP server: in the above
scenario, `eglot--signal-textDocument/didChange` is called because the
`before/after-change-functions` was called in response to the previous
`x`.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 29 Apr 2024 19:45:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 15:45:09 2024
Received: from localhost ([127.0.0.1]:58629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1Ww0-0002Dz-MB
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 15:45:09 -0400
Received: from mout01.posteo.de ([185.67.36.65]:48943)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1s1Wvx-0002DE-7h
 for 70541 <at> debbugs.gnu.org; Mon, 29 Apr 2024 15:45:07 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 3A76B240027
 for <70541 <at> debbugs.gnu.org>; Mon, 29 Apr 2024 21:44:39 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1714419879; bh=Vk8I4FVS0toGfz/Dz1lqFnIpwvb5p7UMLVvzqapq0JI=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=JayCk/ed7LCQ7ZaB0JVOeiLWWGNWgUeAnfld6X7N6nbJT228tOLKsfpBCHzERcsXy
 Ly/tRGIqTEJgrHJaVdeUGrA+fFqZfEjMvPWaIpqx9tBqtp1J/uncLKN82jyqQfyUjN
 uycOw0AgV2F3g2iSB/202Vn4gOy3guFO0TIkW1S2Jec5RrXhDyqD5MIByjO/L4PHAI
 Ch9Hko4tHTCkTfgRgCI5huX8Bu2JYbR2rYRO9+CpdFaGs9/VOawHWn+DAdlt3AINvF
 yvJbPQPppHpATpFIIl/QEFq68BO5VUSUiTZqgywVU3yBDALykm9iXewShCUtDRvdr0
 hg6chIwk3zz0A==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VSv120h4Bz6trs;
 Mon, 29 Apr 2024 21:44:38 +0200 (CEST)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <86edaosgkh.fsf@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
 <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
 <87jzkgimzu.fsf@localhost> <86edaosgkh.fsf@HIDDEN>
Date: Mon, 29 Apr 2024 19:45:39 +0000
Message-ID: <87cyq8ar6k.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> AFAIU, calling the change hooks in the middle of quail input is the main
>> culprit of the problems we are discussing here.
>
> The original Quail code inhibits the modification hooks, so this
> cannot be the culprit, can it?

You are right.
The problem here is more like
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51766

Then, I tend to agree with Stefan that the current behavior is not right
- a lot of things are happening during the intermediate Quail input,
including, fontification, for example (and that runs custom Elisp!). I
see not how the transient input
to-be-replaced-by-quail-in-the-near-future can be ignored in such
scenario.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 29 Apr 2024 08:58:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 04:58:26 2024
Received: from localhost ([127.0.0.1]:56006 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1Mq9-00053S-VG
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 04:58:26 -0400
Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]:46267)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1s1Mq7-00053L-Op
 for 70541 <at> debbugs.gnu.org; Mon, 29 Apr 2024 04:58:24 -0400
Received: by mail-lj1-x232.google.com with SMTP id
 38308e7fff4ca-2d858501412so53976901fa.0
 for <70541 <at> debbugs.gnu.org>; Mon, 29 Apr 2024 01:58:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714381077; x=1714985877; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=v0URHLgO854IZ3gT1nU+TdmSxxD1c22fktytn8znxEI=;
 b=F61tghow6TEUj6yirftSBLoEBNS+9k0Ke3O+DOZiw8uMuyYoK3YH+rSclDqkots1cj
 145lsRoN2m9ecAOHE2Mk0rMT2gez0pikh/E0ocRy+IsVecRMesHj+87lQrP+suqy9Pzn
 A/zwLwyqgV4D0cHQ0buSNgcKHWqtKWsLtpXtlNNS2Z3swkJZHX47UKEwBemJDLPSzu0h
 VBhbwoPWgkXEpYJNaDk7tW5dg8B1QjqIfGh16vNSP4T+waYokkx5QIpB7TS7UmNcZrbT
 Vyn3K6HZIVMNHtYiTd8Vm0iOaQe7Zpzter8kAKy2I2Jz3cKUejPSH3HCnJh4dwaZukzm
 MKSA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714381077; x=1714985877;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=v0URHLgO854IZ3gT1nU+TdmSxxD1c22fktytn8znxEI=;
 b=WruvX2Ob8Pq2xbARqBMfoF7mvquVhzAv9SlzXkd0W+nEucR2uwqQxS6WyIu5CUtS9T
 RIYpEvNy8HAKl0hmT3NWMIvNcEbdyE2UmKR6GyQfELLLHwlE0N2D5pqOrrvU2KYD2OSq
 D9mecBkzurNwLNz6gnkAg+XLd7QwVXF2Dlxhh7tJXQjH86jnCNjs+oa2TadbPUTb2Psq
 nFKBOi8AwUkbVle2o6OcOBab85HwELMmqQKMCAyjH5gBwqzb/uTuUCThlZfVqR078vbO
 b3imiJlbz+GW71QHrt8Jbva2j5Ef4epxc90D7Rg+AOClI/Lq+sG7UDMozkevDNCIHeIp
 f+Fg==
X-Forwarded-Encrypted: i=1;
 AJvYcCUi235PsHJox8Z+J254QMzjepTwcB/BwIDvC9A3ofr0NkvgIjXRebh3k/9c09mPLmNghOrliHPaW8N07Ug13tXf+ebd14Q=
X-Gm-Message-State: AOJu0Ywj6gQHRPW2pGw1ofnI9KtHPVjD2XyIBtjPK9csTsolQKm/hkYU
 drlmpU8ucdGwApWb1Rke+tACoGCUMfn3aXgJu/mv1um10690jt0o8bTaKWe8p9Iuk6pRObRzjJl
 FMyVmF9ARwu9mbllU980JpLgvRGA=
X-Google-Smtp-Source: AGHT+IE8+T7Fz/r+BpJMdb26j7rfj/GgFRd8D4Ydt35JyA93Ndpjt7jCJVaH5Rc93yeaxkpHKVyOIV82CAkuQdn87Ow=
X-Received: by 2002:a05:651c:1242:b0:2d3:2ecf:c26a with SMTP id
 h2-20020a05651c124200b002d32ecfc26amr5366262ljh.13.1714381077332; Mon, 29 Apr
 2024 01:57:57 -0700 (PDT)
MIME-Version: 1.0
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
In-Reply-To: <861q6ou2cs.fsf@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Mon, 29 Apr 2024 09:57:45 +0100
Message-ID: <CALDnm53xNOHkMRe-TETBCu49VxzpybiWypCQ79mOa7y1905MKw@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000001fce0306173873de"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000001fce0306173873de
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 29, 2024 at 7:09=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrote:

>
> > 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.  ]
>
> So this is actually a non-issue?
>

FTR I just managed to crash clangd after following the recipe. Eglot
detects the crash and reconnects automatically.  In my book, if Eglot's
misreporting causes a server to crash, it is an issue in Eglot (even
if it's also a server-side issue that a client's misreporting causes a
crash).

Jo=C3=A3o

--0000000000001fce0306173873de
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><span style=3D"font-family:Arial,Helvetic=
a,sans-serif">On Mon, Apr 29, 2024 at 7:09=E2=80=AFAM Eli Zaretskii &lt;<a =
href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:</span><br></div><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
<br>
&gt; It also works correctly with the new code.=C2=A0 The difference is tha=
t we<br>
&gt; report it (notice the `Subject:` says &quot;warning&quot;).<br>
&gt; [ Note also that `track-changes.el` does not warn about it when runnin=
g<br>
&gt;=C2=A0 =C2=A0in a released version of Emacs (see `track-changes-record-=
errors`),<br>
&gt;=C2=A0 =C2=A0because I assume it&#39;s less useful.=C2=A0 ]<br>
<br>
So this is actually a non-issue?<br></blockquote><div>=C2=A0</div><div>FTR =
I just managed to crash clangd after following the recipe. Eglot</div><div>=
detects the crash and reconnects automatically.=C2=A0 In my book, if Eglot&=
#39;s=C2=A0</div><div>misreporting causes a server to crash, it is an issue=
 in Eglot (even=C2=A0</div><div>if=C2=A0<span style=3D"font-family:Arial,He=
lvetica,sans-serif">it&#39;s also a server-side issue that a client&#39;s m=
isreporting causes=C2=A0</span><span style=3D"font-family:Arial,Helvetica,s=
ans-serif">a crash).</span></div><div><span style=3D"font-family:Arial,Helv=
etica,sans-serif"><br></span></div><div><span style=3D"font-family:Arial,He=
lvetica,sans-serif">Jo=C3=A3o</span></div><div>=C2=A0</div></div></div>

--0000000000001fce0306173873de--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 29 Apr 2024 08:45:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 04:45:54 2024
Received: from localhost ([127.0.0.1]:55935 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1Me1-0004qG-Kc
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 04:45:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:38938)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s1Mdy-0004q8-OU
 for 70541 <at> debbugs.gnu.org; Mon, 29 Apr 2024 04:45:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s1MdY-00059w-1q; Mon, 29 Apr 2024 04:45:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=SpqXmEea6rEl1OzSxR3kRLuUDin7Uit1blv9bFevkVU=; b=LJrWThkNHQjrr+KuIuU0
 cMzY8AMHHCXThBYOgrCaszAOsqBLXq+X0GsF/JDImYxs7gCApDJZxDgCgnSrp2CFoLoMeZrq+aoW0
 GanTQLENnt6pz6rk03Z9mhTdHFK9ebBbC2hccV19HIobbktcPwGYk/aLPeRXCoZOmX9iJjdMy0veH
 i0nI7NK4E/eeBzRVYgif2LTFnI17BmQeRcA1gvWlO6B42/aeGhjA7I1hGLJvM5FDCKD5ESQjL4Xf7
 yS3V53oV5x2r7I+xzF3rNmhnDRqWawFMSDo3OXaWZ12XsHfWyuMYrBj8wC2fhb2QCHjYtSsYkXpIB
 weLIU+fUDre+Jg==;
Date: Mon, 29 Apr 2024 11:45:18 +0300
Message-Id: <86edaosgkh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
In-Reply-To: <87jzkgimzu.fsf@localhost> (message from Ihor Radchenko on Mon,
 29 Apr 2024 08:36:37 +0000)
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
 <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
 <87jzkgimzu.fsf@localhost>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN,
 monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ihor Radchenko <yantar92@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>, rcopley@HIDDEN, 70541 <at> debbugs.gnu.org,
>  Stefan Monnier <monnier@HIDDEN>
> Date: Mon, 29 Apr 2024 08:36:37 +0000
> 
> João Távora <joaotavora@HIDDEN> writes:
> 
> > On Mon, Apr 29, 2024 at 7:09 AM Eli Zaretskii <eliz@HIDDEN> wrote:
> >>
> >> initial too-naïve attempts caused elsewhere.
> >>
> >> So I'd very much prefer that Quail signaled to applications that it's
> >> in the middle of handling some complex input, and that applications
> >> which track changes ignored the changes made during this period.
> 
> Would adding `combine-change-calls' to Quail be an option?

I don't think so, since more than a single function is involved
(AFAIU).

> AFAIU, calling the change hooks in the middle of quail input is the main
> culprit of the problems we are discussing here.

The original Quail code inhibits the modification hooks, so this
cannot be the culprit, can it?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 29 Apr 2024 08:36:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 04:36:06 2024
Received: from localhost ([127.0.0.1]:55872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1MUY-0004k7-E3
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 04:36:06 -0400
Received: from mout01.posteo.de ([185.67.36.65]:47425)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1s1MUW-0004jk-4R
 for 70541 <at> debbugs.gnu.org; Mon, 29 Apr 2024 04:36:05 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 5E52C24002A
 for <70541 <at> debbugs.gnu.org>; Mon, 29 Apr 2024 10:35:38 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1714379738; bh=p5qyO7PSNXGFmHzR1LIGaZuBxNDdlxuZal4kgDTwfyQ=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 Content-Transfer-Encoding:From;
 b=DnNLJBfIo508l8FuekcckLS7L1Zi2k/T3+ZyvmwDoPLVYQE54CIHyhQ8xIqKEknvm
 ARWs3IRyeM6EcHDyH8zt+HCPZjMG2eBWIJYF9R3iaUrDZttZMbQGxwQrIb9KdpsIsX
 Qfj/+ofhEU2IHqU21igtxNU53xoR3GVl/tV0XmcEpxicIxzLRRwXvrLSHXc++O4blt
 vBZHJ6m8/dbdG+9+l1DMeuKXXlKkfTAjgslS3998MNnOniLNvSY/arr8ivk+AkBsEq
 BX661FqMu+D96ckrXdf3AcARawESg7F0TzwZP9e/cxE+x2UTalbr/zwWOdIglbSp9i
 JkCVfG4MNfnnA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4VSc940Pcmz9rxV;
 Mon, 29 Apr 2024 10:35:35 +0200 (CEST)
From: Ihor Radchenko <yantar92@HIDDEN>
To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
 <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
Date: Mon, 29 Apr 2024 08:36:37 +0000
Message-ID: <87jzkgimzu.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes:

> On Mon, Apr 29, 2024 at 7:09=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrot=
e:
>>
>> initial too-na=C3=AFve attempts caused elsewhere.
>>
>> So I'd very much prefer that Quail signaled to applications that it's
>> in the middle of handling some complex input, and that applications
>> which track changes ignored the changes made during this period.

Would adding `combine-change-calls' to Quail be an option?
AFAIU, calling the change hooks in the middle of quail input is the main
culprit of the problems we are discussing here.

--=20
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 29 Apr 2024 08:29:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 04:29:28 2024
Received: from localhost ([127.0.0.1]:55844 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1MO8-0004fY-Fw
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 04:29:28 -0400
Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:51665)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1s1MO5-0004fS-Bi
 for 70541 <at> debbugs.gnu.org; Mon, 29 Apr 2024 04:29:26 -0400
Received: by mail-lj1-x22f.google.com with SMTP id
 38308e7fff4ca-2dcc8d10d39so46996711fa.3
 for <70541 <at> debbugs.gnu.org>; Mon, 29 Apr 2024 01:29:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1714379339; x=1714984139; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=UCaOea8COzogmKL4QZiFFp4l0ATLr/aaA0l37HAlxPA=;
 b=Jxhs+GTC7cEF2z+vQDuRNmbdzYO61mxgwxFej2EMkRbiMCBSTthh1ah/hTV5XmQIV3
 R8tzfiOKCy6CgsiOQgCH6STT/w/GjAq3UOWweu5f6smiN94uq847TmPvAFW9RZEeFGeG
 UcIGmmEWpPyVV8bm8XENJck/ZrH2K8TG3alkI98YCe3HURz8AI/yR5tSvZtgDBPuxe+r
 0gK3Bg9IomtoD3V7xMb0vVUjEhxpWDFzvONYDlet9is72IP/efpTsZKjg3gfjMhts/O4
 KrQ2veRjeWTf0vuyqpMxFktOL7TY0G3S5dm6trd3ReQAVElwvVLvmnu1Ihx996SdCVFT
 UT8g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1714379339; x=1714984139;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=UCaOea8COzogmKL4QZiFFp4l0ATLr/aaA0l37HAlxPA=;
 b=iGZCR9hgh1yVBVY82uAU2bkUXG500IOw02eoJmjCDuHh4rVbFwglFbzY3EIbxMse78
 WY+IzfjBF+yOOzCcUQGzQ5apLTHpg/pPL01m97UvFsukwlP7keCiYLulpNI6JrMfpxxc
 jZwigekV04CvyQ70s7/kK9xhm/HggLBx0Bdu0EuNQtf9mSwrUUsaNlLEQkT1kZmEVeF4
 eacsaCuUqfmDMvlleC2hCwBQGYjRBuY3+Aic4eF3w0OfHRAVytWmPmhyb/y0f+o0LbcS
 r99UlZfUIt1b2EYrsHtoX1VSHPVpeQ5f3fxRGqpHHl/Re4kRTdLOuDxKwjKJv7t8Rjkh
 wFww==
X-Forwarded-Encrypted: i=1;
 AJvYcCWgmrWXKdY9+a9tfVPFppEYrtUVNjZEhKyYSLO4p7on4b/Z6crnWiLVTvCRE5L0EYJn8FpHHJJZWd4pWuChEMG8nn+Xuw8=
X-Gm-Message-State: AOJu0YzOlow8Snl+MEEqxFtvSAd8QjH/8BK+/8cZsQGI/xT1bpNFn2U1
 JEhPsu30OWLiKrtGvXt15JxsrXmUP8DGwt6Egc/ZvVxB88JRwDmA82rtUekTAs5j1XvrRlBEMd/
 bYhC8TZWCAr3qZW258s5X6caC7ZI=
X-Google-Smtp-Source: AGHT+IHsduoi4y05G2wicS5t9w8AMS5t9kQZ2OkeumlMRPrDMmZvZaL5HXxoDGBqEzQFCO6TneXVJOzQ0B8vh7s1n6E=
X-Received: by 2002:a2e:8195:0:b0:2dd:8e6d:bf9f with SMTP id
 e21-20020a2e8195000000b002dd8e6dbf9fmr6266166ljg.30.1714379339152; Mon, 29
 Apr 2024 01:28:59 -0700 (PDT)
MIME-Version: 1.0
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> <861q6ou2cs.fsf@HIDDEN>
In-Reply-To: <861q6ou2cs.fsf@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Mon, 29 Apr 2024 09:28:47 +0100
Message-ID: <CALDnm506T1=kiK+gOamEcJXQdVktYYR_uoqwOy=kqq5Ya9S2QQ@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000085440f0617380bae"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000085440f0617380bae
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 29, 2024 at 7:09=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrote:
>
> initial too-na=C3=AFve attempts caused elsewhere.
>
> So I'd very much prefer that Quail signaled to applications that it's
> in the middle of handling some complex input, and that applications
> which track changes ignored the changes made during this period.

This idea is good, if I understand it correctly, though I would
prefer if Eglot interfaced only with track-changes.el, and
it would tell it that it should momentarily halt reports
of changes to the server.

Can someone clarify in a simple example exactly what Eglot tells
the LSP server as someone is inputting something with the Quail.
I need to understand exactly where the "lie" is happening.

Jo=C3=A3o

--00000000000085440f0617380bae
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Mon, Apr 29, 2024 at 7:09=E2=80=AFAM Eli Zaretskii &lt;=
<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br>&gt;<br>&gt;=
 initial too-na=C3=AFve attempts caused elsewhere.<br>&gt;<br>&gt; So I&#39=
;d very much prefer that Quail signaled to applications that it&#39;s<br>&g=
t; in the middle of handling some complex input, and that applications<br>&=
gt; which track changes ignored the changes made during this period.<br><br=
>This idea is good, if I understand it correctly, though I would <br>prefer=
 if Eglot interfaced only with track-changes.el, and <br>it would tell it t=
hat it should momentarily halt reports<br>of changes to the server.<br><br>=
Can someone clarify in a simple example exactly what Eglot tells <br>the LS=
P server as someone is inputting something with the Quail.<br>I need to und=
erstand exactly where the &quot;lie&quot; is happening.<div><br></div><div>=
Jo=C3=A3o</div></div>

--00000000000085440f0617380bae--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 29 Apr 2024 06:10:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 29 02:10:18 2024
Received: from localhost ([127.0.0.1]:55268 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1KDS-000399-1i
	for submit <at> debbugs.gnu.org; Mon, 29 Apr 2024 02:10:18 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47294)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s1KDQ-00038z-8S
 for 70541 <at> debbugs.gnu.org; Mon, 29 Apr 2024 02:10:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s1KD0-0007ST-9o; Mon, 29 Apr 2024 02:09:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=Nr4AYWg+3d/E5R+yLCLqrtVdfbazfQUQLnTTWgBjBeo=; b=pgBlunj6A5f9aWYNPWyh
 r2q2RKF/X8ZKBd/D60xuS0UvlLkptXD5JnW/ZMYQV5VRCX4QvoY55dU42I5NXLY6k2CEvXukjNhpM
 VJmsBQ7YzrVmSGnaWR+y5fK/me6sY+7wYBESkUm3G2ZQpduGJiTF9sRoXE9TkXyBr3lxM7XYXqebD
 vztAee0mpG/4TEXctEP+RiFghJeo+YpXnDR/mg8pyRqk2eptrcbAUsOJXKeaMUbS+KYEt3bidWHGh
 SxKIIc95KeTsHwRpyAnIqv68hlCZKZmIYt56CclvBZXg/uOd/fTZajHsVFVrO7mL6Tppj15N94jhv
 44SRZIwyqd1nrQ==;
Date: Mon, 29 Apr 2024 09:09:23 +0300
Message-Id: <861q6ou2cs.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Sun, 28 Apr 2024 14:21:19 -0400)
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
 <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: rcopley@HIDDEN,  70541 <at> debbugs.gnu.org,  joaotavora@HIDDEN
> Date: Sun, 28 Apr 2024 14:21:19 -0400
> 
> >> 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?

The actual change is the character(s) inserted when the Quail input
function completes its job.  Everything else is ephemeral, and Quail
deletes it as part of its job.  So those insertions followed by
deletions are not meant to change the buffer, and should therefore be
ignored.

> >> > 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.  ]

So this is actually a non-issue?

> >> And how are they going to deal with it?
> > By ignoring the changes performed while that flag is set.
> 
> Define "ignore".

Do nothing and wait for the flag to become reset again.

> The change are there.  `point`, `point-max`, `current-column`,
> etc... are affected.

Why does Eglot need to react to those changes immediately when they
happen?

> >> 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?

For example, we made several changes in Quail and elsewhere to fix the
recording of characters and the related keyboard-macro issues.  It
took quite some effort to get that right and fix all the regressions
the initial too-naïve attempts caused elsewhere.

So I'd very much prefer that Quail signaled to applications that it's
in the middle of handling some complex input, and that applications
which track changes ignored the changes made during this period.

We might already have variables in Quail which could be used as such
flags: quail-translating, quail-converting, quail-current-str, and
quail-guidance-str, to name a few candidates.  Could any of them be
used for this purpose?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 28 Apr 2024 18:21:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 28 14:21:51 2024
Received: from localhost ([127.0.0.1]:51583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s199q-0005CH-Sh
	for submit <at> debbugs.gnu.org; Sun, 28 Apr 2024 14:21:51 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:43719)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1s199o-0005CB-QI
 for 70541 <at> debbugs.gnu.org; Sun, 28 Apr 2024 14:21:49 -0400
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==
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)
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)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <8634ra36ny.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 24 Apr
 2024 22:24:49 +0300")
Message-ID: <jwvbk5tgy09.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
Date: Sun, 28 Apr 2024 14:21:19 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.018 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> 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





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 24 Apr 2024 20:54:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 24 16:53:58 2024
Received: from localhost ([127.0.0.1]:60159 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzjcn-0001j1-Fl
	for submit <at> debbugs.gnu.org; Wed, 24 Apr 2024 16:53:58 -0400
Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:48204)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joaotavora@HIDDEN>) id 1rzjcf-0001gV-Cl
 for 70541 <at> debbugs.gnu.org; Wed, 24 Apr 2024 16:53:49 -0400
Received: by mail-lf1-x12f.google.com with SMTP id
 2adb3069b0e04-51967f75729so298563e87.0
 for <70541 <at> debbugs.gnu.org>; Wed, 24 Apr 2024 13:53:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713992002; x=1714596802; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=ltiFCF6DTXaE/Zh1idBpIGayOGj/zXvIrEQzf1W7YNc=;
 b=mFNdrXPE5h5uckTwRvLuZAjsUSi9RvL9Ja6jyVhDKfPxjUzSJc/NR7oo13uX+7ciHL
 tj/pBIJ2dSjDrxrhplCsgZwWg2DeYloRdI4/EQUP12xAIcOfGlMZIMdkby9M5X5W+tZp
 HduRY8WxOjmTCBrFm91DcPpGi/U0z4nNvQtH5v2Ca49Rh4/M2s5uAbZjfcqb9B2O/gf0
 UFMtRsCnMFjKAHbzVgqBGuElsOtfJjwhQuTTJ6AIe1pnla0ox9s+6QQ9xFsFmJMY/epS
 2LGEmaC1FcHnHmlzRDSoaZ0hglWKw81HOPKAT3k0rzEo9gMRVqbP4HXRUj7U59rZPerg
 UdhQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713992002; x=1714596802;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=ltiFCF6DTXaE/Zh1idBpIGayOGj/zXvIrEQzf1W7YNc=;
 b=ZaVvohb3NWmCs5auRYSQJodAs3NzvqfsbTJuiBXQNpDm/+V7wa/qzkehR8RyegMFyl
 e/mPbNW1TyzUCU8IOLaQrdjmKDAWz4AbV1dQScO+ysyDsO7drIm8wo4P94A/e4cpd9SK
 kC+P0EueckMidtTNcSCJfaZbI06k1Xl32lMCTXIvtKAlZ9G4GYGq5LJJeZ4Ie2k+9aHd
 xYvENIxRuVZGoyuvZto5Lj53g3KB41KTCYl8YI4924a/UlVxIHJAaINwMVW4bjYV+Xwh
 jWwrRZ9Trew3ci77Wb8zRFQ1+gTXvc5pnOuJkuQWfuTTgy/Rvd77xZ3iM0HC7ZDwAXS2
 d5AQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCVGBMrxuhipmdnz7AoNPS/ZXUfaVJ4fJm5dcmillaGF6aPgxPL0W5JVglN+N0d5b221tjaKGTit5iGkhidexw9RtFfz7j4=
X-Gm-Message-State: AOJu0YyGVeXv9+ITUG+cGQgQN5GVBhS9U8yPlkgICdKYc+ABQhfURm+K
 +9H9d96hziBAWg8V36F407tdHpYkX7eIPMzYwDemnaZ81iZjYXGGOX0vbJhYPuigpopDHMGT6I9
 7Ml7zHuKbFI2w/CwFSsQChFXGEEM=
X-Google-Smtp-Source: AGHT+IH4QlrZ15I6j+XUqQ75Rahfb4p6wf5DnOWs0561KGAwzrjbBcc1krWuWsDQ4+Ep0fOya40AuLL1ITChrcY5rxc=
X-Received: by 2002:a19:e01a:0:b0:51a:a400:785e with SMTP id
 x26-20020a19e01a000000b0051aa400785emr2695867lfg.43.1713992001703; Wed, 24
 Apr 2024 13:53:21 -0700 (PDT)
MIME-Version: 1.0
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> <8634ra36ny.fsf@HIDDEN>
In-Reply-To: <8634ra36ny.fsf@HIDDEN>
From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
Date: Wed, 24 Apr 2024 21:53:08 +0100
Message-ID: <CALDnm517AH=cEsyp9a3dqe25rausNxtQgdA9tYmEF-X_pLnh3A@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000068d8740616dddc69"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70541
Cc: Richard Copley <rcopley@HIDDEN>, 70541 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000068d8740616dddc69
Content-Type: text/plain; charset="UTF-8"

On Wed, Apr 24, 2024, 20:24 Eli Zaretskii <eliz@HIDDEN> wrote:

> .
>
> It isn't suddenly, it's because you switched Eglot to the new
> track-changes method, right?  It worked fine before that, with the
> same Quail, right?  Or am I missing something?
>

I haven't much to add to this discussion where I'm being Cc'ed except that
I generally agree with Stefan's stance and fix and that I am fairly sure
this has always a problem before Stefan's track-changes.el framework, only
that we did not know about it because the raw usage eglot.el made of b-c-f
and a-c-f didn't sanity-check anything. You just got subtly wrong server
behaviour because it was being misinformed, and ended up reconnecting to
fix these things.

>
>

--00000000000068d8740616dddc69
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D=
"gmail_attr">On Wed, Apr 24, 2024, 20:24 Eli Zaretskii &lt;<a href=3D"mailt=
o:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l=
eft:1ex">.<br>
<br>
It isn&#39;t suddenly, it&#39;s because you switched Eglot to the new<br>
track-changes method, right?=C2=A0 It worked fine before that, with the<br>
same Quail, right?=C2=A0 Or am I missing something?<br></blockquote></div><=
/div><div dir=3D"auto"><br></div><div dir=3D"auto">I haven&#39;t much to ad=
d to this discussion where I&#39;m being Cc&#39;ed except that I generally =
agree with Stefan&#39;s stance and fix and that I am fairly sure this has a=
lways a problem before Stefan&#39;s track-changes.el framework, only that w=
e did not know about it because the raw usage eglot.el made of b-c-f and a-=
c-f didn&#39;t sanity-check anything. You just got subtly wrong server beha=
viour because it was being misinformed, and ended up reconnecting to fix th=
ese things.=C2=A0</div><div dir=3D"auto"><div class=3D"gmail_quote"><blockq=
uote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc =
solid;padding-left:1ex"><br>
</blockquote></div></div></div>

--00000000000068d8740616dddc69--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 24 Apr 2024 19:25:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 24 15:25:27 2024
Received: from localhost ([127.0.0.1]:60048 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rziFA-00040x-Ih
	for submit <at> debbugs.gnu.org; Wed, 24 Apr 2024 15:25:27 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52480)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rziF5-0003zo-5J
 for 70541 <at> debbugs.gnu.org; Wed, 24 Apr 2024 15:25:23 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rziEf-0003Ab-Rq; Wed, 24 Apr 2024 15:24:54 -0400
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=rmvZ20ttM47Q5B0zPeiiU60TmUGoy0xEFg23Gtt3F/c=; b=Io8Uh4PKGS27
 LDYgDlaq8vL9JOe5o+R8oPYaj36tdBuw5txIIh9DXWJZ6sVnCdzpL1W0Qxt3cV8OEeOlxa33ttpxH
 t09NHCeji2I+X4sKoRJQDXs33wO69VUCGeuAQc+23d0N6FJfwykjDpW9F5DDWp3v0SyGFYgcLHOAO
 gxXln+ACNW7dbBT7axB0S/fOV/znhT04RzdlJQng408mA+DSn8s9V0IUgxHISK9gk/A4ix/3YxvIn
 5WiNOz6PFtXM9x4Y8YQuWdTHkTE/VtO1TI/s9Af9OR9ZqAiAu5KNz0d23HQVqpJgUw1Ins8DsdpqU
 UxLbA+WqrVc68iyDP/tMvw==;
Date: Wed, 24 Apr 2024 22:24:49 +0300
Message-Id: <8634ra36ny.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwva5liwqgn.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Wed, 24 Apr 2024 15:02:47 -0400)
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN> 
 <jwva5liwqgn.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: rcopley@HIDDEN,  70541 <at> debbugs.gnu.org,  joaotavora@HIDDEN
> Date: Wed, 24 Apr 2024 15:02:47 -0400
> 
> > Actually, it's hidden quite well, it's just that Eglot gets confused
> > because it looks at stuff it isn't supposed to see ;-)
> 
> Who's supposed to see it and who isn't?

Those who need to know are supposed to see, the rest aren't ;-)

Seriously, though:

> 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.

> > 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?  It worked fine before that, with the
same Quail, right?  Or am I missing something?

And why "yucky"?  This is the same Quail in all those cases, and the
same track-changes machinery.  So if Quail gets in the way of
track-changes, how about if Quail sets some flag which tells the
application level that changes in progress are to be ignored?  If we
can handle that as part of track-changes, fine; otherwise, Eglot and
the rest that use track-changes will have to ignore that on the
application level.  Doesn't sound yucky to me.

> And how are they going to deal with it?

By ignoring the changes performed while that flag is set.

> The only sane way I can see to deal with it would be for Quail to
> provide a way to temporarily return to the "real" state (e.g. deleting
> the `^`) and then to get back to the temporary state (i.e. re-insert the
> `^`).

Why is it not enough to ignore the changes?

> 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?

> It makes more code normal instead of adding more special code to deal
> with special code, so if that works it's a much nicer option.

Once again: Quail uses with-silent-modifications for a reason.  You
are basically suggesting to ignore that reason, and hwy? because it
makes the solution much easier?  A simpler solution is only preferable
when we know for sure it is correct, and here we are just guessing,
since we don't really have a clear idea what will that cause in other
cases.

> > IOW, why not solve this in Eglot instead?  It's Eglot that makes
> > incorrect assumptions about what happens, so let's teach Eglot how to
> > do better.
> 
> I don't think these are incorrect assumptions because there's not much
> else it could do.  If packages like Eglot can't do their work correctly
> without knowing about Quail, I think it means we have a poor API.

I'm suggesting a way for Quail to tell those applications that it is
in the process of making changes that should be ignored.  If such a
mechanism is possible, I think those applications could DTRT without
much effort.  Or am I missing something?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 24 Apr 2024 19:06:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 24 15:06:16 2024
Received: from localhost ([127.0.0.1]:59959 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzhwb-0000mm-ID
	for submit <at> debbugs.gnu.org; Wed, 24 Apr 2024 15:06:16 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:39743)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1rzhwU-0000kN-Po
 for 70541 <at> debbugs.gnu.org; Wed, 24 Apr 2024 15:06:11 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 52C1A442855;
 Wed, 24 Apr 2024 15:05:43 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1713985541;
 bh=gHEnBWKv5Vnq1xuhPQ/2ZyaG6TtVz+cCWudKD20MasE=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=l0XGiRWDy32QUYLoO6pFJCnZt0tDcPWtAXbwNv3n5NaTLzT+iED+6oQswCqk24yuo
 0cip1D47Z6wzqy8THgBzqGzwPOfvgoqoTPUJuQ2Vb3mIxB0kF2qzjullbEUqkFXr2p
 t3XyFcASTlLwvy92jyCE9vzbproqo5jymPMY4iGljQPX1bvFuszWHk014p+J7DHthN
 WIl+aSbM7shfuDEIC+GVGe3MEy2F13d0w1jXLkVJf0pqXwQT3nHO27Ne8KAt3e2HzO
 HdqlQ3F0SsBZzlRbR8GkcRbAXvF/7klXrG8jX8oTB6Zk3P5z62TNFW2y5G/a4eQhSW
 cuPx8ZJn305gA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D31FD442848;
 Wed, 24 Apr 2024 15:05:41 -0400 (EDT)
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BF868120610;
 Wed, 24 Apr 2024 15:05:41 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <86edau3gyy.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 24 Apr
 2024 18:42:13 +0300")
Message-ID: <jwva5liwqgn.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN> <86edau3gyy.fsf@HIDDEN>
Date: Wed, 24 Apr 2024 15:02:47 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.132 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Actually, it's hidden quite well, it's just that Eglot gets confused
> because it looks at stuff it isn't supposed to see ;-)

Who's supposed to see it and who isn't?
Tree-sitter is told about it, font-lock is told about it, why not others
via the usual mechanism?  What's different about Eglot?

>> Note that when users use Abbrev instead to turn \lambda into =CE=BB, the
>> intermediate steps are not hidden, and that's not been a problem.
> Abbrev cannot guide the user regarding the next steps when an initial
> string typed by user has several possible candidates for further
> input.  So Abbrev basically solves a simpler problem.

When combined with appropriate completion tables and UIs, abbrev also
guide the user, so it's not that different.
Also, I fail to see how that's relevant.

The buffer state is modified by Quail.  It's somewhat temporary but
there's still a lot that can happen during that temporary state.

> 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.  And how are they going to deal with it?

The only sane way I can see to deal with it would be for Quail to
provide a way to temporarily return to the "real" state (e.g. deleting
the `^`) and then to get back to the temporary state (i.e. re-insert the
`^`).

This is pretty ugly in my book, sounds like workarounds on top
of workarounds.  Can we try the patch I suggested first?
It makes more code normal instead of adding more special code to deal
with special code, so if that works it's a much nicer option.

> IOW, why not solve this in Eglot instead?  It's Eglot that makes
> incorrect assumptions about what happens, so let's teach Eglot how to
> do better.

I don't think these are incorrect assumptions because there's not much
else it could do.  If packages like Eglot can't do their work correctly
without knowing about Quail, I think it means we have a poor API.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 24 Apr 2024 15:43:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 24 11:43:15 2024
Received: from localhost ([127.0.0.1]:59056 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzem6-0003yC-V8
	for submit <at> debbugs.gnu.org; Wed, 24 Apr 2024 11:43:15 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42850)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rzelz-0003vg-PE
 for 70541 <at> debbugs.gnu.org; Wed, 24 Apr 2024 11:43:08 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rzeld-0006RI-1l; Wed, 24 Apr 2024 11:42:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=+Kkprf5WgOclVo7F0eCaTv9HyzyBY6ys298sKD2yg5o=; b=RKSwAyGYJrUAMWSxSaYE
 1Z3WMDFBqzCkRGZ/iuUwClzX6yidInebOM0aSKORoZPfxbKl9tpy/cShSS3QZhKFm/twoYo0HR5n2
 Eqyn112gFv2I8Mep3TIEZ8bxn009VzOHVR/6MSF/iwSPG8sTn/HTFbklsslEZhTLLgrDMlkVChvCO
 RkUJfhmSVYlGpIXO0grDgCMXa8YQpf6YAuq+SJkqA0j+YFgRXp8C6HxPjQf6zhuA8ySsY2EQS8AJ0
 Eph2AlmEY2veWFQf4vny5Nt3Loj7fVNmKTRUFvJxoxZn0v5I4QqAFp6mK2iUR+0QFfpmosdJ1Xh1C
 H1d8LcUdpf9KXw==;
Date: Wed, 24 Apr 2024 18:42:13 +0300
Message-Id: <86edau3gyy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvv846q26y.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Wed, 24 Apr 2024 10:26:40 -0400)
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
 <jwvv846q26y.fsf-monnier+emacs@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: rcopley@HIDDEN,  70541 <at> debbugs.gnu.org,  joaotavora@HIDDEN
> Date: Wed, 24 Apr 2024 10:26:40 -0400
> 
> > Are you sure we want buffer-change hooks to be called here?
> 
> Adding/removing chars from the buffer without running those hooks breaks
> all kinds of assumptions.  It can be acceptable to do it in a very
> temporary way, but Quail doesn't do it temporarily: the whole
> redisplay+timers+filters gets run in the middle of the input of any
> multi-key entry like `^a`, so the "temporary" state is very
> much exposed.

It's exposed to some parts of Emacs, but not to others.

> > Quail intentionally hides some of the modifications it does, because
> > it many times replaces the inserted text with something else, and from
> > the Emacs Lisp program's POV only the final input is the actual
> > "insertion" Emacs should know about.
> 
> I'm not sure why it's important to hide the intermediate steps,

Because Quail emulates keyboard input.  Conceptually, everything that
the user types into a buffer that Quail processes and replaces "did
not happen", only the final insertion of the produced character(s) are
real.

> especially since they're not very well hidden (as evidenced by this bug
> report, and by the fact that font-lock is also triggered every time the
> transient display is modified).

Actually, it's hidden quite well, it's just that Eglot gets confused
because it looks at stuff it isn't supposed to see ;-)

> Note that when users use Abbrev instead to turn \lambda into λ, the
> intermediate steps are not hidden, and that's not been a problem.

Abbrev cannot guide the user regarding the next steps when an initial
string typed by user has several possible candidates for further
input.  So Abbrev basically solves a simpler problem.

> > So I'm not sure we should install this, as it could break something
> > elsewhere.  Aren't there any alternatives to this?
> 
> We could change Quail so it refrains from temporarily modifying the
> buffer, using an `after/before-string` on an overlay instead.
> It'd be a fairly significant change in `quail.el` and would probably
> come with its own share of problems.

I'm not at all sure the solution should be in Quail.

> > More generally,
> > why should Eglot care about these low-level details of Quail?
> 
> Because Eglot syncs up with the LSP server via a timer, so it sees the
> buffer with an extra "^" char in it.

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?  IOW, why
not solve this in Eglot instead?  It's Eglot that makes incorrect
assumptions about what happens, so let's teach Eglot how to do better.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 24 Apr 2024 14:27:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 24 10:27:15 2024
Received: from localhost ([127.0.0.1]:58732 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzdaY-0007hO-US
	for submit <at> debbugs.gnu.org; Wed, 24 Apr 2024 10:27:15 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16984)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1rzdaT-0007fK-O7
 for 70541 <at> debbugs.gnu.org; Wed, 24 Apr 2024 10:27:07 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 92F4B80B0E;
 Wed, 24 Apr 2024 10:26:42 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1713968801;
 bh=c0lFAawfONJpcVLUCJdcDU1yRkZUSPcOC5WB9Zb3cqI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=Z8h4PtfJfzDZ/TLNsibo0itRkVwsdTsyxU+BsGxqJhvjEQoWMi0xtBrJ7Ys1Ojey2
 XJIdYb9obm/GwoS//IPDS87gTsEvJmNAQ5rOfa1FYkqGXdhvAh9f5GLeA2Ig5ozkmb
 uKmzPwCrYlc9FeUyVoiFVm2h0uINiMXFIhzXx0dTlpYwuaTBS5XOo7t8MrPzFB+Rtc
 hFhFKhSeVYG6sfhjHEgb+EB9EK00Zcc23hQFLnlUBtpXtK8b68RQuE9/qYCmSLoZKP
 vXjqqzKHz3hmN+pVtGI0aKO8MRcoum6mJ8TfdPIL5RPMCQj/9FuRpv6PJvyvYqLZ4v
 Z4E1+JmT0qQDw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9749B800A0;
 Wed, 24 Apr 2024 10:26:41 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 67CCB1204B3;
 Wed, 24 Apr 2024 10:26:41 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <86ttjr2pzw.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 24 Apr
 2024 10:12:35 +0300")
Message-ID: <jwvv846q26y.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> <86ttjr2pzw.fsf@HIDDEN>
Date: Wed, 24 Apr 2024 10:26:40 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.058 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Are you sure we want buffer-change hooks to be called here?

Adding/removing chars from the buffer without running those hooks breaks
all kinds of assumptions.  It can be acceptable to do it in a very
temporary way, but Quail doesn't do it temporarily: the whole
redisplay+timers+filters gets run in the middle of the input of any
multi-key entry like `^a`, so the "temporary" state is very
much exposed.

> Quail intentionally hides some of the modifications it does, because
> it many times replaces the inserted text with something else, and from
> the Emacs Lisp program's POV only the final input is the actual
> "insertion" Emacs should know about.

I'm not sure why it's important to hide the intermediate steps,
especially since they're not very well hidden (as evidenced by this bug
report, and by the fact that font-lock is also triggered every time the
transient display is modified).

Note that when users use Abbrev instead to turn \lambda into =CE=BB, the
intermediate steps are not hidden, and that's not been a problem.

> So I'm not sure we should install this, as it could break something
> elsewhere.  Aren't there any alternatives to this?

We could change Quail so it refrains from temporarily modifying the
buffer, using an `after/before-string` on an overlay instead.
It'd be a fairly significant change in `quail.el` and would probably
come with its own share of problems.

> More generally,
> why should Eglot care about these low-level details of Quail?

Because Eglot syncs up with the LSP server via a timer, so it sees the
buffer with an extra "^" char in it.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 24 Apr 2024 07:13:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 24 03:13:56 2024
Received: from localhost ([127.0.0.1]:56930 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzWpB-00070B-Da
	for submit <at> debbugs.gnu.org; Wed, 24 Apr 2024 03:13:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46696)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rzWow-0006xE-On
 for 70541 <at> debbugs.gnu.org; Wed, 24 Apr 2024 03:13:43 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rzWoW-0003f1-Ue; Wed, 24 Apr 2024 03:13:09 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=GiHqrLtMDFzhnbZ9M2wFJOFeMObRIM8da5hC21o7P7I=; b=JlGOD5JuW7Mhj8kso9d5
 nMJZde1K2o1z/JH1t4eg5JQP/9KiY12QUpsvYU5bQklsV3TR4O/htsj1N9z7RDlPJArfpMBRElDCq
 gxAO97T2tMi4a9BXXXJebZCs2smDgNdlBuInVBXF1KU4ZXs3dIYlc5mcfT4Slb+vXm+a/aX4u3nL0
 L95dFGmw5iiQdNPAgOqlK9PtUZFVOdF804jcuJeVkytfrfInWmD3LVtZQAIyoMpslreEgEa0uFaA5
 6qkKcU09FsvC1Xs5tHxYxnxJOnhaq5AOxIZhj1GHWuwIZJsx3F/LeEq50wcvc3oxTnUX/fEDkOTwG
 9xFhgVyZM3hcZw==;
Date: Wed, 24 Apr 2024 10:12:35 +0300
Message-Id: <86ttjr2pzw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvttjrqxti.fsf-monnier+emacs@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 <jwvttjrqxti.fsf-monnier+emacs@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: rcopley@HIDDEN, 70541 <at> debbugs.gnu.org, joaotavora@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 70541 <at> debbugs.gnu.org,
>  João Távora <joaotavora@HIDDEN>
> Date: Tue, 23 Apr 2024 23:14:16 -0400
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> The problem is that Quail inserts an underlined `^` in the buffer to
> show you the part of the input that's already been typed and it does so
> stealthily (i.e. within `with-silent-modifications`), which implies that
> the `before/after-change-functions` have not been called, and as
> a consequence the size of the buffer is not the one that track-changes
> expects (and the content of the buffer doesn't corresponds to what Eglot
> will send to the LSP server based on the changes it has witnessed,
> which can cause errors since Eglot has to send buffer positions and
> those may not mean the same any more for the LSP server).
> 
> I suggest the patch below (the second hunk is unrelated, I just bumped
> into it while tracking this bug).

Are you sure we want buffer-change hooks to be called here?  Quail
intentionally hides some of the modifications it does, because it many
times replaces the inserted text with something else, and from the
Emacs Lisp program's POV only the final input is the actual
"insertion" Emacs should know about.

So I'm not sure we should install this, as it could break something
elsewhere.  Aren't there any alternatives to this?  More generally,
why should Eglot care about these low-level details of Quail?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at 70541 <at> debbugs.gnu.org:


Received: (at 70541) by debbugs.gnu.org; 24 Apr 2024 03:15:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 23 23:15:03 2024
Received: from localhost ([127.0.0.1]:55937 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzT62-0002Vb-FU
	for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 23:15:03 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11817)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1rzT5v-0002Sl-8e
 for 70541 <at> debbugs.gnu.org; Tue, 23 Apr 2024 23:14:56 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D0BE4800D0;
 Tue, 23 Apr 2024 23:14:27 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1713928466;
 bh=i1xCb/VS8jpMU5/sL3UBqyrl+ZGFqNLCDy/pVSjiMoU=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=W7wfq4X7krErdpr1PmohpWbOM4Y8T0atrR8UZZLMrdhmBoQc3JCc7y0tA4nOvZRB+
 kxm34UI4BTwnR8lBafYb0+Cj8TGsxLb0ETAfSB7JqroPkcAPPg1UvKfaleuRk93Pa3
 UPXfPuognqZbycwwsQeALswtkSbjFABaK1+kGUoXP391cgtfPRSYn9DjtsWOdkf0Va
 JeQa2SD6UNgA6PtyZJxWCEmv8HgquKffdBk5ZMBhAtXzs06Mru6YqxoFaF54cjX+IC
 fjZ+o2yvRnMtby7/OcFhVgXelD89vEQuiYTpSxRIerUijz4IXuHX/Cq3veclkMIjgY
 XVz/RnVpebOpw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B7FC980191;
 Tue, 23 Apr 2024 23:14:26 -0400 (EDT)
Received: from pastel (unknown [45.72.201.215])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8E4F8120211;
 Tue, 23 Apr 2024 23:14:26 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Richard Copley <rcopley@HIDDEN>
Subject: Re: bug#70541: track-changes-mode logs warnings (with input method,
 in Eglot buffer)
In-Reply-To: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
 (Richard Copley's message of "Tue, 23 Apr 2024 21:44:05 +0100")
Message-ID: <jwvttjrqxti.fsf-monnier+emacs@HIDDEN>
References: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
Date: Tue, 23 Apr 2024 23:14:16 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.058 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70541
Cc: 70541 <at> debbugs.gnu.org,
 =?windows-1252?B?Sm/jbyBU4XZvcmE=?= <joaotavora@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

> * Ensure clangd is on the path
> * Start editing a scratch file like this in C++ mode:
>
> int main() {
>   const char * s =3D "";
> }
>
> * Start Eglot (M-x eglot RET)
> * Enable TeX input method (C-u C-\ TeX RET)
> * Start typing the superscript alphabet into the string (^ a ^ b ^ c ^ d =
...)
>
> How far you get before the warning pops up seems to depend on timing.

To make it reliable, here's what you need to do after enabling the TeX
input method:

    type "quickly"; foo^
    wait a couple seconds

and you should get the=20

     =C2=BB  Warning (emacs): Missing/incorrect calls to =E2=80=98before/af=
ter-change-functions=E2=80=99!!
    Details logged to =E2=80=98track-changes--error-log=E2=80=99

The problem is that Quail inserts an underlined `^` in the buffer to
show you the part of the input that's already been typed and it does so
stealthily (i.e. within `with-silent-modifications`), which implies that
the `before/after-change-functions` have not been called, and as
a consequence the size of the buffer is not the one that track-changes
expects (and the content of the buffer doesn't corresponds to what Eglot
will send to the LSP server based on the changes it has witnessed,
which can cause errors since Eglot has to send buffer positions and
those may not mean the same any more for the LSP server).

I suggest the patch below (the second hunk is unrelated, I just bumped
into it while tracking this bug).


        Stefan

--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=quail.patch

diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 48d2ccb8828..cb7aa89b252 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -1334,9 +1334,13 @@ quail-input-method
     (quail-setup-overlays (quail-conversion-keymap))
     (with-silent-modifications
       (unwind-protect
-	  (let ((input-string (if (quail-conversion-keymap)
+	  (let* (;; `with-silent-modifications' inhibits the modification
+                 ;; hooks, but that's a part of `with-silent-modifications'
+                 ;; we don't actually want here (bug#70541).
+		 (inhibit-modification-hooks nil)
+		 (input-string (if (quail-conversion-keymap)
 				  (quail-start-conversion key)
-				(quail-start-translation key))))
+				  (quail-start-translation key))))
 	    (setq quail-guidance-str "")
 	    (when (and (stringp input-string)
 		       (> (length input-string) 0))
@@ -1871,10 +1875,9 @@ quail-delete-last-char
 
 (defsubst quail-point-in-conversion-region ()
   "Return non-nil value if the point is in conversion region of Quail mode."
-  (let (start pos)
-    (and (setq start (overlay-start quail-conv-overlay))
-	 (>= (setq pos (point)) start)
-	 (<= pos (overlay-end quail-conv-overlay)))))
+  (let ((start (overlay-start quail-conv-overlay)))
+    (and start
+	 (<= start (point) (overlay-end quail-conv-overlay)))))
 
 (defun quail-conversion-backward-char ()
   (interactive)

--=-=-=--





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Apr 2024 20:45:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 23 16:45:03 2024
Received: from localhost ([127.0.0.1]:54225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rzN0e-0002oo-6a
	for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 16:45:02 -0400
Received: from lists.gnu.org ([2001:470:142::17]:52010)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rcopley@HIDDEN>) id 1rzN0a-0002n4-F4
 for submit <at> debbugs.gnu.org; Tue, 23 Apr 2024 16:44:58 -0400
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 <rcopley@HIDDEN>) id 1rzN0E-0000kI-DE
 for bug-gnu-emacs@HIDDEN; Tue, 23 Apr 2024 16:44:34 -0400
Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <rcopley@HIDDEN>) id 1rzN0C-0002k2-Hl
 for bug-gnu-emacs@HIDDEN; Tue, 23 Apr 2024 16:44:34 -0400
Received: by mail-qt1-x829.google.com with SMTP id
 d75a77b69052e-437c32af2efso26750641cf.3
 for <bug-gnu-emacs@HIDDEN>; Tue, 23 Apr 2024 13:44:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1713905071; x=1714509871; darn=gnu.org;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=jpvPxrHtRnesSVAnDEjWmAznkM129cS7V0FaCUvfJ90=;
 b=YlBX1RP96hdRVDL+eJNRbOIzhhw2Gg555EY8C8Zp8HLcRubC5MNACiOFZqFQNzOmAJ
 oxRQDsHhcRJ5Tl7rVmNjiOoMPnxwsPa6CTLPyTB3swlTyIRW0Yezf7AGEmEao/5UZElX
 W6ZQrZa+le+mqG1Dwm5i1/OYVhCrxwfv9QaIojhHnc0HuNI6OFFA8qnqHk23tmC7rgIJ
 G6P/cHIGgfjFdvQYEoIppBqqoZF0MpfNPCHV4vKIxuUXJIy6H9JINeTRT9kUHR8ifbv9
 SHC/veAB9jLHImJYHkG7f4duZ19RHS9kwEDFOlm44MepXBpRQyZPbEIqnduaniCPsBdO
 6xPA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1713905071; x=1714509871;
 h=content-transfer-encoding:cc:to:subject:message-id:date:from
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=jpvPxrHtRnesSVAnDEjWmAznkM129cS7V0FaCUvfJ90=;
 b=P/mP13fg6BUlaXBYoMrZWhJlESflDVvWFjy2wYdhpMAXylxZTBnEmmXfCFTkPsXfEs
 +rb+hLuKbWWaNnU6eG7YPYaL2YvY+W5iCwrGr4+vAFmyy57kVeWLJMOe+Jz0XIuBw0AD
 3mFi0WYDGx44HJoeyehSegO5cU5NkcGSW3w0D/vRjnUnKQT4qtJ3sWZwQpdy9bEKziYp
 EVNCqEb1huqvB4OPXfHMPfvbiN9V/ZtjmOqSq1yaHAyrB3WOuXA6erpKu2sTbZvEWgN3
 CX3Hn1DULhEH6BCxqJ0KyBOKqmjhmV7mDf9MdNbqMY1tI709WdTCpVhsBpljqbc0Qagu
 K/+Q==
X-Gm-Message-State: AOJu0YwsSyahZl+vJRRA9+MXYB4Wg+W8RazmtLlAoBkO32sq8MIwMkg9
 W17Z/tyeXzvrslG7ydqDyWhaJnnZSCiXlNZlqpC38dN6ny2AIYh7Xbg784yDjzDNba1WmR5W3QZ
 ou61wCi19R0d9b7liFDiq9l+Pu3XCVccz
X-Google-Smtp-Source: AGHT+IG+VucoUURNadeuO/aGc2iQueyP/1ZnafMwuOR/Quk54PopXOFPjYmemFrsQ5iDa8v9mcbZu3HPS+rK/Tj7cqk=
X-Received: by 2002:a05:622a:447:b0:436:6340:2dcb with SMTP id
 o7-20020a05622a044700b0043663402dcbmr662355qtx.50.1713905071093; Tue, 23 Apr
 2024 13:44:31 -0700 (PDT)
MIME-Version: 1.0
From: Richard Copley <rcopley@HIDDEN>
Date: Tue, 23 Apr 2024 21:44:05 +0100
Message-ID: <CAPM58ogNB5m8f5Y5DndN-CmRz3yFAkvU6n_6kJW-Pj1r8jh9kA@HIDDEN>
Subject: track-changes-mode logs warnings (with input method, in Eglot buffer)
To: bug-gnu-emacs@HIDDEN, Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2607:f8b0:4864:20::829;
 envelope-from=rcopley@HIDDEN; helo=mail-qt1-x829.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

(Moved here from https://github.com/joaotavora/eglot/discussions/1389)
On master.

The warning:

 =C2=BB  Warning (emacs): Missing/incorrect calls to
=E2=80=98before/after-change-functions=E2=80=99!!
Details logged to =E2=80=98track-changes--error-log=E2=80=99

... is raised, while editing in an Eglot buffer, with an input method.

* Ensure clangd is on the path
* Start editing a scratch file like this in C++ mode:

int main() {
  const char * s =3D "";
}

* Start Eglot (M-x eglot RET)
* Enable TeX input method (C-u C-\ TeX RET)
* Start typing the superscript alphabet into the string (^ a ^ b ^ c ^ d ..=
.)

How far you get before the warning pops up seems to depend on timing.
In a run of this experiment from emacs -Q on master just now, I got as
far as k.

track-changes--error-log value:

((#3=3D"z.cpp"
     ((t track-changes--recover-from-error nil nil)
      (t track-changes-fetch
(#1=3D
 #s(track-changes--tracker :signal
   eglot--track-changes-signal :state
   #s(track-changes--state :beg 50
   :end 1
   :before
   nil :next
   nil)
   :nobefore nil :immediate nil)
 #f(compiled-function (beg end before) #<bytecode
      0xae090d111a>))
nil)
      (t eglot--track-changes-fetch (#1#) nil)
      (t eglot--signal-textDocument/didChange nil nil)
      (t run-hooks (eglot--document-changed-hook) nil)
      (t #2=3D#f(compiled-function () #<bytecode 0x1bb90600ea83b761>)
nil nil)
      (t apply (#2# nil) nil)
      (t timer-event-handler ([t 0 0 500000 nil #2# nil idle 0 nil])
nil))
     [101 #6=3D(nil . self-insert-command) 94 102 #7=3D
 (nil . self-insert-command) 94 103 #8=3D
 (nil . self-insert-command) 94 104 #9=3D
 (nil . self-insert-command) 94 105 #10=3D
 (nil . self-insert-command) 94 106 #11=3D
 (nil . self-insert-command) 94 107
 (nil . self-insert-command)])
 (#3#
  ((t track-changes--recover-from-error nil nil)
   (t track-changes-fetch
      (#1#
       #f(compiled-function (beg end before) #<bytecode 0xae090d111a>))
      nil)
   (t eglot--track-changes-fetch (#1#) nil)
   (t eglot--signal-textDocument/didChange nil nil)
   (t run-hooks (eglot--document-changed-hook) nil)
   (t #5=3D#f(compiled-function () #<bytecode 0x1bb90600ea83b761>) nil
      nil)
   (t apply (#5# nil) nil)
   (t timer-event-handler ([t 0 0 500000 nil #5# nil idle 0 nil]) nil)
   (t read-key-sequence (nil nil nil t) nil)
   (t quail-start-translation (94) nil)
   (t quail-input-method (94) nil))
  [(nil . self-insert-command) 94 101 #6# 94 102 #7# 94 103 #8# 94 104
   #9# 94 105 #10# 94 106 #11# 94]))

Lossage:

 M-x     ;; execute-extended-command
 e     ;; self-insert-command
 g     ;; self-insert-command
 l     ;; self-insert-command
 o     ;; self-insert-command
 t     ;; self-insert-command
 <return>     ;; minibuffer-complete-and-exit
 C-u     ;; universal-argument
 C-\     ;; toggle-input-method
 T     ;; self-insert-command
 e     ;; self-insert-command
 X     ;; self-insert-command
 <return>     ;; minibuffer-complete-and-exit
 C-s     ;; isearch-forward
 "     ;; isearch-printing-char
 <with-input-method> ;; isearch-with-input-method
 <return>     ;; isearch-exit
 ^ a     ;; self-insert-command
 ^ b     ;; self-insert-command
 ^ c     ;; self-insert-command
 ^ d     ;; self-insert-command
 ^ e     ;; self-insert-command
 ^ f     ;; self-insert-command
 ^ g     ;; self-insert-command
 ^ h     ;; self-insert-command
 ^ i     ;; self-insert-command
 ^ j     ;; self-insert-command
 ^ k     ;; self-insert-command
 C-h l     ;; view-lossage

(Stefan notes:

If you want to silence these messages until the problem is fixed, you
can `(setq track-changes-record-errors nil)`.)




Acknowledgement sent to Richard Copley <rcopley@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70541; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 4 May 2024 20:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.