From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs 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 Message-ID: <4b64c2c5-4613-c690-d32d-ce21e36faba0@gmx.at> References: <86sfkaay2d.fsf@miha-pc> <83a66if2r0.fsf@gnu.org> <8735cauh0b.fsf@miha-pc> <837d1mf0op.fsf@gnu.org> <83fsg6186y.fsf@gnu.org> <83bkqrv8af.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17889"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58175@debbugs.gnu.org, monnier@iro.umontreal.ca, miha@kamnitnik.top To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 05 09:37:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ofyy3-0004TX-70 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Oct 2022 09:37:23 +0200 Original-Received: from localhost ([::1]:53058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofyy2-00019G-5n for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Oct 2022 03:37:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofyxi-00018I-5v for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 03:37:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56707) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofyxh-0004GE-Sl for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 03:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ofyxh-0000sx-KR for bug-gnu-emacs@gnu.org; Wed, 05 Oct 2022 03:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Oct 2022 07:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58175 X-GNU-PR-Package: emacs Original-Received: via spool by 58175-submit@debbugs.gnu.org id=B58175.16649554163392 (code B ref 58175); Wed, 05 Oct 2022 07:37:01 +0000 Original-Received: (at 58175) by debbugs.gnu.org; 5 Oct 2022 07:36:56 +0000 Original-Received: from localhost ([127.0.0.1]:55785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ofyxb-0000sd-JJ for submit@debbugs.gnu.org; Wed, 05 Oct 2022 03:36:55 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:46727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ofyxZ-0000sN-4W for 58175@debbugs.gnu.org; Wed, 05 Oct 2022 03:36:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1664955403; bh=7ducdzYF0e4UoIBANhpJURoiUrnwYULEwC1Ei0MWiks=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=NiQErfS6qO03LUePiZhYtW/Ax9lJNKKkUSlWgGxvBquFK7MebwN+JYsFAcw3kz2k3 zXA/SXju4pMPh2hQuexyZ4tpDrtFwfyuo2ppbOYfSH2XrFoXFvxRnp/+n/aS45r/U7 ctlqdeAszszvmLI+fqM5P+wAl4/0tw99ns+MIHgg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([213.142.97.113]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MryXN-1p0gne0AZJ-00nuef; Wed, 05 Oct 2022 09:36:43 +0200 Content-Language: en-US In-Reply-To: <83bkqrv8af.fsf@gnu.org> X-Provags-ID: V03:K1:9G4oQ7VtltD63K4d0RAnlaIGuaydTTcvnnnDmQeie7uWp+Hl1g5 kPXWrbKI/s8ko1ubx+nppylpQCplH+SZBDL/wmlWd4MOsBSQgYEfG6PP7Dvv++jotrslT7A NWxfCqKlqa1oP7+GBjnS2dK2UwR02VxuZ5ppYgSzJZH7SgX7D2fBS49ppCJaNpf2kY6eQ28 a1zoG6U1rAziwYID+ehfA== X-UI-Out-Filterresults: notjunk:1;V03:K0:/2SOpUyai5I=:O6LsU83NVh5ckBEIRdeddB pdBnot1T0PNKP2uNGoCR5M97pNgyeljZHKmxZaDWoF3RERMGtnbsBK5a0ECPcyrAAxVKXubbH 1om+mef3Nxo1YRCqZhXtaoniBA5sOabxHt9s2sFKy+EGUc2B9th/wsJxHbGqUlH3qW8xsZVlk QJ8oAprTHUm/gMUvuIQkTv7hhHp5dJVAf4J4VZSpdoAzV1U4leW6Ha8BSBXeWvK5COnbvvaFX kEsRqiRb8j5IKEyaUL1d7vzZnNY00ocnkE1ZXW958lEhJmhyTm/hkSO1kx+VNCFTXbB3LcuJ8 ivhxQZb+dwGSW7WQ8BWjnRF6NSxD8urT7fyo2y4CfWz6HAzblnDMbI/OKtTANFpLu2QYXIoHb w5hJvCTkOIkDZHQsGFcTRHrX4/wBsRyokrbOqDhCskXIw/UdJ8TgNCGpH/U+6utsp+fsp3SAd UPmGdZMtZUe4yvNhYb+3jDvQfyrGhTgrEgJBzTWlIn+M8XeO59awAjkoTO9mVSy40zTcbnv9n 6Dr9G4ZvzJiHogIntvkDO8LAhUusRZDFqreg9VnZ1gOP0zSTVYXFiNT3dnAkgSwzNI21pF86G DtqPSEFEmK/LpZ9eJDD7wcA7TBFSc7IO8qf1CpVNhMSUGNnk9RQnbRHaYkI92LBRcZSJxIdeE l6QRZWKLbIqUg4xqo7fSmKBq+JzAsv7mG74COYCi1FghMSXRbcCBpXUXXMm28+m4nirvb3aBL u5CzLGZ2bf9EK4ezmI+M7psD8VnOA7RpThj3LyYP2wI3gsOfAKFfL4xboZttigmpYXFsZWLx X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:244495 Archived-At: >> (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