From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Martin Edstrom" Newsgroups: gmane.emacs.bugs Subject: bug#72420: set-goal-column misbehaves with a line-prefix and visual-line-mode Date: Wed, 07 Aug 2024 16:53:53 +0200 (CEST) Message-ID: References: <86cymosmh6.fsf@gnu.org> <86mslooav5.fsf@gnu.org> <865xsco783.fsf@gnu.org> <8634ngo18w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2560"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72420 <72420@debbugs.gnu.org> To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 07 16:55:59 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 1sbi4z-0000R8-Ou for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Aug 2024 16:55:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbi4h-0002le-AC; Wed, 07 Aug 2024 10:55:39 -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 1sbi4f-0002kw-DE for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2024 10:55:37 -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 1sbi4f-00080i-4W for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2024 10:55:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:References:Date:From:MIME-Version:To:Subject; bh=4notE47JTd0hPIfsf50N7Mz+TcrL0hF/l++nn3n7hBQ=; b=Fkh3GpcrD9QuZrtZ71SwEa2wbDR+s/gWaQWLtjURVWOzoEvTnTwMdmJk34cHJI3/dYo6BzMS/Xfzzc6UPXmqAkKpSAcLwqHY2m9HS8R66SXpfpwSojLymBvEkj32HufF5pYr1N6LpI0lC54qdwkLNQqNY4piENInjWyhvW7hTiBNVnRaTlbk13oqfxOBPhxNZ4zIS9jJTc8WqGQuhvA19aE1XbCl6vH0/q4QlZ1PoY52xKek3msJCAOr+o9uT+/ec/hh0XAdBa4LN/6S0pZWzBi9/psR/B5YpUErzqaNtRT/M6clf9HbTEHXKx0JAv8szLJUfoYiMDKJyHLOSYjNlQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sbi54-0000vj-C5 for bug-gnu-emacs@gnu.org; Wed, 07 Aug 2024 10:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Martin Edstrom" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Aug 2024 14:56: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.17230425503539 (code B ref 72420); Wed, 07 Aug 2024 14:56:02 +0000 Original-Received: (at 72420) by debbugs.gnu.org; 7 Aug 2024 14:55:50 +0000 Original-Received: from localhost ([127.0.0.1]:34886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbi4r-0000ut-GB for submit@debbugs.gnu.org; Wed, 07 Aug 2024 10:55:50 -0400 Original-Received: from mailtransmit04.runbox.com ([185.226.149.37]:58696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbi3i-0000s4-3D for 72420@debbugs.gnu.org; Wed, 07 Aug 2024 10:54:39 -0400 Original-Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1sbi3B-00G3Rk-Qy; Wed, 07 Aug 2024 16:54:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.eu; s=selector1; h=Message-Id:In-Reply-To:References:Date:Subject:CC:To:From: MIME-Version:Content-Transfer-Encoding:Content-Type; bh=4notE47JTd0hPIfsf50N7Mz+TcrL0hF/l++nn3n7hBQ=; b=OjQKuqUoqBwmejy/6B0aLgajDe WHkuMNnnvA8cUXMh3/ZHtizWWjd3flV7mPIQW/fsS0DkiZA5lnDUUqGueOMb21rLYhKbHr2PxtiK6 WGgZop5jHJWsmpPIO5rc54FJh01Yf98t3J0mqs79wBnQRx6NKRGekp6i5UfNWMGDDKPbQTgDMQVwd hutj38zRIcwO/2t+FDOlMoL2HJoenYRaTVc3Z541gD0cqEytr+n+Ms95/82eDb3Lwm29t1Gu6SA3l 52jZ1sknBTohMOfS1YrJI9U9zNzWTuLuOsuD4+LOX+05yVPXG0n6qikx81521nJJqIcFDcaHjhg9e L2U2sscQ==; Original-Received: from [10.9.9.127] (helo=rmmprod05.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1sbi35-0006cC-4D; Wed, 07 Aug 2024 16:53:59 +0200 Original-Received: from mail by rmmprod05.runbox with local (Exim 4.86_2) (envelope-from ) id 1sbi30-0006RY-1S; Wed, 07 Aug 2024 16:53:54 +0200 Content-Disposition: inline Original-Received: from [Authenticated alias (1196375)] by runbox.com with http (RMM6); Wed, 07 Aug 2024 14:53:53 GMT X-RMM-Aliasid: 1196375 X-Mailer: RMM6 In-Reply-To: <8634ngo18w.fsf@gnu.org> X-Mailman-Approved-At: Wed, 07 Aug 2024 10:55:48 -0400 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:289890 Archived-At: > > From: "Martin Edstrom" > > CC: "72420" <72420@debbugs.gnu.org> > > Date: Wed, 07 Aug 2024 16:03:40 +0200 (CEST) > >=20 > > > > From: "Martin Edstrom" > > > > CC: "72420" <72420@debbugs.gnu.org> > > > > Date: Wed, 07 Aug 2024 14:07:45 +0200 (CEST) > > > >=20 > > > > But, it's odd that visual-line-mode does not affect it for you - it= does for me.=20 > > > >=20 > > > > If I leave visual-line-mode off, then I get the behavior I expect (= i.e. set-goal-column at column 2 is treated as column 6), which is useful. = Turning it on causes the command to behave in a way that is not useful, as= I described. > > >=20 > > > If you leave visual-line-mode off, then type C-p twice from "z", don't > > > you see point go to the 3rd "*" of the line "**** h4"? And if so, > > > isn't that what you meant by "the goal column actually seems to be > > > offset in some way influenced by the line prefix"? Or did I > > > misunderstand what you consider a problem in the existing behavior? > >=20 > > Indeed, on that line, the behavior is the same with and without visual-= line-mode, going to the 3rd "*". > >=20 > > However if I go up to a list item such as "- x...........", I observe d= ifferent behavior. With visual-line-mode, point ends up on the bullet, not= on "x". > >=20 > > That is surprising, no? >=20 > Not to me, it isn't, but then I've hacked on that code too much... >=20 > Anyway, the problem is the difference in behavior between > visual-line-mode on and off, and you consider the behavior with the > mode off as correct? Because this was not what your original report > said, AFAICT. That is correct. Language is hard, sorry ;-) but it's what I meant when I w= rote "Now I would expect moving point upwards with C-p any number of times = should still make point land on the text after the list bullet", and by lis= t bullet I could have clarified I meant the list items that start with "-". Anyway, whichever behavior is considered correct... I don't think visual-li= ne-mode has any business altering the behavior. That is a bug to me! I noticed this bug because I habitually have Org files open with org-indent= -mode, and I was going to use the goal-column trick to add some text to the= beginning of several list items. In practice with this bug, I have to mov= e point forwards by some X characters before typing C-x C-n, which is just = weird. Let me show you: Say as a toy case, I want to turn this list ** Stuff to do - Get Igor to dispose of bodies - Research pig blood - Raid blood bank into this ** Stuff to do - [ ] Get Igor to dispose of bodies - [ ] Research pig blood - [ ] Raid blood bank Everywhere else in Emacs, I can use set-goal-column as one of the many tech= niques to do this editing comfortably. With visual-line-mode enabled, I ha= ve to move point to somewhere inside the word "Raid", before typing C-x C-n= will have the intended effect of ensuring that point will land right after= "- " on each line.=