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: Thu, 6 Oct 2022 09:48:12 +0200
> In the scenario described in this bug report, point is copied to the
> new window, so the result is as expected.  Deactivating the mark also
> does the expected job.  So it looks like adding
> internal-region-overlay to the persistent window parameters is a good
> solution in this case.  I suggest that you try that, maybe you will
> see some problems that I missed.

With emacs -Q put the following text into *scratch*


(push '(internal-region-overlay . t) window-persistent-parameters)

(defvar foo-conf nil)

(defun foo-save ()
  (interactive)
  (setq foo-conf (current-window-configuration)))

(defun foo-restore ()
  (interactive)
  (set-window-configuration foo-conf))

(split-window)

;; (eval-buffer)


evaluate it and do M-x foo-save followed by C-x o.  Move point and
activate the region.  M-x foo-restore now gets me two overlays, one in
the upper and one in the lower window.

Now try again with 'internal-region-overlay' not made persistent, that
is, the first line commented out.  The same scenario gets me one (albeit
illogical) overlay in the upper window only.

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.