From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter 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 13:08:47 -0700 Message-ID: References: <835c7897-d276-b0fe-6d1e-8e6a20cac2bb@gmail.com> <4e596683-665e-8e2c-c201-9ddcb476d195@gmail.com> <86le33qr8d.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="20299"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, 71605@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 17 22:10:34 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 1sJIgT-00051N-WB for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Jun 2024 22:10:34 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJIfy-0001gS-0h; Mon, 17 Jun 2024 16:10: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 1sJIfw-0001gB-QJ for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 16:10: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 1sJIfw-00011z-Cy for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 16:10:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sJIfy-0002ot-H9 for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2024 16:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Jun 2024 20:10: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.171865499810824 (code B ref 71605); Mon, 17 Jun 2024 20:10:02 +0000 Original-Received: (at 71605) by debbugs.gnu.org; 17 Jun 2024 20:09:58 +0000 Original-Received: from localhost ([127.0.0.1]:36739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJIfu-0002oV-0k for submit@debbugs.gnu.org; Mon, 17 Jun 2024 16:09:58 -0400 Original-Received: from mail-pl1-f181.google.com ([209.85.214.181]:56355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJIfs-0002o9-LT for 71605@debbugs.gnu.org; Mon, 17 Jun 2024 16:09:57 -0400 Original-Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1f44b441b08so34831815ad.0 for <71605@debbugs.gnu.org>; Mon, 17 Jun 2024 13:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718654928; x=1719259728; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=qLHI/BFG0/izN680SaSMZTSLZ1P6Yo3fQWnekVcbC1M=; b=HDM3mY97WvcS9Iim7eKEIlYzstckSNu1MrlNiZjO9RrbHZ027uIUoaeAIqJaexl/gm nPL/uIS5YsB6+kbi0gova9cFRNq4kodQJjiHqj2i/rfdBwrlR0gtcYoTFZkHW9scZrB2 1oCn341QyYqGtNLR4exnpMTZUByToyvhNis/lBXq4cu06DzAcbrNTEQN8CXZ4ITxyM2r kU0Lt3TqvhVTZgntIH0ftXbjScm6wWGdy4Kt4398yndtZodcmavYDjbtV9xrMTT63XqC qV44ql8gwkwxr+N9ZMbKz3sSB3gdNM5QvzDDHOotvfeZXk/LUlpWj1DEx7qXMlCXIZAL xwqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718654928; x=1719259728; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qLHI/BFG0/izN680SaSMZTSLZ1P6Yo3fQWnekVcbC1M=; b=cwDZB7Dd0CykPKFfXpUXPa5wqBXIKmEz/i98wiRfjMypCBG+z6nsJU8e33LdHu5zvY pK3PEeNZcI3+RwLpSoKANC863Ar9yDGvt/f5Jp6/BoRkFTD893xyfJkxxrb5EjTwxlxR ZC9JYK8VRFocB/t3eRIbD3F6rcgS8l5LldGLconlRlhy/IshtCiG5orsiE0FI68iY3ft wnfsKc02YJHtHEZvulBYhnD1Ev19TDwH3h09/3rzkjCA8MovL3Q6xwLg8teID5Yfl2Yh Pk41TGFDrj2ux6f9lGUvhZOY8InyiOsYmYPeYlZTJeaWRI871Rrtd+YHDQnk2RAiD4j/ ygsw== X-Forwarded-Encrypted: i=1; AJvYcCV2mitkBJwzJaViEvBY9GTQMx7GUSWR5FAzzRqQ/bma7/4otOKndkrM7VIhRZMP+7s8JHqUmzszfwQz5rcmRC6oFhtwK8E= X-Gm-Message-State: AOJu0Yx+C7vZckuZWBnUZiXTOuAw9MxGnQe7kIfwBBFrT+vQhaZJSOW1 J9L7f7PLVtNjSCVnMcxewmjB7fnPvEkbTrYFUFfbs88F7IaMb2l1 X-Google-Smtp-Source: AGHT+IHzSmWE5/Rm9FUFO9IXNC2eQ4DfydSXgyDUhnFkEQ//3fqGO+3qgHKa9uNva1QR9hoJRPoqDg== X-Received: by 2002:a17:902:c40f:b0:1f6:8157:b52f with SMTP id d9443c01a7336-1f8625c60a2mr122267215ad.8.1718654928335; Mon, 17 Jun 2024 13:08:48 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-1f855f02511sm83104765ad.202.2024.06.17.13.08.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jun 2024 13:08:47 -0700 (PDT) Content-Language: en-US In-Reply-To: <86le33qr8d.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:287420 Archived-At: On 6/17/2024 12:55 PM, Eli Zaretskii wrote: >> Cc: 71605@debbugs.gnu.org >> Date: Mon, 17 Jun 2024 11:17:45 -0700 >> From: Jim Porter >> >> 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. Ah, that explains it. >> (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. That would make the code simpler, but I'd still need to figure out when to reevaluate the variable to update things. >> 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? I was thinking you could wrap "* this is some text" like so: * this is * some text The second "* " would come from the wrap-prefix, but we'd make the foreground transparent (or the same color as the background) so it wouldn't be visible. Then it would always take up the same width as the first "* " because it's the same string with the same font and everything.