GNU logs - #76124, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#76124: eglot buffer corruption
Resent-From: Johann =?UTF-8?Q?H=C3=B6chtl?= <johann.hoechtl@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 07 Feb 2025 20:16:02 +0000
Resent-Message-ID: <handler.76124.B.173895933210919 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 76124
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 76124 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.173895933210919
          (code B ref -1); Fri, 07 Feb 2025 20:16:02 +0000
Received: (at submit) by debbugs.gnu.org; 7 Feb 2025 20:15:32 +0000
Received: from localhost ([127.0.0.1]:36696 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tgUl9-0002q2-UE
	for submit <at> debbugs.gnu.org; Fri, 07 Feb 2025 15:15:32 -0500
Received: from lists.gnu.org ([2001:470:142::17]:55580)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <johann.hoechtl@HIDDEN>)
 id 1tgUl4-0002pR-1C
 for submit <at> debbugs.gnu.org; Fri, 07 Feb 2025 15:15:29 -0500
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 <johann.hoechtl@HIDDEN>)
 id 1tgUko-0003IL-3s
 for bug-gnu-emacs@HIDDEN; Fri, 07 Feb 2025 15:15:10 -0500
Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <johann.hoechtl@HIDDEN>)
 id 1tgUkm-0008M7-E6
 for bug-gnu-emacs@HIDDEN; Fri, 07 Feb 2025 15:15:09 -0500
Received: by mail-yw1-x112c.google.com with SMTP id
 00721157ae682-6f6ca3e8cdbso18281137b3.3
 for <bug-gnu-emacs@HIDDEN>; Fri, 07 Feb 2025 12:15:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1738959306; x=1739564106; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=fbmo2o4i+p3K1hqr0zOZvJBb8EF4pTmEtLmUgv1KHPU=;
 b=DDkmGr0CoW3ABVYw03v0WNqc8aR9rJT6kwEe68KLpMcB5/qV9HXopLkEDFN4tXXb/H
 EEl0CEhvH3sM6TVbm6a/yuVGFyKwkIgNfMgLZQopw4tYc9+doY7LZa91VMFNrCRXbEBS
 dr0fdIoiqs4NF++lOxhcKj0me4DOz8wPIP040r5InxfwPO4jNX80smhHWqtGpvmNlHK6
 NjE0IzPVX80vVKUx2sN/6O3ztgEn0yzmKpfLJCOluN4J56Trvi625AsB0vqWlxCKYSFL
 9eSt0VS9TpJmziJ8DTefp0QENKWkh5nzgF/T7ZXGygrDBDW8qNy1by3c1b6/JZBaPLYo
 5kkQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1738959306; x=1739564106;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=fbmo2o4i+p3K1hqr0zOZvJBb8EF4pTmEtLmUgv1KHPU=;
 b=nbFQnsvRQlVCop2Vs/rmyS+wsdngyurIgYF7k9QNnLpB28/M56jzUskEltx2Nufv6T
 tpZV9O91UPYXFkRaUK3JHLyGEWThA2zvXgmKvhQ+L91oo7OI2tMcvX6KJLO/c0TNvkmM
 BiuSoHF6YJp/7wQoZ2dQPfiQ85V711yinTDANusLyVFcHmbtyH6rLrB2/cMD+gGJFVI3
 wyzvneMLAd7q895gv2Xb9ad0FaC2J8kvE7S5VK+oX92QfWh3N1geF5ZYFamzDcbF6Jar
 FPblYiwI8Gmtuxlz0LOVEtps36DvgeEGczhE9SXiPDMTIbPxrk1XSUuw0FIHzNitj6KO
 ytMQ==
X-Gm-Message-State: AOJu0Yz1RsTvpJFp3ZJLq9jr2xkhMVM9euvarY1uhIv9X23UTIxxOz37
 aOqHDVJhkr3oWxC/CMpOHM9cQeEJ6kFVGp7luzVcqwhioL6PnP15bb/Zh/VN46f2aZGLN09xBQ0
 ViSRCQ5He6Xa9nAUOHdVgMdNpQgo/I4s=
X-Gm-Gg: ASbGncu4K9sY3b0CnL67S+L5EcvKG40N8hSEGLc6LAmOQxbAeQNpcn8I48jVfULTwQr
 1MAQo1SUpfgmurBir1iX+j38gU67FpgcwGwtWQR29QpIa8tLP0jtFfSny9XLD7rLmLoKzcye2
X-Google-Smtp-Source: AGHT+IHnYoeBicXT/w22seO3bZCnO1DQNQ/ZB1h6yNSJDiP60tfdJOx+/8gj2nQLUM01hCd6rlHjAU/hI4JmuyRKKm4=
X-Received: by 2002:a05:690c:6283:b0:6f9:b0a6:6a15 with SMTP id
 00721157ae682-6f9b2a0c813mr48389977b3.38.1738959306169; Fri, 07 Feb 2025
 12:15:06 -0800 (PST)
MIME-Version: 1.0
From: Johann =?UTF-8?Q?H=C3=B6chtl?= <johann.hoechtl@HIDDEN>
Date: Fri, 7 Feb 2025 21:14:54 +0100
X-Gm-Features: AWEUYZlejT5yxgddOrVrkBLBqaK_ykMSUfjxESXfAOALjSlVVuORcAluNr6Pm54
Message-ID: <CAH4isRzPLC2ycw7JDy6qA7xOxSaFo-YYWrbfx2-CGT_3J=pnZw@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000b92c25062d930327"
Received-SPF: pass client-ip=2607:f8b0:4864:20::112c;
 envelope-from=johann.hoechtl@HIDDEN; helo=mail-yw1-x112c.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,
 HTML_MESSAGE=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-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 (/)

--000000000000b92c25062d930327
Content-Type: text/plain; charset="UTF-8"

When I edit a markdown file using markdown-mode AND enable eglot in that
buffer, at least one text operation corrupts the buffer.

