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: Tue, 18 Jun 2024 14:37:40 +0300 Message-ID: <86h6dqqy63.fsf@gnu.org> References: <868qz3ssu0.fsf@gnu.org> <201c2285-012f-fa29-03b5-78a2e26aa134@gmail.com> <86plsfqvme.fsf@gnu.org> <66e7c49d-adb6-186f-18f1-33eee9f668ad@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32344"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71605@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 18 13:38:17 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 1sJXAH-0008AD-QQ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jun 2024 13:38:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJXA2-0003Pu-EN; Tue, 18 Jun 2024 07:38:02 -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 1sJX9z-0003PW-T9 for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 07:38: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 1sJX9z-0001pq-LD for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 07:37:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJXA2-0000Ea-74 for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2024 07:38: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: Tue, 18 Jun 2024 11:38: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.1718710673875 (code B ref 71605); Tue, 18 Jun 2024 11:38:02 +0000 Original-Received: (at 71605) by debbugs.gnu.org; 18 Jun 2024 11:37:53 +0000 Original-Received: from localhost ([127.0.0.1]:42103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJX9t-0000E3-1s for submit@debbugs.gnu.org; Tue, 18 Jun 2024 07:37:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJX9r-0000Dl-2q for 71605@debbugs.gnu.org; Tue, 18 Jun 2024 07:37:52 -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 1sJX9j-0001ow-67; Tue, 18 Jun 2024 07:37:43 -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=B+k1KZFm/NkYI2kCpqerNpOXN9Up5VzoWN9757D1XTM=; b=n3lHk3qY0fIM CU9PycoKZoyKiqpGJm68TvRVLtPGJH/pEU6BXa7ye7+WrYqqrUhjJHxT8+ytilrySyQ8t60LtEcmr gai9ScZBcDGPzztEjep4zJBrBGkVr/l0u+YCGXKwqFBDRWakkAX6Cem24I/Ub+4r1zYM5fwV65T2j rC1TpVMCAncS7cfBbDH9VJzSqN4ygVXJP1KhdzryPmUTvDGc03pJAQzB82tV6BkrSRlDvr42aYt9d PimamxMy1b05jJse+5vLUPadk46coRYoBDyepbV0tzAK0z/e6h3l334U8pzQ3euUtS0wBCFBlsVbH +jMmfMA6sOnuLF6OjV2eeg==; In-Reply-To: <66e7c49d-adb6-186f-18f1-33eee9f668ad@gmail.com> (message from Jim Porter on Mon, 17 Jun 2024 11:44:47 -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:287433 Archived-At: > Date: Mon, 17 Jun 2024 11:44:47 -0700 > Cc: 71605@debbugs.gnu.org > From: Jim Porter > > Replying to your individual points below, but in the other subthread, I > had the idea that maybe a better way to do this would be for the wrap > prefix to always be the first-line prefix but to make it transparent > when desired. So for the "* some text" example, the wrap-prefix would be > "* " but fontified(?) such that you can't see it. I don't think I understand how would this do the job. Surely, the indentation space should be visible? > A face transparency attribute might do the trick, and be useful for > other things too: It isn't universally supported, AFAIK. > Or maybe :align-to could take a string value, which would mean "use the > pixel-width of this string as the value". How is that different from using a column (as opposed to pixel) value for :align-to? > >> If I set that correctly, then the pixel-size should adjust as the > >> text scales. It wouldn't handle the case where the actual font > >> changes though. > > > > Why not? > > I was planning to set :relative-width to / > . If the font changes, the result of that > calculation can change. The idea is to set it to the multiple of the character's width, which will then scale with the font. > > If you can pass a window, you can use window-text-pixel-size instead. > > I think 'window-text-pixel-size' would compute the size of the text > already in the buffer Yes, and we have with-current-buffer...