GNU bug report logs - #58175
29.0.50; M-x window-swap-states during an active mark leaves behind a region overlay

Previous Next

Package: emacs;

Reported by: miha <at> kamnitnik.top

Date: Thu, 29 Sep 2022 17:17:02 UTC

Severity: normal

Found in version 29.0.50

Full log


Message #17 received at 58175 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: miha <at> kamnitnik.top, martin rudalics <rudalics <at> gmx.at>
Cc: 58175 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: 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
> Cc: 58175 <at> debbugs.gnu.org
> Date: Thu, 29 Sep 2022 22:19:34 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > From: <miha <at> kamnitnik.top>
> > Cc: 58175 <at> 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?




This bug report was last modified 2 years and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.