When I am on an markdown list item:

- some text a
- some text b []  <-point

and press C-c <up> (which swaps the current list item with the preceding
one), the buffers content gets messed up: Parts of the preceding text are
not properly swapped but "bleeds into" the swapped line.

Possibly eglot and the interaction with "track-changes" is at fault: When I
eglot-shutdown, I never see this corruption.

This is not a visual problem: When I check the eglot logs changes
transfered to the language server or save and revert the buffer I see that
the buffer contains garbled text.

Using emacs as of commit 5e12843fa32150d2f18ce21fc6f3ae58732df6a7

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

<div dir=3D"ltr"><div>When I edit a markdown file using markdown-mode AND e=
nable eglot in that buffer, at least one text operation corrupts the buffer=
.<br></div><div><br></div><div>When I am on an markdown list item:<br></div=
><div><br></div><div>- some text a</div><div>- some text b []=C2=A0 &lt;-po=
int<br></div><div><br></div><div>and press C-c &lt;up&gt; (which swaps the =
current list item with the preceding one), the buffers content gets messed =
up: Parts of the preceding text are not properly swapped but &quot;bleeds i=
nto&quot; the swapped line.</div><div><br></div><div>Possibly eglot and the=
 interaction with &quot;track-changes&quot; is at fault: When I eglot-shutd=
own, I never see this corruption.</div><div><br></div><div>This is not a vi=
sual problem: When I check the eglot logs changes transfered to the languag=
e server or save and revert the buffer I see that the buffer contains garbl=
ed text.</div><div><br></div><div>Using emacs as of commit 5e12843fa32150d2=
f18ce21fc6f3ae58732df6a7</div></div>

--000000000000b92c25062d930327--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Johann =?UTF-8?Q?H=C3=B6chtl?= <johann.hoechtl@HIDDEN>
Subject: bug#76124: Acknowledgement (eglot buffer corruption)
Message-ID: <handler.76124.B.173895933210919.ack <at> debbugs.gnu.org>
References: <CAH4isRzPLC2ycw7JDy6qA7xOxSaFo-YYWrbfx2-CGT_3J=pnZw@HIDDEN>
X-Gnu-PR-Message: ack 76124
X-Gnu-PR-Package: emacs
Reply-To: 76124 <at> debbugs.gnu.org
Date: Fri, 07 Feb 2025 20:16:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 76124 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
76124: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76124
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#76124: eglot buffer corruption
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 08 Feb 2025 07:33:02 +0000
Resent-Message-ID: <handler.76124.B76124.173899996120601 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76124
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Johann =?UTF-8?Q?H=C3=B6chtl?= <johann.hoechtl@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Cc: 76124 <at> debbugs.gnu.org
Received: via spool by 76124-submit <at> debbugs.gnu.org id=B76124.173899996120601
          (code B ref 76124); Sat, 08 Feb 2025 07:33:02 +0000
Received: (at 76124) by debbugs.gnu.org; 8 Feb 2025 07:32:41 +0000
Received: from localhost ([127.0.0.1]:38133 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tgfKT-0005MD-29
	for submit <at> debbugs.gnu.org; Sat, 08 Feb 2025 02:32:41 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:57142)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tgfKR-0005Lk-9D
 for 76124 <at> debbugs.gnu.org; Sat, 08 Feb 2025 02:32:39 -0500
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 1tgfKL-0002m8-Bi; Sat, 08 Feb 2025 02:32:33 -0500
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=X1ct4+9dtKTWP8lOT++58lS0hsQWf9dlsLdyH2uqp+s=; b=Ni5x2enfZdFjAzhAFQCG
 /01aoW+uPwLU7xMizHUTOfdUa6qkucKqMQmbR8p2UJiBXFW2SzoaNLJ+ojLJgOBEfKvV2xu/RG2ha
 xWPxvdztgJ1y751n98jGFZTibc3NPgkNR29TJiN5QpkyJLj8eLDp7cHOaPsoPoFlaw+BC3X8Ex5Xi
 zeIEaMerabqxw989HQPqJYHuZSSnyfRS4zBE/HsDCYAeEthizecccqJqMT6TvwwmZHJRJi9AXWt1q
 zFlWLU2UOC2+fdMYZWQIeKWrRU3KkPgCllv/dR2HZI2bUaUDi//G+BgG4ieIphZVitSeQtxvE21UU
 gJ6fMRfz6JFtkw==;
Date: Sat, 08 Feb 2025 09:32:18 +0200
Message-Id: <86ldug51tp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <CAH4isRzPLC2ycw7JDy6qA7xOxSaFo-YYWrbfx2-CGT_3J=pnZw@HIDDEN>
 (message from Johann =?UTF-8?Q?H=C3=B6chtl?= on Fri, 7 Feb 2025 21:14:54
 +0100)
References: <CAH4isRzPLC2ycw7JDy6qA7xOxSaFo-YYWrbfx2-CGT_3J=pnZw@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
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: Johann Höchtl <johann.hoechtl@HIDDEN>
> Date: Fri, 7 Feb 2025 21:14:54 +0100
> 
> When I edit a markdown file using markdown-mode AND enable eglot in that buffer, at least one text
> operation corrupts the buffer.
> 
> When I am on an markdown list item:
> 
> - some text a
> - some text b []  <-point
> 
> and press C-c <up> (which swaps the current list item with the preceding one), the buffers content gets
> messed up: Parts of the preceding text are not properly swapped but "bleeds into" the swapped line.
> 
> Possibly eglot and the interaction with "track-changes" is at fault: When I eglot-shutdown, I never see this
> corruption.

I'm guess the information about the LSP server you are using might be
relevant?

> This is not a visual problem: When I check the eglot logs changes transfered to the language server or save
> and revert the buffer I see that the buffer contains garbled text.

Adding João and Stefan to the discussion.


> Using emacs as of commit 5e12843fa32150d2f18ce21fc6f3ae58732df6a7

