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#72485: Support 'visual-wrap-prefix-mode' in SHR/EWW Date: Sat, 17 Aug 2024 11:55:57 +0300 Message-ID: <867ccf4jfm.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11520"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72485@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 17 10:56:51 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 1sfFEw-0002p9-9s for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Aug 2024 10:56:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfFEc-0001Lz-If; Sat, 17 Aug 2024 04:56:30 -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 1sfFEZ-0001Ll-Rv for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 04:56:28 -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 1sfFEV-0000Mi-SQ for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 04:56:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=aXvEUxFf+LEZM/pNbB3vQjvxGHx5yYvo53OoektXPfA=; b=E44Dn6SHt9bU5aGNxk5O+xw3pe9vOWvdjqFULBOjgZJ3G1y/wASBH61iSKfx/SHozr22DjGgicCp3Ko7Z1HFwgHjhUYYDAcqqEC+vHsjY/Z/tn/4kZOdEuN3FqUeyhxXzRG0KQVnliWBStcMMp1rtIBTJOH57Fs7t591a1npLHCEIbsYHRjD4nMDic4F9fupSv/yYG0/6FbDuUQwQsY2kRayXDCsbJYMfW0yEtCCnEBRM4+i16vbtWnPFSq6MqFYt4WcktKJtyt3x6QUDMVkTn4FrAloHn3w2HMQEBT2bCYKyJR7YUzp8hXvBJr216uTcOxpv4A2L+N8CU3wEUX00Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfFF8-0001cj-GW for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 04:57: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: Sat, 17 Aug 2024 08:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72485 X-GNU-PR-Package: emacs Original-Received: via spool by 72485-submit@debbugs.gnu.org id=B72485.17238850066210 (code B ref 72485); Sat, 17 Aug 2024 08:57:02 +0000 Original-Received: (at 72485) by debbugs.gnu.org; 17 Aug 2024 08:56:46 +0000 Original-Received: from localhost ([127.0.0.1]:53471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfFEr-0001c6-Pr for submit@debbugs.gnu.org; Sat, 17 Aug 2024 04:56:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfFEp-0001bt-9m for 72485@debbugs.gnu.org; Sat, 17 Aug 2024 04:56:43 -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 1sfFE7-0000LW-AV; Sat, 17 Aug 2024 04:55:59 -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=aXvEUxFf+LEZM/pNbB3vQjvxGHx5yYvo53OoektXPfA=; b=ONU1phypzGKH lre2Pf7ecRJc9vUlMh6d1a3V0wdGYEfoqfwVmBy3SonckQ0LtFpymoZ06dlzVcgakuNZyq89E6P/t NZv/5Yb1vTm9/7bIAMtxq53TC14WhJW/HtKoHLU6c3iId/oOF2WotY4YYl0dMYKPfi+LWqXcSg/Tg pANnKGWbFPIKYXbyZySGgrXjfG2DdB8PhlXKQiDf3JYtwFbJHXKq+OFkNmj6nRVQPUhMMuWLH3qca 53nF6xgS0sJ2LVqFEAkS4yEUeDThOUFTfYE9J5R2Qw5ibGXYspbWXBO+pJUuKcBGjG+iClBFW+vQY rMvyLOd2FKNVAnuDMngzKA==; In-Reply-To: (message from Jim Porter on Mon, 5 Aug 2024 20:47:52 -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:290240 Archived-At: > Date: Mon, 5 Aug 2024 20:47:52 -0700 > From: Jim Porter > > This patch is an extension of bug#71605, and the first place to > explicitly use the new variable-pitch support for > 'visual-wrap-prefix-mode'. While implementing this, I found two small > bugs in the new 'visual-wrap-prefix-mode' code: > > 1. When setting the min-width for the first line prefix, we should use > 'add-display-text-property' so as not to clobber other display properties. > > 2. My attempts to be "helpful" by special-casing wrap-prefixes of all > spaces ended up just interfering with more complex cases (like SHR), so > I removed it. The code is now simpler (one fewer condition) and just > works more smoothly overall. > > There's one limitation to this patch though: since SHR uses absolute > pixel-widths for indenting internally, things can look mis-indented if > you scale the text in the buffer. However, SHR has exactly the same > issue when *not* using 'visual-wrap-prefix-mode', so it's really just a > more-general bug in SHR. (It'd be nice to fix that, but I'd have to get > a better understanding of how indentation and elements interact.) Thanks. This lacks a NEWS entry, but other than that, feel fee to install on master when ready.