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 #56 received at 58175 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 58175 <at> debbugs.gnu.org, miha <at> kamnitnik.top
Subject: Re: bug#58175: 29.0.50; M-x window-swap-states during an active mark
 leaves behind a region overlay
Date: Fri, 7 Oct 2022 10:17:27 +0200
> Could be, but the behavior is not documented, AFAICT: the doc seems to
> suggest that `window-state-put` doesn't touch the parameters that are
> not mentioned in `window-persistent-parameters` (whereas it actually
> throws them out unconditionally).

AFAICT that's consistent with the remaining behavior of these functions.
The values of the window where the state is put are completely replaced
by the values of the window where the state has been obtained from.

> I see 3 options:

I'm still not convinced that window parameters are the best choice for
keeping information about the highlighted region.  I think they should
be used only for things that do not depend on the buffer shown in that
window or on some global variable.

The parameter used here is a conglomerate - 'window-point' is window
local, the mark is buffer local and which window is the selected one is
global.  But since, as Eli said, we also may want to highlight the
region in non-selected windows, there might be no better choice.  In
either case, please keep in mind that the persistence of parameters must
be also handled by ‘set-window-configuration’ though that one never has
to transfer properties from one window to another.

martin

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

Previous Next


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