From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Herman, Geza" 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, 1 Aug 2023 16:32:22 +0200 Message-ID: References: <5fc075c6-c94b-eacf-6bbd-7d337caa2ee7@gmail.com> <83o7jr0x0v.fsf@gnu.org> <83jzue28ri.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32051"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Cc: 64988@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 01 16:33:26 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 1qQqRB-0008E6-Vj for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Aug 2023 16:33:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQqQr-0001kJ-Ey; Tue, 01 Aug 2023 10:33:05 -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 1qQqQp-0001jd-7D for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 10:33:03 -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 1qQqQo-00024z-VP for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 10:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qQqQo-0006Ij-FT for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 10:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Herman, Geza" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Aug 2023 14:33:02 +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.169090035024180 (code B ref 64988); Tue, 01 Aug 2023 14:33:02 +0000 Original-Received: (at 64988) by debbugs.gnu.org; 1 Aug 2023 14:32:30 +0000 Original-Received: from localhost ([127.0.0.1]:48159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQqQI-0006Hv-IF for submit@debbugs.gnu.org; Tue, 01 Aug 2023 10:32:30 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:57437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQqQH-0006Hk-I3 for 64988@debbugs.gnu.org; Tue, 01 Aug 2023 10:32:29 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3178dd771ceso4245114f8f.2 for <64988@debbugs.gnu.org>; Tue, 01 Aug 2023 07:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690900344; x=1691505144; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0DuVuUPmhPf1JfUGn3hqenI166YNbTIzmA8C5nAUmcE=; b=LCGZUfaw/fIwQYc6EYoml2wbqRkPM2ZHePcbl+14uCkg/4oNjCSysq0QhHGieIVqaV YIKHjiShZN6MSo24X9II/wiKZjqOtTWpd0PZKttjR/yPmxMhXDjBy46RLYqc79RB5ncf b4EfqWZnV6yfiyZ9QnZ/BEc6h2tAjO/Yz7EyllxGPu1ZW+yspdv+22rj3OtijEaZrC4P 7gm5Dmqk4AJNtmOK2h4JwyZzmGevAt8+bYRLSiBqPcJAiXfxdBAmQT7zFFo13ZAqyhJi ZtGHryZCAsVaH0AgXryRQNeaKYEzUV21/N46cOequG0drFJHTJ4d9N3Kyu2C4sn5RcpP z3Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690900344; x=1691505144; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0DuVuUPmhPf1JfUGn3hqenI166YNbTIzmA8C5nAUmcE=; b=kU+B1utM+vdldgE+D58riPgFYdL0C2F/ArUwB/j+O+QIi5nUS3cjcIyIVTpEfNH/Vx jyka0JXebwfCUerynpsUFa2tiAJkNo6fGTCgHjEE7LgbglaopNzveYxtoUZocD7LcYtF FDXYQVWM1BXAnb/rsStH+WikNeVo7pCQcumrUBUMBjCQW266o3PBhky6/kd88uCFoo4k wKt60Cg8Y7AGw0jf2hjroSDJWbZsWlWwOswfwE6NJZFDgbYS3ksCsgMQTbTgSCbZW5hN pE9uRHQmnkTLhcZnuYxk976D5NX9EB8/LLOu/BEsHU7JtK8cze7CkMRR6HMajbU/M7+8 iAdg== X-Gm-Message-State: ABy/qLZVpPRJrwt8/L9bLQRG1/wS9B8wb9UtFoSITdP3/aPy6OPg36SB X3kLKc2dVCvTeOCuezc9P6o= X-Google-Smtp-Source: APBJJlFotmkjfElkwBwapcHuLPwh1nYMi9+bRgsnMqxfuYMj434FN+2f8pqMhr0z63U0CLMLwn+FDg== X-Received: by 2002:adf:ce06:0:b0:313:fd52:af37 with SMTP id p6-20020adfce06000000b00313fd52af37mr2460351wrn.4.1690900343645; Tue, 01 Aug 2023 07:32:23 -0700 (PDT) Original-Received: from [10.9.10.122] (62-77-231-86.static.invitel.hu. [62.77.231.86]) by smtp.gmail.com with ESMTPSA id w10-20020a5d4b4a000000b003176c6e87b1sm15956172wrs.81.2023.08.01.07.32.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 07:32:23 -0700 (PDT) Content-Language: en-US In-Reply-To: <83jzue28ri.fsf@gnu.org> 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:266452 Archived-At: 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.