Is that from the master branch of the Emacs Git repository?  (Your
report elided all version and configuration information, so it's hard
to tell.)

Thanks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#76124: eglot buffer corruption
Resent-From: Johann =?UTF-8?Q?H=C3=B6chtl?= <johann.hoechtl@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 08 Feb 2025 16:48:02 +0000
Resent-Message-ID: <handler.76124.B76124.173903326612855 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76124
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, 76124 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
Received: via spool by 76124-submit <at> debbugs.gnu.org id=B76124.173903326612855
          (code B ref 76124); Sat, 08 Feb 2025 16:48:02 +0000
Received: (at 76124) by debbugs.gnu.org; 8 Feb 2025 16:47:46 +0000
Received: from localhost ([127.0.0.1]:41196 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tgnzd-0003LH-UU
	for submit <at> debbugs.gnu.org; Sat, 08 Feb 2025 11:47:46 -0500
Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]:56438)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <johann.hoechtl@HIDDEN>)
 id 1tgnza-0003Kz-I6
 for 76124 <at> debbugs.gnu.org; Sat, 08 Feb 2025 11:47:43 -0500
Received: by mail-yb1-xb30.google.com with SMTP id
 3f1490d57ef6-e4419a47887so2384025276.0
 for <76124 <at> debbugs.gnu.org>; Sat, 08 Feb 2025 08:47:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739033257; x=1739638057; 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=bGkgDULhDMMfaaoWxawK/7MoqRB6/p84kF6fAv4TAUg=;
 b=aIYXSmQrD7F4HnAO+HFLpsqxX8syxe0ElPaTAXwLIcoKTxZNyWIpkaSfCkBA2WmIhp
 fuqNUan0HF43HoTfSaJ97axCfguwIxxG1Ic3njLfYv30OzDZBi1By3kLFp4OjD3Jq+Iq
 4nIj7Fr37csDbSZPeT2sGTlKxPj9RqtIRVBWlKXtM9UuRgviOki6UXt0l7b6V35RZk0b
 ksCmbSzopw4tXCeANwcKfeUPTfNQ+iC4ijHYs6y5+3uSD0ywafgzl7QV5LC7wquVdJCS
 h2tih0mTUAEYoVDoFEjrzfWOmLN+RiZYSmODNXz26mYJcgs0ykIqkcm8vBXN0iv2lFV7
 Ov7g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739033257; x=1739638057;
 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=bGkgDULhDMMfaaoWxawK/7MoqRB6/p84kF6fAv4TAUg=;
 b=NFKSwb0auYZt5nr8i2+63FML/cOK3pGv1Rrc7IUriVzAXcT3G1MBH6smSUzwcqdXHs
 BcMqKF6CKa6JweVwUq3sU/gInObmJa2BvcSU6LBqATBVpSYX8sQ+I2bAu6Vi+fesb/nr
 jh486CyaTWYXZgLms2NUwVI5KeHGA90VwsdheN1wqEsRyZXZY1BwNZ1tsr2efgKx2Zq6
 1uChx0jQ5BWLcYbsIzCiRX1U8udiqHPXt+FTHQv96dHLPDDOu+ldWX3ga7ZZWsGxFRIu
 UVMqlytIGWXPZmsC77DQKKxqkx20SWhEab8TQnp6S+JzHy7wCYwrCkA3KmHtB8IL8eWP
 mtNw==
X-Forwarded-Encrypted: i=1;
 AJvYcCVo5HEPSoMmQxnc9PZQ+AQjm6FOMs1y8BtGt+BLBOWwn5PvTFOQPvlyD9Qp2/oACVGyqhwMPg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yw7LsVDlIiEAmdOj5+gDzc4hoD7GcZM1DJsaU3jH0XoJ6le0Orb
 Fk727pIiGxyKqDTyo0mAEhA+KNBBhP7kyfEWMiy2yTeYbXfh4yAzE8FfqQ+TFEvS/+/GIn8JxIO
 2gASAEDOScLRnd15AxV13nt53wg==
X-Gm-Gg: ASbGnctXvy0aC6arKtcZ9OphUcFyz5geEy8tu7XKFxhYXu6tV8FEFjDwJpLP0xbRMAI
 2imAe0xvBvHeC7H7fYl7vOyBD1uhET9BL7yyWwkC4NorPANZozqmNVUZrNi82AM87KfUmwBKK
X-Google-Smtp-Source: AGHT+IGKbxLa6pXx8pNnlvByxn1YlXZaLh2pSs3Tinbu+u7dUo6bDeUmaa/fdCwSvCJunWAjKWqDp1spm9g65kkaIGM=
X-Received: by 2002:a05:690c:6c01:b0:6f9:938a:57af with SMTP id
 00721157ae682-6f9b28c1060mr67975437b3.17.1739033256655; Sat, 08 Feb 2025
 08:47:36 -0800 (PST)
MIME-Version: 1.0
References: <CAH4isRzPLC2ycw7JDy6qA7xOxSaFo-YYWrbfx2-CGT_3J=pnZw@HIDDEN>
 <86ldug51tp.fsf@HIDDEN>
In-Reply-To: <86ldug51tp.fsf@HIDDEN>
From: Johann =?UTF-8?Q?H=C3=B6chtl?= <johann.hoechtl@HIDDEN>
Date: Sat, 8 Feb 2025 17:47:26 +0100
X-Gm-Features: AWEUYZkNV131d1x9LsVBxTPj004qj73XzsloG740owHRGRLduyS4bEglOiMTp_U
Message-ID: <CAH4isRzYruMAe+Ct+Tf3psVT65xs60YEj14D0sZR6CjFRdB3Mw@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000840832062da43b15"
X-Spam-Score: 0.0 (/)
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 (-)

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

Am Sa., 8. Feb. 2025 um 08:32 Uhr schrieb Eli Zaretskii <eliz@HIDDEN>:

