From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#66942: move-to-column behavior when newlines have a display property Date: Sun, 5 Nov 2023 12:18:12 -0500 Message-ID: References: <87zfztkvyq.fsf@nixos.mail-host-address-is-not-set> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) 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="32298"; mail-complaints-to="usenet@ciao.gmane.io" To: 66942@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 05 18:19:50 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 1qzgms-0008DH-C0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Nov 2023 18:19:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzgmV-0008GT-Rr; Sun, 05 Nov 2023 12:19:27 -0500 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 1qzgmU-0008G1-5n for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 12:19:26 -0500 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 1qzgmT-0005hC-Tq for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 12:19:25 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qzgn4-00019H-Ds for bug-gnu-emacs@gnu.org; Sun, 05 Nov 2023 12:20:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87zfztkvyq.fsf@nixos.mail-host-address-is-not-set> Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Nov 2023 17:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66942 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug wontfix Original-Received: via spool by 66942-submit@debbugs.gnu.org id=B66942.16992047514343 (code B ref 66942); Sun, 05 Nov 2023 17:20:02 +0000 Original-Received: (at 66942) by debbugs.gnu.org; 5 Nov 2023 17:19:11 +0000 Original-Received: from localhost ([127.0.0.1]:38110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzgmE-00017y-MB for submit@debbugs.gnu.org; Sun, 05 Nov 2023 12:19:10 -0500 Original-Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]:46339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qzgmD-00017k-0I for 66942@debbugs.gnu.org; Sun, 05 Nov 2023 12:19:09 -0500 Original-Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-d9beb865a40so3735591276.1 for <66942@debbugs.gnu.org>; Sun, 05 Nov 2023 09:18:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699204705; x=1699809505; darn=debbugs.gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=fiD0/yukIkvL+LDJWlshvd/j+mQRm3ONZ+0opOkrR34=; b=nDz8rkaZ764WIDoMzGzdwwkKjKd9gs6pkBbHXvAtPAN6LH33vJpO+kVM8Yhvhkn4ai t3mSUUpfWd16FwJaFmomCVT+sxdUDnvBiCC6hd1ruVeLkfcc3yujhPPJnsHqnCI5Ds9+ R/stZ/vjVWqH5sp4BUh9LyRWeJZoF/waDiQY/+m3gW8tXWaovdzB1cedvtgecLSNdQgL vPeb2n9A74iTXneQd2BmfPEUr7CwafsHvs0x5NmB1+Hhp1SeV8uFYzbR+vrf9NN/Dr47 Kv4lAz+oG8MAMx/RU1e/9NnOB+nyaiCraQ4LnBIQPeeUL/buEqBF0+X0GFPH6tfr4pT/ H/5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699204705; x=1699809505; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fiD0/yukIkvL+LDJWlshvd/j+mQRm3ONZ+0opOkrR34=; b=BV67H3UN/6SbPxa4qXAYLHax5BHknRrqEYEC129tXWvGqS4Lq8eDuufEP2rhg4bdPV Z1rKpaHMoZ0vvQZa0cX1187LYIX6T1FSoQASMKN3m0IMB33uy8uO1bl3NypdON8ucZvE UGpqzOL8Xlr6E9fnZUsc/hp4ENUQlSF6DRp/J13mKDc52VlDk5pSKUnNcsu4AzfQs6fE 1aSLYohJvymRjR3A8xCcfTALyzVkIF4rlUm1OpxcjKFpvtV+1nKQaguSJBXxGP4bVJQs hUfV3j2nUVoZ8uniwxKfjOAbMW0K6sMBlxdOgMPElXbqLE32AvmXS1qaapNOd25cCERF gXkQ== X-Gm-Message-State: AOJu0YwTwBPvpzDTeisslQw3LKmLlmY8AhU6s5XThMWguQQ9zjZH3QG0 m7+IPYPtjTZGAG4hGQ8zXsSMB3UEoOE= X-Google-Smtp-Source: AGHT+IENfjGSkOJQ078MpMaq42keu84qbbYhrbedLMaFqyw7p4916LUGCiEZtE6fTkEx4iBeVE68Tg== X-Received: by 2002:a25:d113:0:b0:da0:3938:7ac6 with SMTP id i19-20020a25d113000000b00da039387ac6mr23484040ybg.15.1699204705428; Sun, 05 Nov 2023 09:18:25 -0800 (PST) Original-Received: from smtpclient.apple (cm-24-53-187-34.buckeyecom.net. [24.53.187.34]) by smtp.gmail.com with ESMTPSA id t18-20020a0cef52000000b0065b151d5d12sm2684227qvs.126.2023.11.05.09.18.24 for <66942@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Nov 2023 09:18:24 -0800 (PST) X-Mailer: Apple Mail (2.3731.700.6) 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:273834 Archived-At: Eli Zaretskii writes: > ...unless someone comes with an idea for how to handle these = situations in a sensible way (and I thought long and hard about it, but = couldn't find such ideas), this will remain a limitation of = move-to-column, and one of the complications introduced by display = strings with embedded newlines in general. Would it not make more sense to place the cursor _before_ the first = character with a `\n` in its replacing-display property, if = move-to-column attempts to move past it? It is true that neither that = position nor a position on a subsequent line is =E2=80=9Ccorrect=E2=80=9D,= but the former at least preserves the expected move-to-column semantics = of =E2=80=9Cstay on this line=E2=80=9D. =20 The final newline is the only place to add display on blank lines, so = this will be a general problem for any package attempting to do that. = Here=E2=80=99s a simple test of this for people wanting to investigate: (progn (insert "\n>>>>\n" (propertize "\n" 'display "xxxxx\n") "SHOULD NOT = MOVE HERE\n<<<<") (forward-line -2) ; at beginning of xxxxx\n line (move-to-column 10)) ; should not move past the line=