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


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58175 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, miha <at> kamnitnik.top
Subject: bug#58175: 29.0.50; M-x window-swap-states during an active mark leaves behind a region overlay
Date: Wed, 5 Oct 2022 09:36:40 +0200
>> (push '(internal-region-overlay . t) window-persistent-parameters)
>
> Thanks.  Does this affect only window-swap-states, or does this affect
> anything else?

It affects every use of window states like saving and restoring the
desktop as well as saving and restoring window configurations.

Now keeping the mark active when restoring a window configuration is
problematic in the first place since it restores the mark from the saved
state while taking point from the current state possibly ending up in
some arbitrarily specified region.  OTOH deactivating the mark in such
case is hardly feasible because restoring a window configurations should
be barely perceptible for the user.

> If the former, I guess the above should be done
> globally when Emacs is dumped?

I would try to get rid of the window parameter used here.  Active region
highlighting is an activity that affects the selected window only and
not any window.  The 'window' property of any overlay used for it must
always refer to the selected window and not any other window.  So I see
no use for window parameters here which are mainly useful for overriding
a global variable or the local value of the buffer shown in a window.

I'd rather use one global overlay and move it (by setting its 'window'
property) whenever 'window-selection-change-functions' tell me that the
selected window has changed.  But maybe I'm missing something here.

martin




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

Previous Next


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