> > From: Johann H=C3=B6chtl <johann.hoechtl@HIDDEN>
> > Date: Fri, 7 Feb 2025 21:14:54 +0100
> >
> > When I edit a markdown file using markdown-mode AND enable eglot in tha=
t
> buffer, at least one text
> > operation corrupts the buffer.
> >
> > When I am on an markdown list item:
> >
> > - some text a
> > - some text b []  <-point
> >
> > and press C-c <up> (which swaps the current list item with the precedin=
g
> one), the buffers content gets
> > messed up: Parts of the preceding text are not properly swapped but
> "bleeds into" the swapped line.
> >
> > Possibly eglot and the interaction with "track-changes" is at fault:
> When I eglot-shutdown, I never see this
> > corruption.
>
> I'm guess the information about the LSP server you are using might be
> relevant?
>
>
I also do not know if this is relevant, but it is
https://github.com/mhersson/mpls


> > This is not a visual problem: When I check the eglot logs changes
> transfered to the language server or save
> > and revert the buffer I see that the buffer contains garbled text.
>
> Adding Jo=C3=A3o and Stefan to the discussion.
>
>
> > Using emacs as of commit 5e12843fa32150d2f18ce21fc6f3ae58732df6a7
>
> Is that from the master branch of the Emacs Git repository?  (Your
> report elided all version and configuration information, so it's hard
> to tell.)
>
>

Does emacs-build-description provide enough details? The output is


In GNU Emacs 31.0.50 (build 1, x86_64-w64-mingw32) of 2025-02-02 built
 on fv-az521-368
Repository revision: 5e12843fa32150d2f18ce21fc6f3ae58732df6a7
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.22631
System Description: Microsoft Windows 10 Enterprise (v10.0.2009.22631.4751)

Configured using:
 'configure
 --prefix=3D/d/a/emacs-build/emacs-build/pkg/5e12843-ucrt-x86_64
 'CFLAGS=3D-O2 -fno-semantic-interposition -floop-parallelize-all
 -ftree-parallelize-loops=3D4 -g3 ' --disable-build-details
 --without-dbus --enable-link-time-optimization --enable-build-details
 --with-compress-install --with-small-ja-dic --with-gif --with-gnutls
 --with-harfbuzz --with-jpeg --with-json --with-lcms2 --with-mps
 --with-native-compilation --with-png --with-rsvg --with-tree-sitter
 --with-xml2 --with-xpm --with-zlib --without-cairo --without-tiff'




> Thanks.
>

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

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">Am Sa., 8. Feb.=
 2025 um 08:32=C2=A0Uhr schrieb Eli Zaretskii &lt;<a href=3D"mailto:eliz@gn=
u.org">eliz@HIDDEN</a>&gt;:<br></div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddi=
ng-left:1ex">&gt; From: Johann H=C3=B6chtl &lt;<a href=3D"mailto:johann.hoe=
chtl@HIDDEN" target=3D"_blank">johann.hoechtl@HIDDEN</a>&gt;<br>
&gt; Date: Fri, 7 Feb 2025 21:14:54 +0100<br>
&gt; <br>
&gt; When I edit a markdown file using markdown-mode AND enable eglot in th=
at buffer, at least one text<br>
&gt; operation corrupts the buffer.<br>
&gt; <br>
&gt; When I am on an markdown list item:<br>
&gt; <br>
&gt; - some text a<br>
&gt; - some text b []=C2=A0 &lt;-point<br>
&gt; <br>
&gt; and press C-c &lt;up&gt; (which swaps the current list item with the p=
receding one), the buffers content gets<br>
&gt; messed up: Parts of the preceding text are not properly swapped but &q=
uot;bleeds into&quot; the swapped line.<br>
&gt; <br>
&gt; Possibly eglot and the interaction with &quot;track-changes&quot; is a=
t fault: When I eglot-shutdown, I never see this<br>
&gt; corruption.<br>
<br>
I&#39;m guess the information about the LSP server you are using might be<b=
r>
relevant?<br>
<br></blockquote><div><br></div><div>I also do not know if this is relevant=
, but it is <a href=3D"https://github.com/mhersson/mpls">https://github.com=
/mhersson/mpls</a></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" =
style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa=
dding-left:1ex">
&gt; This is not a visual problem: When I check the eglot logs changes tran=
sfered to the language server or save<br>
&gt; and revert the buffer I see that the buffer contains garbled text.<br>
<br>
Adding Jo=C3=A3o and Stefan to the discussion.<br>
<br>
<br>
&gt; Using emacs as of commit 5e12843fa32150d2f18ce21fc6f3ae58732df6a7<br>
<br>
Is that from the master branch of the Emacs Git repository?=C2=A0 (Your<br>
report elided all version and configuration information, so it&#39;s hard<b=
r>
to tell.)<br>
<br></blockquote><div><br></div><div><br></div><div>Does emacs-build-descri=
ption provide enough details? The output is</div><div></div><div><br></div>=
<div><br>In GNU Emacs 31.0.50 (build 1, x86_64-w64-mingw32) of 2025-02-02 b=
uilt<br>=C2=A0on fv-az521-368<br>Repository revision: 5e12843fa32150d2f18ce=
21fc6f3ae58732df6a7<br>Repository branch: HEAD<br>Windowing system distribu=
tor &#39;Microsoft Corp.&#39;, version 10.0.22631<br>System Description: Mi=
crosoft Windows 10 Enterprise (v10.0.2009.22631.4751)<br><br>Configured usi=
ng:<br>=C2=A0&#39;configure<br>=C2=A0--prefix=3D/d/a/emacs-build/emacs-buil=
d/pkg/5e12843-ucrt-x86_64<br>=C2=A0&#39;CFLAGS=3D-O2 -fno-semantic-interpos=
ition -floop-parallelize-all<br>=C2=A0-ftree-parallelize-loops=3D4 -g3 &#39=
; --disable-build-details<br>=C2=A0--without-dbus --enable-link-time-optimi=
zation --enable-build-details<br>=C2=A0--with-compress-install --with-small=
-ja-dic --with-gif --with-gnutls<br>=C2=A0--with-harfbuzz --with-jpeg --wit=
h-json --with-lcms2 --with-mps<br>=C2=A0--with-native-compilation --with-pn=
g --with-rsvg --with-tree-sitter<br>=C2=A0--with-xml2 --with-xpm --with-zli=
b --without-cairo --without-tiff&#39;<br><br></div><div></div><div><br></di=
v><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks.<br>
</blockquote></div></div>

