all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Herman, Geza" <geza.herman@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 64988@debbugs.gnu.org
Subject: bug#64988: 30.0.50; move-to-column can move across lines if there is a text with display property
Date: Tue, 1 Aug 2023 16:32:22 +0200	[thread overview]
Message-ID: <ba172766-95ad-415c-a1d8-e28bef0315f0@gmail.com> (raw)
In-Reply-To: <83jzue28ri.fsf@gnu.org>



On 8/1/23 15:26, Eli Zaretskii wrote:
> Copy text into a temporary buffer, remove 'display' properties, call
> move-to-column there, then move to the same position in the original
> buffer?
Yep, that's a possible solution, but I feel that it is such a basic 
functionality, emacs should be able to solve this question without using 
such workarounds. But this is just an intuition, feel free to ignore it 
:) Column-enforce-mode can be already slow for large files, if it had to 
do this copy all the time it would be even slower.

>> 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?
I understand that solving this problem if we want to stick with the 
current idea of move-to-column (meaning that it has to consider display 
properties), is hard, or even we can say that there are no good 
solutions. But ideally, it should move the cursor to the closest 
possible location in the same visual line. As far as I understand the 
intention of this function.

But for my problem, I don't think that this is the way to go. 
Column-enforce-mode should calculate columns without considering 
properties. I'd be good if emacs gave an out-of-box solution for this 
(without using copying), but if it doesn't, it's also fine.






  reply	other threads:[~2023-08-01 14:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 10:53 bug#64988: 30.0.50; move-to-column can move across lines if there is a text with display property Herman, Géza
2023-08-01 12:25 ` Eli Zaretskii
2023-08-01 12:57   ` Herman, Geza
2023-08-01 13:26     ` Eli Zaretskii
2023-08-01 14:32       ` Herman, Geza [this message]
2023-09-02 16:38   ` Stefan Kangas

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=ba172766-95ad-415c-a1d8-e28bef0315f0@gmail.com \
    --to=geza.herman@gmail.com \
    --cc=64988@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.