bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58175: 29.0.50; M-x window-swap-states during an active mark leaves


From: martin rudalics
Subject: 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]