--000000000000840832062da43b15--




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#76124: eglot buffer corruption
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 08 Feb 2025 17:05:02 +0000
Resent-Message-ID: <handler.76124.B76124.173903428115849 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76124
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Johann =?UTF-8?Q?H=C3=B6chtl?= <johann.hoechtl@HIDDEN>
Cc: joaotavora@HIDDEN, 76124 <at> debbugs.gnu.org, monnier@HIDDEN
Received: via spool by 76124-submit <at> debbugs.gnu.org id=B76124.173903428115849
          (code B ref 76124); Sat, 08 Feb 2025 17:05:02 +0000
Received: (at 76124) by debbugs.gnu.org; 8 Feb 2025 17:04:41 +0000
Received: from localhost ([127.0.0.1]:41217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tgoG0-00047Z-HP
	for submit <at> debbugs.gnu.org; Sat, 08 Feb 2025 12:04:40 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:45832)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tgoFw-00047B-24
 for 76124 <at> debbugs.gnu.org; Sat, 08 Feb 2025 12:04:38 -0500
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 1tgoFq-0006ow-JP; Sat, 08 Feb 2025 12:04:30 -0500
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=u0tTXxDI7BB79YH8Yi4EEr7DmafrPLLH4GhA/NFquMY=; b=Mn4QgRA7Htudr2IJZ5Wj
 XBZ8D6bz2GNwSp2PuGcS5+/DBnIHQaQenf2JBETeCBoeEbZ1I3Szqt5v51BIU1X8e0CVsjMpFQdoE
 0WCZEfQSp+nJGHJ9sj8FzIhLhTs5Kvm0WnNZ+fGzXoVZA0l4VqpDNseB9AeVyiOo0BdYyJR7S7JP9
 fDxYdb5C/duVsbS2jjYwbeeqYapXE8Bd0yBMXpSW5LtH3njarSsReA8KcMMhoR7qQ60MOLq5xcAJJ
 Y0m5jZZc4OEo2qRQhNd3oUGDZR94YG+pomDIFwJsj3KDjU8wGeaoOfG0JnzDBWxtQrY5SGz/KIrlo
 chnGiEYkJsusZw==;
Date: Sat, 08 Feb 2025 19:04:24 +0200
Message-Id: <86pljs1i7b.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <CAH4isRzYruMAe+Ct+Tf3psVT65xs60YEj14D0sZR6CjFRdB3Mw@HIDDEN>
 (message from Johann =?UTF-8?Q?H=C3=B6chtl?= on Sat, 8 Feb 2025 17:47:26
 +0100)
References: <CAH4isRzPLC2ycw7JDy6qA7xOxSaFo-YYWrbfx2-CGT_3J=pnZw@HIDDEN>
 <86ldug51tp.fsf@HIDDEN>
 <CAH4isRzYruMAe+Ct+Tf3psVT65xs60YEj14D0sZR6CjFRdB3Mw@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
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: Johann Höchtl <johann.hoechtl@HIDDEN>
> Date: Sat, 8 Feb 2025 17:47:26 +0100
> Cc: João Távora <joaotavora@HIDDEN>, 
> 	Stefan Monnier <monnier@HIDDEN>, 76124 <at> debbugs.gnu.org
> 
>  I'm guess the information about the LSP server you are using might be
>  relevant?
> 
> I also do not know if this is relevant, but it is https://github.com/mhersson/mpls
>  
>  > This is not a visual problem: When I check the eglot logs changes transfered to the language server
>  or save
>  > and revert the buffer I see that the buffer contains garbled text.
> 
>  Adding João and Stefan to the discussion.
> 
>  > Using emacs as of commit 5e12843fa32150d2f18ce21fc6f3ae58732df6a7
> 
>  Is that from the master branch of the Emacs Git repository?  (Your
>  report elided all version and configuration information, so it's hard
>  to tell.)
> 
> Does emacs-build-description provide enough details?

It does, thanks.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#76124: eglot buffer corruption
Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 08 Feb 2025 19:56:01 +0000
Resent-Message-ID: <handler.76124.B76124.17390445045611 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76124
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Johann =?UTF-8?Q?H=C3=B6chtl?= <johann.hoechtl@HIDDEN>
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>, 76124 <at> debbugs.gnu.org
Received: via spool by 76124-submit <at> debbugs.gnu.org id=B76124.17390445045611
          (code B ref 76124); Sat, 08 Feb 2025 19:56:01 +0000
Received: (at 76124) by debbugs.gnu.org; 8 Feb 2025 19:55:04 +0000
Received: from localhost ([127.0.0.1]:41593 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tgquu-0001SG-8W
	for submit <at> debbugs.gnu.org; Sat, 08 Feb 2025 14:55:04 -0500
Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:44510)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>)
 id 1tgquq-0001RM-Gj
 for 76124 <at> debbugs.gnu.org; Sat, 08 Feb 2025 14:55:02 -0500
