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#73600: 31.0.50; Visual wrap prefix mode and image display Date: Sun, 13 Oct 2024 21:51:33 +0300 Message-ID: <865xpvu98q.fsf@gnu.org> References: <87wmiq1wsd.fsf@gautierponsinet.xyz> <86cyki1pgu.fsf@gnu.org> <86bk021p1k.fsf@gnu.org> <3117d4b7-751c-8c6d-8acf-48dc6464e723@gmail.com> <86h69tzc2w.fsf@gnu.org> <57d753c5-538d-d026-2f41-2a0eaddef746@gmail.com> <86v7y8xtyi.fsf@gnu.org> <867canxda6.fsf@gnu.org> <86plo5wmy7.fsf@gnu.org> <31b6ff37-f742-c7a1-cd80-ea1f79f11cda@gmail.com> <861q0kva2m.fsf@gnu.org> <2d299d25-ef50-3da2-c28e-735778399dcc@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1105"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73600@debbugs.gnu.org, gautier@gautierponsinet.xyz To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 13 20:53:02 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 1t03i9-00007N-RO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Oct 2024 20:53:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t03hx-0003zS-4u; Sun, 13 Oct 2024 14:52:49 -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 1t03hu-0003z3-Ei for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2024 14:52:46 -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 1t03hu-000330-5R for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2024 14:52:46 -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=GxrjOGvdtsj/paDFRHmIlnCc6Ieg/8jb2rWM4aBawpI=; b=QXjBFwKA6wCMduvIfQImerGolLB7XENQF9uAWfQ5NEJnBKTVwphffvLlPHZF/VAxMRXuhpnjOj38lDDlyyM/S7PK+36+XGYqQ9VPQZXg5qg+uMJwagGmUTJg6y2XjaMEdWB8PSxBR4zyrd50hwvSn0DN150n7eNDdZnTXH6cutBFHbbCKIqhm+thjYix8eVgFZO4NdSombUyQ4PiXJnkUPLgsmMy50biCUla3wcDmyM2kbwTwI/tcqeqp0SwDCoAxeGY6NDd400x+Z/wiS+qXJnsVX5G9t8GNY2a0ic4jxSKOYDlEXmKM6mAgdRiHVOv7ZlPGkn/NOtZ8n3Lw4Z+7w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t03i9-0004qi-R2 for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2024 14:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Oct 2024 18:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73600 X-GNU-PR-Package: emacs Original-Received: via spool by 73600-submit@debbugs.gnu.org id=B73600.172884552318517 (code B ref 73600); Sun, 13 Oct 2024 18:53:01 +0000 Original-Received: (at 73600) by debbugs.gnu.org; 13 Oct 2024 18:52:03 +0000 Original-Received: from localhost ([127.0.0.1]:55035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t03hC-0004ob-Dt for submit@debbugs.gnu.org; Sun, 13 Oct 2024 14:52:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t03hA-0004np-2K for 73600@debbugs.gnu.org; Sun, 13 Oct 2024 14:52:00 -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 1t03gn-0002ti-Eo; Sun, 13 Oct 2024 14:51:37 -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=GxrjOGvdtsj/paDFRHmIlnCc6Ieg/8jb2rWM4aBawpI=; b=aauICNi0k8XS 2ilHIa28fuiy4CMrSVGMdbzY8ulAFMBd9rQiioO4CFoZtJZKSNyyrDWou0JSMYoHVnD5c93Sq6dFS qxu6nunDM9XHC+WP36DUcB38zimFPmyoOmHJAPgBQKJ6EAJB54WPuyWzaKCVbR21ChW2+wlBLdboX QhKFIWM4wEzwCwb3Drk2Hi+E/8VjYnfDgi5G3Ot9OYfnOqmmLnSueeSpYGrj/s/y00jTQEIpRfY/l HMAvJ9ZWh+A2G5hjoEU/nPkcfASUjDAj0XG22HOnyVTFgCl0C3eu6znKg/B/drYZ+7KcFhsQrk9KU oRm9U4kggQ92m5zUJPLK/Q==; In-Reply-To: <2d299d25-ef50-3da2-c28e-735778399dcc@gmail.com> (message from Jim Porter on Sun, 13 Oct 2024 10:38:09 -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:293545 Archived-At: > Date: Sun, 13 Oct 2024 10:38:09 -0700 > Cc: 73600@debbugs.gnu.org, gautier@gautierponsinet.xyz > From: Jim Porter > > On 10/12/2024 10:36 PM, Eli Zaretskii wrote: > > Yes, this is what I had in mind, thanks. But does > > next-single-char-property-change really fit the bill? What if you > > have several overlapping 'display' properties, and in particular one > > property "enclosed" in another? Did you test such a scenario? > > I had tested those manually and they worked (according to my > understanding of display properties, anyway). I've added some test cases > to that effect in the latest patch. > > Just to make sure we're on the same page: my (admittedly limited) > understanding of xdisp.c is that, for replacing-display-properties, > Emacs determines the range of buffer text to replace by using 'eq' on > the 'display' property. So if you have an 'image' spec from positions 1 > to 10, but add a 'height' spec from positions 3 to 4, Emacs will now > render the image three times: one each for the ranges [1, 3), [3, 4), > and [4, 10). That is probably correct, at least in some cases, but why should we rely on that for this purpose? Isn't it more reliable and future-proof to skip the entire span of the outermost "replacing" display property, and never look at properties inside that text? Does it really matter for visual-wrap-prefix-mode to look inside? IOW, I prefer simplicity of the logic to sophisticated design based on what we actually see Emacs do in tricky cases, because time and again I learned the hard way that my mental models of what actually happens can be erroneous in the fine details.