From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#54488: 29.0.50; move-to-column/overlay-related regression in latest master, perhaps 28? Date: Wed, 23 Mar 2022 05:29:31 +0200 Message-ID: <83pmmde484.fsf@gnu.org> References: <87bkxzdccp.fsf@gmail.com> <831qyvfpv4.fsf@gnu.org> <83fsnbfd72.fsf@gnu.org> <8735jbc6gj.fsf@gmail.com> <6095582d-7065-8089-e8c7-857f070f8ce2@yandex.ru> <87y212b9nt.fsf@gmail.com> <83a6difahu.fsf@gnu.org> <835yo6f5tu.fsf@gnu.org> <834k3qf48k.fsf@gnu.org> <87r16uavhm.fsf@gmail.com> <83zglidnbs.fsf@gnu.org> <83y212dj2w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15946"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54488@debbugs.gnu.org, dgutov@yandex.ru To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 23 04:31:53 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nWriz-00041F-2n for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Mar 2022 04:31:53 +0100 Original-Received: from localhost ([::1]:45492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWrix-0004wJ-Ob for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Mar 2022 23:31:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWriA-00043J-KA for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2022 23:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWriA-00048p-Bf for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2022 23:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nWriA-0003CH-70 for bug-gnu-emacs@gnu.org; Tue, 22 Mar 2022 23:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Mar 2022 03:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54488 X-GNU-PR-Package: emacs Original-Received: via spool by 54488-submit@debbugs.gnu.org id=B54488.16480062038259 (code B ref 54488); Wed, 23 Mar 2022 03:31:02 +0000 Original-Received: (at 54488) by debbugs.gnu.org; 23 Mar 2022 03:30:03 +0000 Original-Received: from localhost ([127.0.0.1]:42379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWrhC-00028u-AZ for submit@debbugs.gnu.org; Tue, 22 Mar 2022 23:30:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWrhA-00028I-2d for 54488@debbugs.gnu.org; Tue, 22 Mar 2022 23:30:00 -0400 Original-Received: from [2001:470:142:3::e] (port=57068 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWrgt-0003kN-UK; Tue, 22 Mar 2022 23:29:54 -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=kt/MRf8ID/f2hPYy0ufAJby2ASm6abEKXaXRXa6zgFc=; b=Xf7tIJNiX3NYrjqoutio JHopmZhIoFSw0pKOuj3OqBZpvYLhjWynliAv4C9hScPxZH9RAwpZFx8uadUSCUTBjPnk9iqUUw8vd 3PXmrOpKBInerqItdc+CX4BjrM1lNbLc5KesnEb2G3dJvTV2nLC/wwvtfG4y5e/5kdJMW4/7y4CeG M28KZwen22qw7pOhg2/kr0DPD+1ukVQZItUPFeqm8ldWH+cdrAYdQCYuV7xa8uiR0ZIvcpLcC+s0t PNvwigER6Cs7tuhtVij8fDsgKpbeCFwkoNd0XphzfINQg5lUVu8h5zq1Y3gxBWJ3wCRZTqSsHbaKs frMHRDemjt7ZEg==; Original-Received: from [87.69.77.57] (port=4484 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWrgt-0003J6-8I; Tue, 22 Mar 2022 23:29:43 -0400 In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Tue, 22 Mar 2022 21:05:09 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:228789 Archived-At: > From: João Távora > Date: Tue, 22 Mar 2022 21:05:09 +0000 > Cc: Dmitry Gutov , 54488@debbugs.gnu.org > > > > do (condition-case eob-err > > > (forward-char (/ (if (> diff 0) (1+ diff) (1- diff)) 2)) > > > (end-of-buffer (cl-return eob-err)))))) > > I don't see how this could cause the problem you describe, but please > note that encode-coding-region generally changes the text in the > region, so maybe what you consider to be outside the restriction > isn't? > > I passed it t as the last argument, so it should be non-destructive to the buffer. But you do that in a loop AFAIU, so one iteration could affect the next ones. But I'm just hand-waving here. > Anyway, do you have an example of text in which this function causes > point to return such problematic values? > > The only example I have is the one I described already, as best as I could. A user reported it to me, i installed > clangd, and I reproduced it very easily. > > If you could consider installing clangd then running that ready-to-use recipe, I'd venture to say it's the easiest > way for you to understand the problem. Sorry, not going to happen. And I don't see why that would be necessary: the problem happens entirely in Emacs Lisp, so the only thing we need from clangd is its output that Emacs uses. Can't you or someone collect that and include it in the recipe? > > Why do you have to use move-to-column instead of forward-char? > > > > I don't remember! Is it exactly equivalent if you're standing in the beginning of the line? > > Yes, if you have only text in the buffer (no images etc.). > > Hmmm, it's interesting. Maybe I should just switch to that. Seems to fix it. Until someone adds images to the > source code i suppose. What's your "etc"? Any "display element" that is not text, like xwidgets.