Received: by mail-wm1-x32d.google.com with SMTP id
 5b1f17b1804b1-43618283d48so21707365e9.1
 for <76124 <at> debbugs.gnu.org>; Sat, 08 Feb 2025 11:55:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739044494; x=1739649294; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=2XCyi4/mTiyKtdcIW/x34iTq+twPECDmmWaBMnC4iUY=;
 b=CXszGuNvl91+6P0gBJsfaatOJHkeRjHWwKrWrlwSmLx9QRPzBGGINa3G/3DkMnxKqF
 WWPEn7ywpZH7q7lqlT23HgI/5XxNYXSR7Q+9BnU4gBdAkhhsNJtM+67trauGNKFhrAbb
 e0sRm93mJmjQe8nJilB2Xc21wSVymvKllqlrDrTOUpV08h5VnG4rcQR98WWU+cwjaoJe
 P+QweAe8i51mo9PUhrzD7zwKUjBIj1229b721cBd+bh8eZTepzOZQqW57HrghaWBJswC
 Za0PtPeh9HjD5weyHd3KqKaeUdNOAV0DJ/dQhbCoxrmQMW91SodEIty0IRrAdqyIM1kX
 jZlQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739044494; x=1739649294;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=2XCyi4/mTiyKtdcIW/x34iTq+twPECDmmWaBMnC4iUY=;
 b=pfbSZC+16SsCxAqIjge9O+da00u8RnFkSVR1GJk93IkoZl/qIBifwn/0TcvLb8AOEZ
 B01PHuWkb49aHfoIvcSd+fzSFDCvECMxatEh9mC1R7V2R7pNxpGcYKPeabBVPosqNr+H
 VS155yrJQVsAIGhYMs6oF8zFkK0qET9AhBtNBe387xrbvuGcL76xleQXXTu8+47o7UBL
 iLYJpwRzgLmkWXHesFgz1Z3DgLEM9BFJ4EMyoRQEs+VrfGP9TMnzPh3+LTyA8z9rbPHW
 EEBEudmJN+cZK/Y7jVYkZg1QAuAnx/rFEbeT23z797dq0XK8NU94QcpE306cCYGzJfqH
 Sdkg==
X-Forwarded-Encrypted: i=1;
 AJvYcCW8d9RkYJbnIzvI5F4hU2zeEu9GTmGh6yieVuYIwuqyYaqoG/E3LFSZCWVCIAYETmLGlW/mRA==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YxvdBmBDfRclI/kIxsEYFYsr5o1bklDwYrBqaxSqOirqkq+cXmv
 YT6yUGhgn6ehuhJQ0OTVJW08udIMyqpArR+RdsV0BqPBidq5G4edrt1xaQ==
X-Gm-Gg: ASbGnctKCu8dkbTguopt7ZuoLL+Mkdb2Q+UNBvSLjUPVPCu+n6+vJxBTJhcAwGZ04iX
 7Upo60fZQfZkXtIRFJyARutzWIWmqU2GsxbeaGAMckvTtR/k32TlPAh6wd1mJlImvjmb15Qm4E4
 KW5p9SApUnj7BXL6VLY2NZfv4sgTg2n21qEQyjvtIUdZk0xnSZl9LAgz1WCpOll56lvZ2RttVmQ
 mIcG94Yj7+1K+hobfI5Cm/dOhVngZtyYh7BvuWhYbgY4xz1wpMteY6phKOAijiN/mgyo+HitC6u
 nKyU
X-Google-Smtp-Source: AGHT+IGYIiNMFNDXqsZho3dEKThHox/juFJlprgTgrg05NrLjKA6gAWKo7hLNJeM416qDEt8hXDqkw==
X-Received: by 2002:a05:600c:1e0e:b0:436:f3f6:9582 with SMTP id
 5b1f17b1804b1-43924988870mr59174725e9.8.1739044493525; 
 Sat, 08 Feb 2025 11:54:53 -0800 (PST)
Received: from krug ([87.196.73.22]) by smtp.gmail.com with ESMTPSA id
 ffacd0b85a97d-38dcaf3e4bcsm4957458f8f.41.2025.02.08.11.54.50
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 08 Feb 2025 11:54:52 -0800 (PST)
From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
In-Reply-To: <CAH4isRzYruMAe+Ct+Tf3psVT65xs60YEj14D0sZR6CjFRdB3Mw@HIDDEN>
References: <CAH4isRzPLC2ycw7JDy6qA7xOxSaFo-YYWrbfx2-CGT_3J=pnZw@HIDDEN>
 <86ldug51tp.fsf@HIDDEN>
 <CAH4isRzYruMAe+Ct+Tf3psVT65xs60YEj14D0sZR6CjFRdB3Mw@HIDDEN>
Date: Sat, 08 Feb 2025 19:55:03 +0000
Message-ID: <87ikpkgqjs.fsf@HIDDEN>
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-Score: 0.0 (/)
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 (-)

Johann H=C3=B6chtl <johann.hoechtl@HIDDEN> writes:

On Sat, Feb 8, 2025 at 4:47=E2=80=AFPM Johann H=C3=B6chtl <johann.hoechtl@g=
mail.com> wrote:

>> > Possibly eglot and the interaction with "track-changes" is at
>> > fault: When I eglot-shutdown, I never see this corruption.
>> I'm guess the information about the LSP server you are using might be
>> relevant?
> I also do not know if this is relevant, but it is https://github.com/mher=
sson/mpls

It's normally extremely relevant, as the corruption related to
track-changes and before/after change functions (which you hint at) is
directly dependent on whether the server accepts partial updates or not.

>> > Using emacs as of commit 5e12843fa32150d2f18ce21fc6f3ae58732df6a7
>> Is that from the master branch of the Emacs Git repository? =C2=A0(Your
>> report elided all version and configuration information, so it's hard
>> to tell.)

