From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.bugs Subject: bug#74876: 31.0.50; Force fringe refresh / force-window-update not affecting fringes Date: Sat, 14 Dec 2024 20:31:00 +0100 Message-ID: <7yl87cc0algqh3xvlrywg2z8@mina86.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32674"; mail-complaints-to="usenet@ciao.gmane.io" To: 74876@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 14 20:32:24 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 1tMXsF-0008Nd-74 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Dec 2024 20:32:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tMXrx-0006Mu-Gv; Sat, 14 Dec 2024 14:32:05 -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 1tMXrv-0006Md-4B for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 14:32:03 -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 1tMXru-0001LD-Rz for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 14:32:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=+SmXZCZzJDZ+i5rIWhyhq88ua0d1CnPhuephiOTg7PA=; b=vkLtZHQ9k1SKDK8baZjKjE9fsoWunYeO9NzVj25KfmsPbM97uOVUtSsJeTRTPjs/k5eyO+VBJUlaw/mvUjqxnBC5qu1NYQzyaqF+bT0En7tw5JkZMaR6lQkYR/kRo06IO9e49Br1vwct6EYXf1AGc9Fts1f/xki4zmseyT7pSxTy/Z7teH3VbYHNGCUpO5uIE4fidutHRc1wIsfGrDDgANjyWVrnffJUCH0Q1eijL8AJvesLA7odwmd0fwou3m1aBSI6AL76TerXdOFPH1J5w8gngjAbbxl8G0msuLKDLr2YhuaV0RNd5EFc7u6LSIK3dAbNf91FTEJAtsYjVdQCdA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tMXru-000331-LA for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 14:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michal Nazarewicz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Dec 2024 19:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74876 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173420467611633 (code B ref -1); Sat, 14 Dec 2024 19:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Dec 2024 19:31:16 +0000 Original-Received: from localhost ([127.0.0.1]:48419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMXrA-00031Y-2k for submit@debbugs.gnu.org; Sat, 14 Dec 2024 14:31:16 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:33022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tMXr4-00031A-3A for submit@debbugs.gnu.org; Sat, 14 Dec 2024 14:31:14 -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 1tMXr3-0006Jo-Ez for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 14:31:09 -0500 Original-Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tMXqy-0000nt-Ki for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2024 14:31:08 -0500 Original-Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a9e44654ae3so417559966b.1 for ; Sat, 14 Dec 2024 11:31:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734204663; x=1734809463; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:face:subject :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=+SmXZCZzJDZ+i5rIWhyhq88ua0d1CnPhuephiOTg7PA=; b=ISjwJbVm2QggGGDfQbUoEW/ewNte/bvleqMQ2rJMhSxrPTXnyE9M6FU7trzMxMdTVV sUNKgI+OJxF5f89P8iMRxweRvXRTKEfq3KBNLLCZR3O0n45Vl2ctVF4fD4tR1ylBzxEY guJRlQkMTKUxGQTNFZ1KVfs+5KBig8CIEprELrAf0C2YksuEU4Uzl5eTqNGg7/dXdzCb ABD+zLV4uQoME/pNABKIUkdjYi7ymiCJ1Wb3oaJuDl/mw2t9yeMxtpJrQlN+sPzzaANi 9RgDoqNV4GDrk4Mzhp3iUoE0RDdsdAdv1P/w4VVBilXlI7FX5EbGlSkoePEhiPtt2G17 DBEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734204663; x=1734809463; h=content-transfer-encoding:mime-version:message-id:date:face:subject :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+SmXZCZzJDZ+i5rIWhyhq88ua0d1CnPhuephiOTg7PA=; b=ErRaFM2sp6RFrSpsP6Ce0t5sxpfL1EbsFZUARvIYQ/+YpvLz8ksQ323ef/hilGHFXH fbjCYvsJI0osrW9DpSPfN6h/UOq6nz1MdNmdkhUFynWvwOno5MLtYN7pmULN5ca67T+t Bxaq1gCEnTvTydGz7M0IIH6Gk3L9aw/uaN/nM/udFugc6AcJrNpl8g1UEsH9iyb9w+v0 PiU/rvrpbZSNXcsh8IVnWQYZ7Xq3o3vwoqVw0Lco7VfQ12q19OWSacuW2+HgVDPckR1h ktAuGxaLgAJK8gqIw6MRKAmE0rA/dm8jEYWBFcZERqmWeE/Eda+1y9AZmgdAaQSzS73Z zy+Q== X-Gm-Message-State: AOJu0YyNglVYIGxCtH6oeYN14PLcH6C37QOetSse9H5eUZ2awYrVab+J Qa2mE7t5vKn/ALKOejfk//vYtQvbQiEn5G1YkHp5MQVGenRWy8OcUbpK/g== X-Gm-Gg: ASbGnct43k75YBmPM4NQJVP/1/+HNj//Q7/q7SncVP88W+Bek7hjWA/ZWUKWQD3F8pM GZScfA8WkUDsQ1C+MjV7o50ARHVpRVIFDcpBogJIy93XLP8PrlKNwm7RGUBIMAA96aleCbl0Bua 0HR9YGlWfyypgrpb0gH/NZaoMNbtCR7u/X6r8ABfrwUxS1peVcpvO45kA31n372KKbradGE/BRg GDJYidnn94kYQse8DIJWK2kfsSZ+FYH/JDyty0YonnR8lgRBu00f98tMbulUzMMtPKrppRiCmkC Lbiu3w== X-Google-Smtp-Source: AGHT+IH2x4hkosYS8TAW55ZZwiv1nCWB8GmPGQwhiEcXWQVkFGrM9JXWq39EBBb6W+BtO7z28REF1g== X-Received: by 2002:a17:907:7d9e:b0:aa6:8676:3b3b with SMTP id a640c23a62f3a-aab779cf78cmr726896766b.30.1734204662460; Sat, 14 Dec 2024 11:31:02 -0800 (PST) Original-Received: from erwin (87-205-2-211.static.ip.netia.com.pl. [87.205.2.211]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aab9600df0csm127232066b.24.2024.12.14.11.31.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Dec 2024 11:31:01 -0800 (PST) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWjgIPUupJ7V0jLrom4gmjPs42bY0MdFRLHgE5UPDCbfGm9mH6qmkAJAAACNUlEQVQ4y23SMW/aQBQHcKtb2Zx0abZeIxuTCSELJVmiinboRpGHJktloROQzUQcB2vUXFe35XBYUicRAiYUVSjfru/d+QwlnDz5p/97z+dnVcw5WVQ2zxpcdrQTTiIin3bB6lcaTnaBO5c8eoJG2yBl5El+Ob3fglMW3RUIkQ9xxQ8UBEFQafiVZ/5wZqWExM+LvwEegAY856xZO7MgQkq3jxpO56GXxO5VDQAjpVmWqPLYoSGvIahIuvAVHLeEEDd9DRYAkUcKzscAUgCQ0hwSKBOExuh7kvQQUskY4yjsHqeaCfFjLK6x1AzeeyiRD/C1JW5aGqw5IS5mZre+FVz0RVtoUGPJmBCP/4QPJGKUA1oEMJwAHIv+JljYZYCJi1FRQS2DaUw6sgsQTMfb0Fz9RvjyP3iR01x9RGj0N6HgcefS819CSjidDwIFPSFEDgRg1tUw2oBXAB33T2DV63XbM6AqhZzysm3ZcKZrKBAn5O7Q1rAqGoBKNGRsmUG1n0NKaJtd2RnscTWvnom6fGngDaNrCNl728A+c2gLQP8PFpkEjNWjlGqQfPEhWRqoInSyi2p+drsGDjhAeAeSQI8kfjSwbwCn8gblvIftInzT30HdQT2HlU4gwCbLSQ7VFqVEA0RCtjTwtnjdLlkasNjQwF7x02F2iQSL8XIGB8 VQ71WBKHHf5XCIgLUUtIcGSBPhdZIQorpEBrxsqT3GYgRpmicIqrsEgSZm3FG+iJbHYid0/wGj+iTGCXRsqQAAAABJRU5ErkJggg== Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=mnazarewicz@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MSGID_RANDY=2.599, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:297073 Archived-At: I=E2=80=99m implementing fringe dimming in non-selected windows as an exten= sion of the NonGNU ELPA auto-dim-other-buffers package (see ). is a test code which tries to achieve it. The expected behaviour is that after enabling auto-dim-other-buffers-mode defined there, as you switch between windows, the fringes of non-selected windows will be red. Alas, it appears that fringes are redrawn lazily such that changing window does not refresh the fringes. For a bit more context, the package uses face-remap-add-relative and :filtered faces, i.e. something like: (face-remap-add-relative 'fringe '(:filtered (:window adob--dim t) auto-dim-other-buffers-fringe-face)) I=E2=80=99ve tried toggling fringe-mode when forcing window update with the below code, but it did not do the trick. (defun adob--force-window-update (object) (force-window-update object) ;; Force fringes to be updated (when fringe-mode (dolist (wnd (if (windowp object) (list object) (get-buffer-window-list object nil t))) (let* ((frame (window-frame wnd)) (params (frame-parameters frame)) (left (alist-get 'left-fringe params)) (right (alist-get 'right-fringe params))) (when (and left right) (modify-frame-parameters frame '((left-fringe nil) (right-fringe nil))) (modify-frame-parameters frame `((left-fringe . ,left) (right-fringe . ,right)))))))) I think what I=E2=80=99d like is for force-window-update to force full frin= ge redraw? Honestly, I haven=E2=80=99t yet dug through all of the window and fringe code so I=E2=80=99m not entirely sure where the main issue lays. Configured using: 'configure --prefix=3D/usr/local --enable-link-time-optimization --with-native-compilation=3Daot --without-dbus --without-gconf --without-gpm --without-gsettings --without-pop --without-selinux --without-systemd --without-toolkit-scroll-bars --with-x --with-x-toolkit=3Dgtk3 --with-xinput2 --with-xml2 --with-tree-sitter 'CFLAGS=3D-O2 -mtune=3Dnative -march=3Dnative -fstack-protector' 'CPPFLAGS=3D-O2 -mtune=3Dnative -march=3Dnative -fstack-protector' 'CXXFLAGS=3D-O2 -mtune=3Dnative -march=3Dnative -fstack-protector'' Configured features: CAIRO FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND THREADS TIFF TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_COLLATE: C value of $LANG: en_GB.utf8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: server-mode: t form-feed-mode: t auto-dim-other-buffers-mode: t global-auto-revert-mode: t icomplete-mode: t global-num3-mode: t num3-mode: t global-whitespace-mode: t whitespace-mode: t global-flyspell-mode: t remember-notes-mode: t delete-selection-mode: t windmove-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t minibuffer-regexp-mode: t column-number-mode: t line-number-mode: t auto-fill-function: do-auto-fill transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/mpn/.config/emacs/elpa/transient-20210525.1141/transient hides /usr/l= ocal/share/emacs/31.0.50/lisp/transient ~/.config/emacs/custom hides /usr/local/share/emacs/31.0.50/lisp/custom Features: (shadow emacsbug sort mail-extr notmuch notmuch-tree notmuch-jump notmuch-hello notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-message notmuch-draft notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser format-spec notmuch-wash diff-mode track-changes coolj goto-addr icalendar notmuch-tag notmuch-lib notmuch-compat pcase hl-line mm-view mml-smime smime gnutls dig gnus-alias rot13 message sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader cus-edit wid-edit dabbrev checkdoc lisp-mnt shortdoc crm avy misearch multi-isearch cus-start cus-load pulse color pp cl-print help-fns radix-tree time-date auto-package-update easy-mmode dash descr-text server flyspell form-feed init sgml-mode facemenu dom auto-dim-other-buffers face-remap autorevert filenotify comp comp-cstr cl-extra help-mode warnings comp-run comp-common rx icomplete num3-mode disp-table whitespace compile text-property-search comint ansi-osc ansi-color ring ispell remember advice browse-kill-ring delsel ffap thingatpt windmove diary-lib diary-loaddefs cal-menu calendar cal-loaddefs auto-dim-other-buffers-autoloads avy-autoloads browse-kill-ring-autoloads csv-mode-autoloads evil-autoloads gnu-elpa-keyring-update-autoloads gnus-alias-autoloads finder-inf markdown-mode-autoloads notmuch-autoloads protobuf-mode-autoloads sed-mode-autoloads info vterm-autoloads package browse-url xdg url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs icons password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib early-init rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads inotify dynamic-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process native-compile emacs) Memory information: ((conses 16 257215 704427) (symbols 48 34587 67) (strings 32 82254 29315) (string-bytes 1 2545384) (vectors 16 34779) (vector-slots 8 825430 881688) (floats 8 257 4262) (intervals 56 3296 6731) (buffers 992 19)) --=20 Best regards =E3=83=9F=E3=83=8F=E3=82=A6 =E2=80=9C=F0=9D=93=B6=F0=9D=93=B2=F0=9D=93=B7= =F0=9D=93=AA86=E2=80=9D =E3=83=8A=E3=82=B6=E3=83=AC=E3=83=B4=E3=82=A4=E3=83= =84 =C2=ABIf at first you don=E2=80=99t succeed, give up skydiving=C2=BB