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#75291: Redisplay not updating fringe when face filter changes Date: Thu, 02 Jan 2025 19:50:29 +0200 Message-ID: <8634i1jeai.fsf@gnu.org> References: <874j2h3yzb.fsf@dancol.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14364"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75291@debbugs.gnu.org To: Daniel Colascione Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 02 18:51:12 2025 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 1tTPLk-0003WD-4t for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jan 2025 18:51:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTPLc-0002C0-MH; Thu, 02 Jan 2025 12:51:04 -0500 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 1tTPLa-000276-51 for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 12:51:02 -0500 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 1tTPLZ-0002QD-Sk for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 12:51:01 -0500 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=/QJnUk3axpzPuJ2jvUnjAcVxSeDz2UIO6UCHhIxhvME=; b=NtRFE/4Bwx1sxHasBWHh2ZjRlGnACVVzPOLcmYF1SoWLqu13XC7DFqok0sasB4I/drSotVlveqhkF+gkguy6dxg0VXbzidgBpu+PktH7ez5SJvr7URXRvzW/ibeZA1BDZRgQ/qjVUct06Jz+tj5ngzLGyxAw8ZH1ebTWOwW2quLrghwl9SWDr6cYGl3q47Lyl+vbGNG/4g97VF2bYkm5MijKsZBLdvXAyo6H/Blqt303m+sdIsrIfY+vp49hm21A5eK2KFc+phRcQaUM9vQoBWajg7XaIBwWGZTGo3ZBgtAmashQo7+ZVzzcaOns5//ZjrEMQuq7f2Arfzmhn/9iAA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTPLZ-0005xN-N8 for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 12:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jan 2025 17:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75291 X-GNU-PR-Package: emacs Original-Received: via spool by 75291-submit@debbugs.gnu.org id=B75291.173584024222865 (code B ref 75291); Thu, 02 Jan 2025 17:51:01 +0000 Original-Received: (at 75291) by debbugs.gnu.org; 2 Jan 2025 17:50:42 +0000 Original-Received: from localhost ([127.0.0.1]:46513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTPLG-0005wj-Fu for submit@debbugs.gnu.org; Thu, 02 Jan 2025 12:50:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52184) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTPLD-0005wO-JN for 75291@debbugs.gnu.org; Thu, 02 Jan 2025 12:50:40 -0500 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 1tTPL7-0002Nh-Nj; Thu, 02 Jan 2025 12:50:33 -0500 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=/QJnUk3axpzPuJ2jvUnjAcVxSeDz2UIO6UCHhIxhvME=; b=U9fTWEPUUQI1 /pEs+EM0fnBCXI2JeNUmJV64wZv5kO/6s7EPcL9pQPAMl+azts0GuTv9bkgIlVSQ8D5WmFFrfuBUf CBJHxaienL+Uh6A49oMxo1IC9Snwt6dvgQrJlccv98tx3b5pgX/t6UeEU4IvHuNuYob2yguZx0qPt fcWnb6tq03Y0I4UK7hzPl3Xb3yudO+q0CaZ3Y08BY0EG+IqCk5ALEI4Ab82p8fxb275I0ylWFSlt6 tHEX+RTvh+UqbO0kLuTkF6zLbfEclo4Q4kH4lY6KjRo0bJUDAe1N4WybAC8zrpoS+vjROufgqsDe6 3L641kVC9xlT8xCfNC05nw==; In-Reply-To: <874j2h3yzb.fsf@dancol.org> (message from Daniel Colascione on Thu, 02 Jan 2025 12:30:16 -0500) 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:298211 Archived-At: > From: Daniel Colascione > Date: Thu, 02 Jan 2025 12:30:16 -0500 > > Sometimes we don't redraw when its effective face changes indirectly due > to a face filter condition evaluating differently. > > An explicit redraw-display works around the problem, but it shouldn't be > necessary and is an efficiency hit. > > See the code below: > > ;; -*- lexical-binding: t -*- > > ;; emacs -Q > > (setf my-window (selected-window)) > > (dolist (face '(default fringe)) > (face-remap-add-relative > face `(:filtered (:window foo t) (:background "green")))) > > (set-window-parameter my-window 'foo t) > > ;; During this sit-for, background and fringe should be green > (sit-for 1) > (set-window-parameter my-window 'foo nil) > > ;; Enable to work around bug > (when nil > (redraw-display)) > > ;; During this sit-for, background and fringe should be their original > ;; color (probably white), but only the background changes. > ;; Without redraw-display, the fringe remains green. > (sit-for 1) I think this is bug#74876 again. I tried to explain there why the way the fringe drawing is implemented doesn't work well with face-remapping (or with changes in the fringe face in general). Maybe I'm missing something, but supporting what this and that bug want would need a rewrite of update_window_fringes (and possibly also the way we record fringes' attributes in the glyph row).