From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#54450: 29.0.50; redisplay--pre-redisplay-functions issue Date: Fri, 18 Mar 2022 19:52:14 +0100 Message-ID: <20220318185214.h7hvpu56vgqdameb@Ergus> References: <87pmmjw9ru.fsf.ref@aol.com> <87pmmjw9ru.fsf@aol.com> <83sfrffb59.fsf@gnu.org> <20220318174252.xd33nalq4fdwpkeb@Ergus> <83r16zf6n9.fsf@gnu.org> Reply-To: Ergus Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38622"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54450@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 18 19:54:15 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 1nVHjq-0009sE-3s for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 19:54:14 +0100 Original-Received: from localhost ([::1]:56862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nVHjp-0001fE-0E for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Mar 2022 14:54:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVHje-0001cU-Uu for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 14:54:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVHje-00069f-M4 for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 14:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nVHje-00082H-Gk for bug-gnu-emacs@gnu.org; Fri, 18 Mar 2022 14:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Mar 2022 18:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54450 X-GNU-PR-Package: emacs Original-Received: via spool by 54450-submit@debbugs.gnu.org id=B54450.164762958830796 (code B ref 54450); Fri, 18 Mar 2022 18:54:02 +0000 Original-Received: (at 54450) by debbugs.gnu.org; 18 Mar 2022 18:53:08 +0000 Original-Received: from localhost ([127.0.0.1]:58388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVHim-00080d-G2 for submit@debbugs.gnu.org; Fri, 18 Mar 2022 14:53:08 -0400 Original-Received: from sonic316-11.consmr.mail.bf2.yahoo.com ([74.6.130.121]:45533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVHil-000803-0T for 54450@debbugs.gnu.org; Fri, 18 Mar 2022 14:53:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1647629581; bh=W1GZDSq1YadfUIIF6rB2b+4SbJkPfuIKA0RZTRqIX1s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=Hg/VM9rs/EJbDZALTHV3VL3KXjxmZejlXfqGgNuWDdAq7nJJnavBundXvbE0p5fBTsE05ELhF4kseAZlQq3rK+xXV6VQm+Ay2m9TS2cXHCs9h3u84fPL8BuQivLYdOON+SNk/jJ2WypHHMDz2AuH33CZwaiexEPs80Wc3Vk2CgE8FCIzpLVKZI/bnv9al00smu2GnehIrsTy2G8Z6rdtgYcCkVfZbxzOXnAINRsA/pdbJ+NckPLwlSB3sxA8gB07CCsTAoAEC2nJ1YsfGS0HZrWlcrmwxlYF6wIoirxqgCyAzR84bJegilvYT7Sdrf/kFoR21DqS/TSU9h1UW8Cy1w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1647629581; bh=gIiiA92L26wzo4lEI1GD/2H1dzhLdbu2sr9S/PZbNNA=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=PFAR2HdANPn5DNtdU4k5oYrfQEORIlwtT/bC0oYXctUdPcxPMqyr4bNGMkFf6W9ElTku9fOF7Lvkjw8ccMace84s5IIkOFqdtqWMGrnVYUpuIHanngfy9bG84ah8kO7hPIfaE/IByMqN1iVWjtBkXBKapdVvKIFJKr+0LMJdRbOzpCCgWfCb1GkRWcb5+m7Dj/M+wHz7XC8XcZAy63RYDZ3XatwjGkco1i+aHRqEO6JvwX11Z8uNNb/lcJSYrasf1oQvRZIGqfotHSh2O946trfNF07HgKfzIVS6Ua1hdlrulYh+kaOfGmjDKzTjZpyP1TNBKSpOUqdIen4icpk8RQ== X-YMail-OSG: q5VI_2EVM1n2KndTn.bQpuiuSTLtC0188fxOQvaPq88SjL759uoJnciqDvr7o12 1pos9knkYtSD4aYap.VmYtqbk3o1SUy5gfBHFvn.B8atvt3HF7VaD.cmrcIXEl9MZZ9RpTn2aZsi CZx2Udfe_uSPsFAbpeGC.076EOj5E2MHvStxPu6J1fmhQ9tcvL0tZsjruwqZSZ4ldsvedQUx.kTW r_Xchr4.DknLeZ00NSATWpyJ1VB56o6V6Yfhx4wQ1gPfzcEccD0rp8_VIInqvVDc205mT3g4L7uk bo7bowD9TFNTbReMrcDbk9wicZR5kFaUEFWBJx19kHFvVdT_M4x3fdlCm5xRm75SW.BVz9s8Dhq6 N2WGVr_hUY2SaB_bInw7Fj7c26qVQ8RcgaIjR0iZSJJ0jsRiOdXea3nXjVpY57N2Tk2QcFSSxrOf oebayMQZF4TcF5tSi3Ygf6oC68BaLQ6pnWD4zUFn8nAh8vcooJVBqJkBC7.XsWTnoV9LS23M3hoQ ULwPMuEAwmc9XcdPMwki_b1_q.p0.zU_CC1Wykum1PScJoZLOYT.p0WDVWuzyYPEt3J_OJmguAZv 0kfPzZ2EOFCJ.EDK4H0eCS6b6JD3yuX3fmVY6e5N4E3xqrAdrFmJl83IKBZqz1USerRc2lVbO8H6 ComBG3BayYLJqPEKbFjQ7CjR01PNjTDRcz187JYr7Z4fcUuzuDvg7q5D4r8TvlxfgEi5PM.3rfu5 xzAaishebJAHc23gXxIyJUAUIIde58dLWQoG.G.CCwjdVxtt_LReuV.5K_OsBSNKem1SCRJpkxsK EQhJiU6tLkrOiEAz5QF7D4cDDbUEL64X9lMJoiLcEX X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.bf2.yahoo.com with HTTP; Fri, 18 Mar 2022 18:53:01 +0000 Original-Received: by kubenode505.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 204de48eaf5879d243eaf0aeb88a2516; Fri, 18 Mar 2022 18:52:54 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83r16zf6n9.fsf@gnu.org> X-Mailer: WebService/1.1.19894 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol 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:228568 Archived-At: On Fri, Mar 18, 2022 at 08:38:18PM +0200, Eli Zaretskii wrote: >> Date: Fri, 18 Mar 2022 18:42:52 +0100 >> From: Ergus >> Cc: 54450@debbugs.gnu.org >> >> >+ if (highlight_nonselected_windows >> >+ && !NILP (Vtransient_mark_mode) >> >+ && !NILP (BVAR (current_buffer, mark_active))) >> >+ bset_redisplay (current_buffer); >> >+ >> > /* Set TO to the interval containing the char after CHARPOS, >> > and TOPREV to the interval containing the char before CHARPOS. >> > Either one may be null. They may be equal. */ >> >> Hi Eli: >> >> Yes, this could solve the issue for the region, but not in general for >> redisplay--update-cursor-face-highlight which was the initial problem >> with Juri's code. Same for any other function that goes into the >> pre-redisplay-functions hook. > >I asked for a test case, and this is what you gave me. > >If there's another test case, please show it. > Hi Eli A similar issue happens if in the test buffer you do: M-x cursor-face-highlight-mode (setq cursor-face-highlight-nonselected-window t) M-: (insert "AAA"(propertize "Hello World" 'cursor-face 'highlight)"BBB") Then try to move the cursor over the inserted text with the arrows (you should see the highlight when cursor is over the propertized text); The try te same and from other buffer (using with-selected-window). In the second case you will see the cursor moving but the highlighted not updated. >> The region example reported in this issue was only the simplest way I >> found to give you a simple reproducible snippet, but the issue is a bit >> more general. >> >> With the cursor-face we may have a similar issue cause such hook works >> in the same way, so this condition will need to be extended and extended >> and extended on every case for every function in >> pre-redisplay-functions hook. > >I need to understand the more general case in practical terms. Then I >can think about a solution.