From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71605: 30.0.50; [PATCH] Support variable-width text in 'visual-wrap-prefix-mode' Date: Mon, 17 Jun 2024 22:55:14 +0300 Message-ID: <86le33qr8d.fsf@gnu.org> References: <835c7897-d276-b0fe-6d1e-8e6a20cac2bb@gmail.com> <4e596683-665e-8e2c-c201-9ddcb476d195@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22174"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 71605@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 17 21:56:15 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 1sJISd-0005UR-Ch for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Jun 2024 21:56:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJISP-0002Jt-AE; Mon, 17 Jun 2024 15:56:01 -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 1sJISO-0002Jl-Fu for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 15:56:00 -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 1sJISO-0006e0-7D for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 15:56:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJISQ-0002Kj-79 for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 15:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Jun 2024 19:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71605 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71605-submit@debbugs.gnu.org id=B71605.17186541308913 (code B ref 71605); Mon, 17 Jun 2024 19:56:02 +0000 Original-Received: (at 71605) by debbugs.gnu.org; 17 Jun 2024 19:55:30 +0000 Original-Received: from localhost ([127.0.0.1]:36375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJIRt-0002Jh-Ka for submit@debbugs.gnu.org; Mon, 17 Jun 2024 15:55:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJIRo-0002JM-Uj for 71605@debbugs.gnu.org; Mon, 17 Jun 2024 15:55:28 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJIRh-0006ZE-8Y; Mon, 17 Jun 2024 15:55:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=c5MvAdE401JHoGyO9PBnG0GZRNQWXaKoQGnGGlFGwqg=; b=WIcfByTakbZF ugQqprnthI2dr+MSxI5u+srMNSUhY+3Jsx/KdxuyRzDdkxO8PkDOHNgf1iHyX1o1RaFvRaq2ZcYcu j1ZNAD2pugH0ZTvPQuIiew3slLPa5x4xW7976S7Mx7C24c1CP9/qpZAuyihY4PkjlsQzVC7dNTle0 3ufgStdB7tjNudYawiW8+DD/9swoe6QF8nOAx1jO5GHuq1Y7dYD1jAFKOf2b94ELKtuSTppodKpnR /4jlDfY3u2UFUulmYgDOgXyC09q9p6cXpdZSsgMoHvhU9BPfpDSBTieUhjacXzmptiTePOpCCqVT9 Etw3uluQZsUBeTNOG7kpjQ==; In-Reply-To: <4e596683-665e-8e2c-c201-9ddcb476d195@gmail.com> (message from Jim Porter on Mon, 17 Jun 2024 11:17:45 -0700) 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:287418 Archived-At: > Cc: 71605@debbugs.gnu.org > Date: Mon, 17 Jun 2024 11:17:45 -0700 > From: Jim Porter > > Maybe :align-to could be made to work. It doesn't seem to work at all > for me, even in a minimal test case like calling this on a long line of > text: > > (put-text-property (point-min) (point-max) 'wrap-prefix '(space > :align-to 4)) > > Replacing :align-to with :width works just fine though. It's entirely > possible I'm just doing something wrong, but maybe this is a bug? It's a bug in Emacs 29 and Emacs 30. It works in Emacs 27. > (Now what would be great is if :align-to supported a *string* value that > meant "use the pixel-width of this string". It's already possible: just have a variable that holds the width, and use it in the :align-to expression. > Which actually gives me an > idea... what if the wrap-prefix is just the original text like "* " and > we fontify it to be invisible? It's not part of the buffer and you can't > select it anyway, so it doesn't really matter what the text is so long > as it's not visible.) I don't think I follow: how is this relevant to the issue at hand?