From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Josh Newsgroups: gmane.emacs.bugs Subject: bug#58122: 28.2; overlay before/after-string does not render more than one fringe display spec Date: Wed, 28 Sep 2022 18:18:57 -0700 Message-ID: <1302d235-9614-47d9-bc39-989d8ecba8a8@app.fastmail.com> References: <55613fb3-91db-4fb0-aaa7-120888b9db10@www.fastmail.com> <83fsgbiplv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40019"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.7.0-alpha0-968-g04df58079d-fm-20220921.001-g04df5807 Cc: 58122@debbugs.gnu.org To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 29 18:23:29 2022 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 1odwJs-000A9S-Dq for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 18:23:29 +0200 Original-Received: from localhost ([::1]:43954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odwJn-0002Av-LM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 12:23:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oduzG-0007E5-9p for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 10:58:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oduzE-0001YY-3D for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 10:58:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oduzD-0007ru-Uw for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 10:58:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Josh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Sep 2022 14:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58122 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 58122-submit@debbugs.gnu.org id=B58122.166446343330119 (code B ref 58122); Thu, 29 Sep 2022 14:58:03 +0000 Original-Received: (at 58122) by debbugs.gnu.org; 29 Sep 2022 14:57:13 +0000 Original-Received: from localhost ([127.0.0.1]:39259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oduyO-0007ph-Nq for submit@debbugs.gnu.org; Thu, 29 Sep 2022 10:57:13 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:52163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odiD3-0002t0-Hp for 58122@debbugs.gnu.org; Wed, 28 Sep 2022 21:19:31 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 9845232001AB; Wed, 28 Sep 2022 21:19:23 -0400 (EDT) Original-Received: from imap42 ([10.202.2.92]) by compute5.internal (MEProxy); Wed, 28 Sep 2022 21:19:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=woolsweater.net; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1664414363; x=1664500763; bh=oY ZdQpLxLObefwDnBaiEL2CUMnUHvvqdqzLkax2Qjzw=; b=qk9athCXwjXEGQox2r qlbwnLJjAR8Ui3KjA2pUi7CjzGS5amqgoQUrO1x0Sa5nxB54Cnsjg4xwExhQqHX7 AQrn9nUmBFocSr7WHM+gbqE01G1UAEh7rnOFEbjWR7JDYOLpgTpRhBovySZmM+Cf 0TaHxQcVitszldMWokciNFgCPIjfxF/iUuuInXWZv3D9PMzd/ZTFHadIQAd1eyFa t+bWuoSITNV8JzpVlJRKfQiSZj/mw93UqvPwGmR88P83sQ52GBxuaHFjobnJh/Yj zAUQ+C9PPLASVyYyaFkkDrohMC/C7wUm7qzyIYGSwhNn5v63gvqLNyVlcPyZylJr Cb8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1664414363; x=1664500763; bh=oYZdQpLxLObefwDnBaiEL2CUMnUH vvqdqzLkax2Qjzw=; b=dda0BsvGdAPW/bXdACoBUUsAbEhh5q4qe1me6rdlwK7X agV1PFnguDMO+O2C9JKhBO/F9q41b6rJdVSa4gQSRp039r/xFNfQsQNb9DyTgWLr slfrhUXf8no/xZg4k5Xz39rsTZTRA7hBzNRzkSB6iBUMApLO/XigQ34D7vjeTLh2 XiCQ7QlEtTZO7iBtOBgHekF5nTJh0n1LgCpMUGxrOCfkXWxWJtJVV53jaQA2/rfp KCg8dNUCpobyJXmNUUI+bzokQ/uC/zT5EMn7aNyG2Wz2MxGuDLlH476RX4/Sr82q 6LYdd5JNtkcLmcx7Sjw7W2uISS7Wvb7Hy5mF4CPSWQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeegledggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpeflohhs hhcuoegvmhgrtghsseifohholhhsfigvrghtvghrrdhnvghtqeenucggtffrrghtthgvrh hnpeejheevfeelgfevleejkeehvdeijeekledvueeggfeukeeghfdtueehtdfhvdeutden ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegvmhgrtg hsseifohholhhsfigvrghtvghrrdhnvght X-ME-Proxy: Feedback-ID: i512946c9:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id D9136BC0078; Wed, 28 Sep 2022 21:19:22 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <83fsgbiplv.fsf@gnu.org> X-Mailman-Approved-At: Thu, 29 Sep 2022 10:57:11 -0400 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" Xref: news.gmane.io gmane.emacs.bugs:243920 Archived-At: On Wed, Sep 28, 2022, at 6:40 AM, Eli Zaretskii wrote: > tags 58122 wontfix > thanks > >> Date: Tue, 27 Sep 2022 11:05:10 -0700 >> From: "Josh Caswell" >> >> An overlay `before-string' or `after-string' property with both left and right fringe display specs only seems to render the first spec. >> >> *Demonstration*: >> - Launch GUI Emacs with the -q flag >> - In an Elisp buffer, define these two commands >> >> (defun insert-two-squares () >> (interactive) >> (insert (propertize " " 'display [(left-fringe hollow-square) >> (right-fringe hollow-square)]))) >> >> (defun overlay-two-squares (right-first) >> (interactive "P") >> (remove-overlays) >> (let ((ov (make-overlay (point) (point))) >> (specs [(left-fringe hollow-square) >> (right-fringe hollow-square)])) >> (overlay-put ov 'before-string >> (propertize " " >> 'display >> (if right-first >> (reverse specs) >> specs))))) >> >> - Switch to a new test buffer >> - Invoke `insert-two-squares'; observe that both left and right fringes display a hollow square >> - Delete the inserted character (fringe bitmaps disappear) >> - Invoke `overlay-two-squares'; observe that only the left fringe displays a hollow square >> - Invoke `overlay-two-squares' prefixed with `C-u'; observe that only the _right_ fringe displays the hollow square >> >> The same behavior is seen if the overlay property is `after-string' rather than `before-string'. >> >> *Expectation*: >> Based on the display spec documentation I would expect the overlay to render fringes the same way as an inserted propertized string. > > Thank you for your report. > > This was never supported in Emacs. The reasons are subtle and very > technical, and I will not go into them here. Making this work as > expected might be possible, but it would require changes on a very low > level in the code that handles nested display properties and overlay > strings, which is already extremely complicated. I find changes of > such nature unjustified for such a fringe (pun intended) use case. > > As an easy work-around, you can have 2 different overlay strings at > the same position, like this: Got it. I think this workaround should be sufficient. Thank you for the quick response!