From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58175: 29.0.50; M-x window-swap-states during an active mark leaves behind a region overlay Date: Thu, 29 Sep 2022 21:17:56 +0200 Message-ID: <8735cauh0b.fsf@miha-pc> References: <86sfkaay2d.fsf@miha-pc> <83a66if2r0.fsf@gnu.org> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19143"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58175@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 21:05:37 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 1odyqm-0004lu-Px for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 21:05:37 +0200 Original-Received: from localhost ([::1]:51688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odyql-0007Jh-NN for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Sep 2022 15:05:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odyqG-0007JC-Ox for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 15:05:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40514) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odyqF-0004Y0-4g for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 15:05:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odyqD-0005qG-Ju for bug-gnu-emacs@gnu.org; Thu, 29 Sep 2022 15:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Sep 2022 19:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58175 X-GNU-PR-Package: emacs Original-Received: via spool by 58175-submit@debbugs.gnu.org id=B58175.166447824822391 (code B ref 58175); Thu, 29 Sep 2022 19:05:01 +0000 Original-Received: (at 58175) by debbugs.gnu.org; 29 Sep 2022 19:04:08 +0000 Original-Received: from localhost ([127.0.0.1]:39592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odypM-0005p5-2z for submit@debbugs.gnu.org; Thu, 29 Sep 2022 15:04:08 -0400 Original-Received: from kamnitnik.top ([209.250.245.214]:50586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odypI-0005ot-Rw for 58175@debbugs.gnu.org; Thu, 29 Sep 2022 15:04:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1664478242; bh=xGbKTKvkhFLsXiTM9d1vkZKES+vD44TTqf3WZEKAZm0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=b3EIAgm5SgasYeBVUbvUXy0ow0aRgGkuyUNjOwLbY+3eA7AqFiwkiD43rVUDql7ic qIY3UwAhRTk+NzqGGb2ErJpzfu9A8uM3FKGkquc9qJpLFxOk08HrynkZjRBTynKauY SvGpC2xdhHf7frYuB8ksoYXnW34B6IvbXIx3d62EICHZdbh5HIJHw1BTciLh62ElTh La3Mu45vthQc2nj6Sj0tORgFU+ek2pn5WQG9ZXeGEUpmKahrh9+kDqZczVBWv/muwe PEAQSdTn0kIp76ydMPTy4UF5WsgXMdIaK1pEEd2ZldHm7XUKGg0n4jfLK5nv+TkEDz 05jcDLw/CuRPg== In-Reply-To: <83a66if2r0.fsf@gnu.org> 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:243945 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> Date: Thu, 29 Sep 2022 19:29:46 +0200 >> From: miha--- via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> 1. 'C-h e' to display *Messages* in a new window >> 2. 'C-SPC C-n' to mark an active region >> 3. 'M-x window-swap-states' >> 4. 'C-g C-n' to deactivate the mark >>=20 >> Notice how the region overlay stays there. > > "There" where? In the *GNU Emacs* buffer, where we have originally marked a region in step 2. > What did you expect to happen in the above scenario, and why? I expect the overlay to disappear after deactivating the mark with 'C-g' in step 4. >> window-state-put sets 'internal-region-overlay' window parameter to nil >> without removing the actual region overlay > > Where in the code do you see that? I see this: > > (with-current-buffer (window-buffer window-1) > (dolist (overlay (overlays-in (point-min) (point-max))) > (let ((window (overlay-get overlay 'window))) > (cond > ((not window)) > ((eq window window-1) > (overlay-put overlay 'window window-2)) > ((eq window window-2) > (overlay-put overlay 'window window-1)))))) > > AFAIU, this _swaps_ the 'window' property of the overlays, so that the > overlay now belongs (and should be visible) in the other window. > Which is what I should expect. Indeed the overlay is shown in the correct window after step 3. The problem is that it doesn't disappear after step 4 ('redisplay--update-region-highlight' doesn't remove it). > What am I missing? Perhaps you forgot to deactivate the mark in step 4? If there is anything unclear in the bug recipe, go ahead and ask. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmM172QTHG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP1a0D/9WkK43EAiSf6/Eb4Mj9+r1VifEdeta G1HJ6kJG6mXZKVCS5Q9O3tPIw8I14GpJ+4Ic3oSvtgusNkADumOZJRSon9OEZidh OVfNvy/sZefr2N9J8uuEzeODHF1JaUZ5e+2BXqSGFl9PQI/p5JpZyr5l5jKXzelu 2oUOMBnWiufEo9bQQGCwfyM4hphMDr5ZO99y6uHYBRZgGLuDAKZJK6nwgiF/lXYK mjZxRq7J3M7LflV5nff2+bU0XrU0zp+CX3uxhASIewI/RKpWfQDf02cva21v6gB5 StSuObcGZECLCfh9ZOQFYLWB6Pw7s1QnsjqOH6t9XhuhhqG/ikAioRUjCeQeDpeA yXFg2tZMfzu+PbC3H7MO/CHysveQoZcCEogYxnbaJJuL93WXCEYrZR2ads0Tm14d miqU3RdebJH4LVWWSLz/B/vZMJzJ4ol+GyDnp7og9KLCPIQ1RJaXX5T1psLm8C9r 7JSZY0mh/tEKy3ghyI5UvkPvb7CWJ+C96UydzEqTL4FwLGVzh9uh+XS5PzOitS9f 3IpSjZBfc/wGQtkOIvV1CWQ7AeQ1TkqYf7KTC0OsyC3srTd4TcV8ewn1k1MtYYc2 GNr1NBtoUZYccmCkDtZBI+T3MTfJjr5Z6MKD/4+XwlybLriPWp4dZ1nOH7ojTnNe /sruGKMAP0ih7w== =G34U -----END PGP SIGNATURE----- --=-=-=--