(Indeed, I don't see this commit anywhere.  What branch is this?)

Anyway, as to the problem itself, I've reproduced it.

TL/DR: Something in Eglot is making transpose-regions not work correctly
in file-less buffers.

Reproduction:=20

It's kind of a fugitive bug, so here's the recipe:

- ensure you have a markdown LSP installed (marksman was easy to do)

- emacs -Q -f package-initialize /tmp/doesntexist.md -f eglot

  'package-initialize' is necessary to somehow bring in markdown.el,
  which isn't a part of Emacs.

- enter this text (disregarding this email's alignment)

  * one
    two
  * three
    four

Place text on first line and type C-c <down>, which invokes
'markdown-move-down'.  The window will scroll, when you scroll up,
you'll see the corruption.  The buffer becomes

  * three
  \@ four
  * one  four

Some notes:

- Doesn't seem to happen in file-supported buffers.

- I used the https://github.com/artempyanykh/marksman server

- track-changes.el is _not_ to blame since the most recent version of
  Eglot I'm using no longer uses that library.

- The 'marksman' server does _not_ use incremental updates, it always
  sends the full buffer text on every didChange update.

- Therefore, this is not the "normal" LSP update-related corruption
  issue.  (for context, in those issues what you see is that the server
  has a skewed image of what exactly is in the buffer, so it misses
  everything).

- I've not been able to reproduce it without Eglot.  So it seems to be
  somewhat related indeed.  It's as if Eglot and the
  'markdown-mode-down' function clashed for some reason.

- Very often, even in file-less buffers, the bug goes away and the C-c
  <up/down> switch works fine, even in Eglot.  I think actually saving
  the buffer into a file does it.

- Part of the garbled text is always invalid character NULL, which Emacs
  renders as ^@, I think.

- The problem happens simplify if you evaluate:

     (transpose-regions 1 12 13 27 nil)

  in that buffer text (the one, two... example.).

- You can also set marks on the regions and call transpose-regions
  interactively. So maybe that particular markdown.el function isn't to
  blame, but buffer settings done by 'markdown-mode' may still be.

- That's all I had time for.





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#76124: eglot buffer corruption
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 22 Feb 2025 09:26:03 +0000
Resent-Message-ID: <handler.76124.B76124.174021631313780 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76124
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: monnier@HIDDEN, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>
Cc: johann.hoechtl@HIDDEN, 76124 <at> debbugs.gnu.org
Received: via spool by 76124-submit <at> debbugs.gnu.org id=B76124.174021631313780
          (code B ref 76124); Sat, 22 Feb 2025 09:26:03 +0000
Received: (at 76124) by debbugs.gnu.org; 22 Feb 2025 09:25:13 +0000
Received: from localhost ([127.0.0.1]:47451 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tlll0-0003Zi-P3
	for submit <at> debbugs.gnu.org; Sat, 22 Feb 2025 04:25:12 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:40376)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tllky-0003UV-6P
 for 76124 <at> debbugs.gnu.org; Sat, 22 Feb 2025 04:25:09 -0500
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 1tllks-0004NL-Jp; Sat, 22 Feb 2025 04:25:02 -0500
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=aVEzaH/p9Cc8fCAagpW2+K3eI3+mcgTsqL77SR/f7Lk=; b=U3vx03jnm3GNtStHI1ic
 Yrv5MSkQ6yqFV9CaQUeP24r4syAEo/xwx20CwTgOw6434gqzlwHAWqi9sH/w/Xh2dl4j2sUpdqNTe
 OgShgTpGuQmmi9RxZgYGOgkKhBjSaMTSmHY+U0C4NxuL0VuyPDGKYVJDAo5NTWGl2SDj2g+6AgzvD
 gFS1aS5N9o5RKhMHWQMkBzf/LHBY1Wx5SVBgr0KYc4ndkDkEXS4skeqfxyvbxYEnwkwKiUydU7Hff
 ewX/G8eyE0Ww+75sDuDV77JfiMeyRT4AOk5v509w2/pUHOdkZ/FvQsw9i33XU1cIMFkXJIpe88xcO
 VfGkm+D2gvCEWQ==;
Date: Sat, 22 Feb 2025 11:25:00 +0200
Message-Id: <86y0xyjpqr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87ikpkgqjs.fsf@HIDDEN> (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Sat, 08 Feb 2025 19:55:03 +0000)
References: <CAH4isRzPLC2ycw7JDy6qA7xOxSaFo-YYWrbfx2-CGT_3J=pnZw@HIDDEN>
 <86ldug51tp.fsf@HIDDEN>
 <CAH4isRzYruMAe+Ct+Tf3psVT65xs60YEj14D0sZR6CjFRdB3Mw@HIDDEN>
 <87ikpkgqjs.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
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 (---)

Stefan, any comments?

> From: João Távora <joaotavora@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>,  Stefan Monnier
>  <monnier@HIDDEN>,  76124 <at> debbugs.gnu.org
> Date: Sat, 08 Feb 2025 19:55:03 +0000
> 
> Johann Höchtl <johann.hoechtl@HIDDEN> writes:
> 
> On Sat, Feb 8, 2025 at 4:47 PM Johann Höchtl <johann.hoechtl@HIDDEN> wrote:
> 
> >> > Possibly eglot and the interaction with "track-changes" is at
> >> > fault: When I eglot-shutdown, I never see this corruption.
> >> I'm guess the information about the LSP server you are using might be
> >> relevant?
> > I also do not know if this is relevant, but it is https://github.com/mhersson/mpls
> 
> It's normally extremely relevant, as the corruption related to
> track-changes and before/after change functions (which you hint at) is
> directly dependent on whether the server accepts partial updates or not.
> 
> >> > Using emacs as of commit 5e12843fa32150d2f18ce21fc6f3ae58732df6a7
> >> Is that from the master branch of the Emacs Git repository?  (Your
> >> report elided all version and configuration information, so it's hard
> >> to tell.)
> 
> (Indeed, I don't see this commit anywhere.  What branch is this?)
> 
> Anyway, as to the problem itself, I've reproduced it.
> 
> TL/DR: Something in Eglot is making transpose-regions not work correctly
> in file-less buffers.
> 
> Reproduction: 
> 
> It's kind of a fugitive bug, so here's the recipe:
> 
> - ensure you have a markdown LSP installed (marksman was easy to do)
> 
> - emacs -Q -f package-initialize /tmp/doesntexist.md -f eglot
> 
>   'package-initialize' is necessary to somehow bring in markdown.el,
>   which isn't a part of Emacs.
> 
> - enter this text (disregarding this email's alignment)
> 
>   * one
>     two
>   * three
>     four
> 
> Place text on first line and type C-c <down>, which invokes
> 'markdown-move-down'.  The window will scroll, when you scroll up,
> you'll see the corruption.  The buffer becomes
> 
>   * three
>   \@ four
>   * one  four
> 
> Some notes:
> 
> - Doesn't seem to happen in file-supported buffers.
> 
> - I used the https://github.com/artempyanykh/marksman server
> 
> - track-changes.el is _not_ to blame since the most recent version of
>   Eglot I'm using no longer uses that library.
> 
> - The 'marksman' server does _not_ use incremental updates, it always
>   sends the full buffer text on every didChange update.
> 
> - Therefore, this is not the "normal" LSP update-related corruption
>   issue.  (for context, in those issues what you see is that the server
>   has a skewed image of what exactly is in the buffer, so it misses
>   everything).
> 
> - I've not been able to reproduce it without Eglot.  So it seems to be
>   somewhat related indeed.  It's as if Eglot and the
>   'markdown-mode-down' function clashed for some reason.
> 
> - Very often, even in file-less buffers, the bug goes away and the C-c
>   <up/down> switch works fine, even in Eglot.  I think actually saving
>   the buffer into a file does it.
> 
> - Part of the garbled text is always invalid character NULL, which Emacs
>   renders as ^@, I think.
> 
> - The problem happens simplify if you evaluate:
> 
>      (transpose-regions 1 12 13 27 nil)
> 
>   in that buffer text (the one, two... example.).
> 
> - You can also set marks on the regions and call transpose-regions
>   interactively. So maybe that particular markdown.el function isn't to
>   blame, but buffer settings done by 'markdown-mode' may still be.
> 
> - That's all I had time for.
> 
> 




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#76124: eglot buffer corruption
Resent-From: Stefan Monnier <monnier@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 23 Feb 2025 05:39:01 +0000
Resent-Message-ID: <handler.76124.B76124.17402890885363 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76124
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: johann.hoechtl@HIDDEN, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN>, 76124 <at> debbugs.gnu.org
Received: via spool by 76124-submit <at> debbugs.gnu.org id=B76124.17402890885363
          (code B ref 76124); Sun, 23 Feb 2025 05:39:01 +0000
Received: (at 76124) by debbugs.gnu.org; 23 Feb 2025 05:38:08 +0000
Received: from localhost ([127.0.0.1]:58832 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tm4gp-0001OR-LT
	for submit <at> debbugs.gnu.org; Sun, 23 Feb 2025 00:38:07 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26333)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tm4gl-0001Nm-Qw
 for 76124 <at> debbugs.gnu.org; Sun, 23 Feb 2025 00:38:05 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 02A1D808F0;
 Sun, 23 Feb 2025 00:37:57 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1740289076;
 bh=G6zrpf5+cmm+rvFEu5t9UIxWKD37tRymz305K9PEfiY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=Z4LHtmvR6hu3G2fQGS2UvJA1vnZZNftgbXkuUZWjitaXThjv5grrO2KytHl3zBLF6
 tfskRd5XPMHkANpsCkzqPaYfy8+KK4ZIkdcVSg7qlJta31TzZ7PK07Re3QUet4x2xw
 5SKOSbdwojtSSqx4FQ5PEZ9hdLBxGLsLNiYO52nTSf+U2iJdOXYulp1kII9TCD+1Wg
 TpCbPKav2i+X+A1tix9QZO1ysZYU7N+HlFyGYnTn1zvMwToaulKZsU5tlfWpngfaYA
 ggvv7ZBK8PyOhyD9lYTh1MrWN0XJpAYzlqZURgXkz1p6lgBhaMTLbydg7Dbisc23lQ
 Vk5MiP0keOIHA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 13625801B7;
 Sun, 23 Feb 2025 00:37:56 -0500 (EST)
Received: from pastel (unknown [104.247.242.5])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BDA5012028D;
 Sun, 23 Feb 2025 00:37:55 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <86y0xyjpqr.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 22 Feb
 2025 11:25:00 +0200")
Message-ID: <jwvcyf9rzvn.fsf-monnier+emacs@HIDDEN>
References: <CAH4isRzPLC2ycw7JDy6qA7xOxSaFo-YYWrbfx2-CGT_3J=pnZw@HIDDEN>
 <86ldug51tp.fsf@HIDDEN>
 <CAH4isRzYruMAe+Ct+Tf3psVT65xs60YEj14D0sZR6CjFRdB3Mw@HIDDEN>
 <87ikpkgqjs.fsf@HIDDEN> <86y0xyjpqr.fsf@HIDDEN>
Date: Sun, 23 Feb 2025 00:37:46 -0500
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.234 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-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 (---)

>> Place text on first line and type C-c <down>, which invokes
>> 'markdown-move-down'.  The window will scroll, when you scroll up,
>> you'll see the corruption.  The buffer becomes
>>=20
>>   * three
>>   \@ four
>>   * one  four

This is very weird.  If at least the NUL byte was between the transposed
regions, but in the middle of one of the two?

>> - The problem happens simplify if you evaluate:
>>
>>      (transpose-regions 1 12 13 27 nil)
>>
>>   in that buffer text (the one, two... example.).

FWIW, I took a look at `transpose-regions` in case there was something
fishy in it.  I saw a problem with handling of text-properties in an
unrelated corner case (fixed on `master`), but nothing that would
explain the above.  =F0=9F=99=81

>> - That's all I had time for.

Same here for now,


        Stefan






Last modified: Sun, 23 Feb 2025 05:45:02 UTC

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