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#58175: 29.0.50; M-x window-swap-states during an active mark leaves behind a region overlay Date: Sun, 02 Oct 2022 19:50:13 +0300 Message-ID: <83fsg6186y.fsf@gnu.org> References: <86sfkaay2d.fsf@miha-pc> <83a66if2r0.fsf@gnu.org> <8735cauh0b.fsf@miha-pc> <837d1mf0op.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6228"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58175@debbugs.gnu.org, Stefan Monnier To: miha@kamnitnik.top, martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 02 18:52:23 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 1of2CV-0001UR-HO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Oct 2022 18:52:23 +0200 Original-Received: from localhost ([::1]:48906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1of2CT-0002I3-Vz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Oct 2022 12:52:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of2BC-0000zD-NE for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 12:51:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48826) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1of2BC-0008VO-FX for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 12:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1of2BC-0007kI-4s for bug-gnu-emacs@gnu.org; Sun, 02 Oct 2022 12:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Oct 2022 16:51:02 +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.166472943029735 (code B ref 58175); Sun, 02 Oct 2022 16:51:02 +0000 Original-Received: (at 58175) by debbugs.gnu.org; 2 Oct 2022 16:50:30 +0000 Original-Received: from localhost ([127.0.0.1]:47904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of2Ag-0007jV-6G for submit@debbugs.gnu.org; Sun, 02 Oct 2022 12:50:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1of2Ae-0007jA-J5 for 58175@debbugs.gnu.org; Sun, 02 Oct 2022 12:50:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of2AY-0008OW-4C; Sun, 02 Oct 2022 12:50:22 -0400 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=JRukxhDc8X96i3ZFjB74h40bljlSnofs/upLjvbcwqk=; b=ZURk6q7k08SL dWBPbjWRVD+dIZ4pqBkFeVG7FrY66ruawBLfdZsvf9F1LpA4QMOCLH5cwSmIa/AFIgYABEM04GX3+ 0my9jteqfEN0Xn8qTH9fPBA0IvJSjNEiOcJDqoNqaRQ8WOghOLl2GRLhi1z1cKFQwenAfF3eYILV2 Q6X5YgyIrAYWiG0heoj0kehjr3tpxZXeTtKKMl50uSSTIj/BTkRGiOzhiCOVh8YLol2tCkzVBNwWR ccRUVlZ8qGDT9N3WTQMxau9nEWjQsGPo2IhPPzpX9Hs5MXuaBjUNTtCbpG5mQBs1lt6m0HDpDY3ec nOuwL1ld8Q7hxvLboQU81A==; Original-Received: from [87.69.77.57] (port=1958 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1of2AX-00054m-JR; Sun, 02 Oct 2022 12:50:21 -0400 In-Reply-To: <837d1mf0op.fsf@gnu.org> (message from Eli Zaretskii on Thu, 29 Sep 2022 22:19:34 +0300) 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:244244 Archived-At: > Cc: 58175@debbugs.gnu.org > Date: Thu, 29 Sep 2022 22:19:34 +0300 > From: Eli Zaretskii > > > From: > > Cc: 58175@debbugs.gnu.org > > Date: Thu, 29 Sep 2022 21:17:56 +0200 > > > > >> 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 > > >> > > >> 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. > > Ah! Now it's clear what this issue is about. > > The problem is that deactivate-mark doesn't work in this case, for > some reason, and neither is setting mark-active to nil. Looks like the internal-region-overlay window parameter, which is important for correct workings of region-highlight, isn't copied correctly to the other window as part of swapping state, because its value ends up as "overlay N in no buffer", i.e. the overlay's buffer is lost in transition. Martin, Stefan: any suggestions or ideas?