all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Martin Edstrom" <meedstrom@runbox.eu>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: 72420 <72420@debbugs.gnu.org>
Subject: bug#72420: set-goal-column misbehaves with a line-prefix and visual-line-mode
Date: Tue, 06 Aug 2024 16:10:09 +0200 (CEST)	[thread overview]
Message-ID: <E1sbKt7-0001LN-9e@rmmprod05.runbox> (raw)
In-Reply-To: <86cymosmh6.fsf@gnu.org>

Alright, I keep being mistaken about the reproducibility of my bug reports, but I'm reasonably sure the following steps are reproducible.


Step 0: Start emacs -Q  (emacs 29.4 if you have that version, Debian sid package version 1:29.4+1-3)

Step 1: Erase the scratch buffer, and paste this text:

* h1
** h2
- a.y.........
- x...........
*** h3
**** h4
- ....w.......
- z...........

Step 2: Use M-: to eval this expression:

(progn
  (add-text-properties 12 13 '(line-prefix "  "))
  (add-text-properties 27 28 '(line-prefix "  "))
  (add-text-properties 57 58 '(line-prefix "    "))
  (add-text-properties 72 73 '(line-prefix "    "))
  (add-text-properties 12 13 '(display "•"))
  (add-text-properties 27 28 '(display "•"))
  (add-text-properties 57 58 '(display "•"))
  (add-text-properties 72 73 '(display "•")))

Step 3: Run M-x visual-line-mode.

Step 4: Move point to "z", inside the last line, and type C-x C-n (set-goal-column). Say yes to the disabled-command prompt.

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, but the goal column actually seems to be offset in some way influenced by the line prefix. Even using C-n to come back to the line that has "z....." does not place point on the same position as when you started out.


(Alternative reproduction steps: instead of step 2, use M-x org-mode RET M-x org-indent-mode RET.  That's how the bug was found.)

Martin Edstrom

On Sun, 04 Aug 2024 11:47:49 +0300, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: "Martin Edström" <meedstrom@runbox.eu>
> > Date: Fri, 02 Aug 2024 12:35:32 +0200 (CEST)
> > 
> > There remains a niggling issue related to bug 61580 ( https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-03/msg00094.html )
> > 
> > Basically, reproduce that same setup. Now turn on M-x visual-line-mode and try to use M-x set-goal-column (C-x C-n).  It does not stick to the goal column you choose.
> 
> Thanks, but please show a full recipe for reproducing this, starting
> from "emacs -Q".  The original setup talks about an Org file(is that
> part necessary?) and some added text properties with absolute buffer
> positions, so I'd rather not guess how to repeat that.  Please also
> describe in more detail what you mean by "does not stick to the goal
> column" -- which commands did you type that didn't honor the goal
> column?




  reply	other threads:[~2024-08-06 14:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02 10:35 bug#72420: set-goal-column misbehaves with a line-prefix and visual-line-mode Martin Edström
2024-08-04  8:47 ` Eli Zaretskii
2024-08-06 14:10   ` Martin Edstrom [this message]
2024-08-07 11:01     ` Eli Zaretskii
2024-08-07 12:07       ` Martin Edstrom
2024-08-07 12:19         ` Eli Zaretskii
2024-08-07 14:03           ` Martin Edstrom
2024-08-07 14:29             ` Eli Zaretskii
2024-08-07 14:53               ` Martin Edstrom
2024-08-06 14:24 ` Martin Edstrom
2024-08-07 11:04   ` Eli Zaretskii
2024-08-20  8:28 ` Martin Edström
2024-08-20 12:24   ` Eli Zaretskii
2024-08-22 14:33     ` Eli Zaretskii
2024-09-07  7:16       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1sbKt7-0001LN-9e@rmmprod05.runbox \
    --to=meedstrom@runbox.eu \
    --cc=72420@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.