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#64988: 30.0.50; move-to-column can move across lines if there is a text with display property Date: Tue, 01 Aug 2023 16:26:57 +0300 Message-ID: <83jzue28ri.fsf@gnu.org> References: <5fc075c6-c94b-eacf-6bbd-7d337caa2ee7@gmail.com> <83o7jr0x0v.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13262"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64988@debbugs.gnu.org To: "Herman, Geza" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 01 15:28:18 2023 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 1qQpQA-0003CN-II for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Aug 2023 15:28:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQpPv-0002JI-Sv; Tue, 01 Aug 2023 09:28:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQpPu-0002J4-Kz for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 09:28:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQpPu-0007ug-E4 for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 09:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qQpPt-0004V1-WA for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 09:28: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: Tue, 01 Aug 2023 13:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64988 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix Original-Received: via spool by 64988-submit@debbugs.gnu.org id=B64988.169089642217227 (code B ref 64988); Tue, 01 Aug 2023 13:28:01 +0000 Original-Received: (at 64988) by debbugs.gnu.org; 1 Aug 2023 13:27:02 +0000 Original-Received: from localhost ([127.0.0.1]:47408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQpOw-0004Tn-Bw for submit@debbugs.gnu.org; Tue, 01 Aug 2023 09:27:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQpOr-0004TQ-9Y for 64988@debbugs.gnu.org; Tue, 01 Aug 2023 09:27:01 -0400 Original-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 ) id 1qQpOm-0006yD-2c; Tue, 01 Aug 2023 09:26:52 -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=o3i5InbInfJGHSQ35hM9BQnemadmmwJT4Hog6M7fn6U=; b=EeMgVZY21Xy4 OiQubrX5ltGD50mWsepLq1KIv2W7wlgwpwW5fkKOMqN9BO41swayiT0qmN3xqH2Crg48T2CZ2oNDu ff9dbTKIagG8cQiJr+mbbcrUeV21xfS4TzkVogYH2VfwDLhhB5DhwoNGgpbo9nTEAokpgccL5wBSw exlSQi6d3ZISaOgw7i7K0gGszgMfLRwMeGXfgDfGyE5WDSjCrB3NOgy/CFMiMylBkMOK73Kr4a7at fXD4B62ZuXj8CD4/ss7jDJTeQb88WwZmLOWAghTtcSnq+tNHtHYXVYwMFtSlZkccvbpq/Va3zlt1G gflJSXDcpWiOMfKJdSzxXA==; Original-Received: from [87.69.77.57] (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 1qQpOl-0004J2-HU; Tue, 01 Aug 2023 09:26:51 -0400 In-Reply-To: (geza.herman@gmail.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266451 Archived-At: > Date: Tue, 1 Aug 2023 14:57:29 +0200 > Cc: 64988@debbugs.gnu.org > From: "Herman, Geza" > > I think, in my case, the move-to-column should completely ignore the > display property. Is there a function which does that? > > I noticed this problem because how indent-bars interacts with > column-enforce-mode (https://github.com/jordonbiondo/column-enforce-mode). > > column-enforce-mode uses move-to-column to mark long lines. And because > the display property with "\n" basically joins neighboring lines, > column-enforce-mode marks lines incorrectly. > > I think it should only consider what's in the buffer, and ignore all > rendering related properties. Is there a way to accomplish this? Copy text into a temporary buffer, remove 'display' properties, call move-to-column there, then move to the same position in the original buffer? > Regarding how to fix this problem: wouldn't it make sense to stop > calculating the width at the first "\n" in the displayed string? Stop calculating and do what? move-to-column doesn't just calculate, it should move point to some place. Where do you want to move point in these cases? > At least, it would fix this problem, as far as I understand. Not > sure if it breaks anything. But supposedly nothing should depend on > the exact behavior of column calculations, if the displayed string > contains characters after the first "\n" (because it's kind of > undefined what the width of a multi-line string is) When the current line is shorter than N columns, move-to-column with the argument of N should stop at the end of the line. But it's impossible to do that when the newline comes from a display property. So the correct behavior is not "undefined" in this case, it is just impossible to achieve.