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#72420: set-goal-column misbehaves with a line-prefix and visual-line-mode Date: Thu, 22 Aug 2024 17:33:16 +0300 Message-ID: <86le0osk43.fsf@gnu.org> References: <86cym3wff7.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="15862"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72420@debbugs.gnu.org To: meedstrom@runbox.eu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 22 16:34:40 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sh8tb-000415-QE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Aug 2024 16:34:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sh8tH-0003EF-Io; Thu, 22 Aug 2024 10:34:19 -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 1sh8tF-0003DY-L5 for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2024 10:34:17 -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 1sh8tF-0008G4-BU for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2024 10:34:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=iw1YgrjEwVnDVOd7ePHYQ5vnQSVvbP19r6EaY2/LotY=; b=Y7hM0JEgwNO3xiW+4X0nZWVYpB5TJfod9KXiyyTVsfasnTub5Lhnbivn0QrGPcbno1kfmh2p2GqX7NaoK++9XOQQHPcPy4xnE2VsbgGKCmtrVyIZPTLJ3Sz0OLPrf4AaK2ssKjsV/sP+17XNPvh25y59RmdtwMlq0pusb4KLVESG/gbpVpSKxZBzqXNC8Qu7DunLceoKtfBu1oqcE6b7knDWjnb0NBkcN6vLIiwd1itEYQlAp7XlHaxteIWHeUQmoG0FrcXO156hQp8UmxK5NDo5IX5WDolNn/XLXucZyy3YY+hCrPu9X8c+iq8SdSIwZIFad72YHKMM0viqs7kElA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sh8ty-0004T4-5k for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2024 10:35: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: Thu, 22 Aug 2024 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72420 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 72420-submit@debbugs.gnu.org id=B72420.172433725517108 (code B ref 72420); Thu, 22 Aug 2024 14:35:02 +0000 Original-Received: (at 72420) by debbugs.gnu.org; 22 Aug 2024 14:34:15 +0000 Original-Received: from localhost ([127.0.0.1]:38178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh8tC-0004Rs-D3 for submit@debbugs.gnu.org; Thu, 22 Aug 2024 10:34:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh8t9-0004Rd-SC for 72420@debbugs.gnu.org; Thu, 22 Aug 2024 10:34:13 -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 1sh8sJ-0008DB-IO; Thu, 22 Aug 2024 10:33:19 -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=iw1YgrjEwVnDVOd7ePHYQ5vnQSVvbP19r6EaY2/LotY=; b=StAgPRYZhvP70xAZo5gX Ba7OivDTIvXFYdubA1fbHVFFBFWJ6+sYkfE/EO6TgpscomRrLxe46pwF1VqvlleviPPa7ju54uGMl CdorRajbPhMYFmV5svnjvxS1m3h/FguBFcUflE76l1cDb+UMmSpFQtEUcRy5/aHiRGWLse0UsEMqN eEjY0NVS/fNwRbQ60MEWygIyU4gsnRlb2ha0zN3vM+7z4Yt16P4P3+i3xG/rX02+XTWkwIjTpE7IX OhD5kS353YGDwtROcQBFWXifEk0zKh9bHeu+JtTIZJtqsrzLdIX6Cefg5wF2dWJpMwfR2OPwbVqJa OuW9TNfgTSOG2A==; In-Reply-To: <86cym3wff7.fsf@gnu.org> (message from Eli Zaretskii on Tue, 20 Aug 2024 15:24:12 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290540 Archived-At: > Cc: 72420@debbugs.gnu.org > Date: Tue, 20 Aug 2024 15:24:12 +0300 > From: Eli Zaretskii > > > From: "Martin Edström" > > Date: Tue, 20 Aug 2024 10:28:44 +0200 (CEST) > > > > Can we undo the "notabug" tag on this one? The bug is with visual-line-mode. > > I didn't yet have time to take another look at this, sorry. When I > do, I will consider this aspect. I've now made this test case behave the same both with and without visual-line-mode on the master branch of the Emacs Git repository. The patch is below (you will need to rebuild Emacs for it to be effective, since simple.el is preloaded). diff --git a/lisp/simple.el b/lisp/simple.el index a9f8b58..1d3be2b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -8200,7 +8200,7 @@ line-move-finish ;; Move to the desired column. (if (and line-move-visual - (not (or truncate-lines truncate-partial-width-windows))) + (not (or truncate-lines (truncated-partial-width-window-p)))) ;; Under line-move-visual, goal-column should be ;; interpreted in units of the frame's canonical character ;; width, which is exactly what vertical-motion does.