From unknown Fri Jun 13 09:52:05 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#9609 <9609@debbugs.gnu.org> To: bug#9609 <9609@debbugs.gnu.org> Subject: Status: Excessive transient region highlighting with highlight-nonselected-windows Reply-To: bug#9609 <9609@debbugs.gnu.org> Date: Fri, 13 Jun 2025 16:52:05 +0000 retitle 9609 Excessive transient region highlighting with highlight-nonsele= cted-windows reassign 9609 emacs submitter 9609 Glenn Morris severity 9609 normal tag 9609 confirmed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 26 21:43:11 2011 Received: (at submit) by debbugs.gnu.org; 27 Sep 2011 01:43:11 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R8MhT-0007A4-3w for submit@debbugs.gnu.org; Mon, 26 Sep 2011 21:43:11 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R8MhQ-00079v-Vr for submit@debbugs.gnu.org; Mon, 26 Sep 2011 21:43:09 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1R8Mgg-0004p2-Bx; Mon, 26 Sep 2011 21:42:22 -0400 From: Glenn Morris To: submit@debbugs.gnu.org Subject: Excessive transient region highlighting with highlight-nonselected-windows X-Spook: SP4 LLNL USCOI colonel investigation enemy of the state X-Ran: bnZLe$E,_"TzVh{+}p]Zz)E0\K^PN~-+$c:&zVCFv19k{2u58Z7gnS$1kQ%k)+;x8'5`-5 X-Hue: black X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 26 Sep 2011 21:42:22 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Package: emacs Version: 24.0.90 emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' -f make-frame Two frames open showing the *scratch* buffer, once frame has focus. With the mouse, click on the "n" of "notes" in the focused frame. Do not release the mouse. In the other frame, a region starting or ending at "n" is now selected. This does not happen in Emacs 23.3. How do I disable this selection of a region in the non-selected frame? (Obviously I can set highlight-nonselected-windows nil, but I want that behaviour for regions I explicitly select.) From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 08:36:04 2016 Received: (at control) by debbugs.gnu.org; 18 Aug 2016 12:36:05 +0000 Received: from localhost ([127.0.0.1]:60970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baMYG-00069U-O4 for submit@debbugs.gnu.org; Thu, 18 Aug 2016 08:36:04 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:36983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1baMYF-000690-5Y for control@debbugs.gnu.org; Thu, 18 Aug 2016 08:36:03 -0400 Received: by mail-it0-f43.google.com with SMTP id f6so15984400ith.0 for ; Thu, 18 Aug 2016 05:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version; bh=zQjWFp4lolK+ZvyldRPybShOhpAdohxVT82oMAaQero=; b=HBblGmPZdwDYGr2+8ZInTA2a0EECDyNlGVwATqj5nDSjf4SV6nrJxcxIL3jBt7tXoS SmaMnF5NbyhhhhgyK0vkQBl5eGlIa2Dv1KmrTMM0xdb+KnMhVToeiSQySr2oY/wvf1Hl BjDL8ugOxhhPMwQhxRL2bLApsV6PCkuwiJmwAFepaS74NKBfZQTGHXodjpRrfxhxYTqu bRdLpv3188KvpN+VBaRLFjF5gRzsCRmVxqdEhugfnVmMgjRgXUkZQKsqembII82KsESt B3+Kh59NzCqbXqd/+MHIaVVDJmMBug1TMYo4tclmOmE6S6FsY09as3L9rzvQROsdGyyY yXsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=zQjWFp4lolK+ZvyldRPybShOhpAdohxVT82oMAaQero=; b=C5URLE+7HLCFO0j+Fag4Ndwppqvmgey0r9IrlC00JNwR0XokWfv+25V2Ey8g9BMFL4 fQfx4lXoHVDdmleM8OYVa2617QJqwxhUVdLOBPGbWOxK6BiJNSkLKRDF40SDP75pKRCN W2cWOUAoP5LpkhqL/Y4H52wP2sPygrFNzOqdRVqxqKqXi6E9mFTptG7x19FssWPeiTbC UOq2PGrLvT30EmpjY9cC2Kg738/TLRJtRUtFdvIN/+Di9EgKMGjtV+4lgRRVIEdS5sWD BudMol32i7dGLkKF/+pOpAhuVpWj7HuAhNLuUlBCDuG5K577nMnlPS00uJCmaFwNJl2B z58Q== X-Gm-Message-State: AEkoout07Ly2A5LbPg58MtiKwzTR9mrkODBC+5OCeXvwiPHA2kJaoY1BY172R1PcgMkjHg== X-Received: by 10.36.43.74 with SMTP id h71mr3072027ita.60.1471523757505; Thu, 18 Aug 2016 05:35:57 -0700 (PDT) Received: from zony ([45.2.7.130]) by smtp.googlemail.com with ESMTPSA id j16sm1013078iod.25.2016.08.18.05.35.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Aug 2016 05:35:56 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: control message for bug #9609 Date: Thu, 18 Aug 2016 08:36:09 -0400 Message-ID: <87h9aiuudi.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) # seems to be present from 24.1 and up found 9609 25.1 tags 9609 confirmed quit From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 02 03:48:17 2021 Received: (at 9609) by debbugs.gnu.org; 2 Jun 2021 07:48:17 +0000 Received: from localhost ([127.0.0.1]:38668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loLbt-0001u9-9D for submit@debbugs.gnu.org; Wed, 02 Jun 2021 03:48:17 -0400 Received: from quimby.gnus.org ([95.216.78.240]:55054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loLbs-0001tv-3p for 9609@debbugs.gnu.org; Wed, 02 Jun 2021 03:48:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jzWn/SHvk6wIraiZ6ZMJP7Qa8xzhw4TAahuvKSg9Egc=; b=SVyZVXZxDKLU9x2gZoXKTD8WUW RUHCGWedoENKNnklKvGoPeirgC86Q5ZQ6+lqNFCQ+0AT210pTUGZh2ZLlGYdp8gBzN+wk1ym44J+R lDT7+Dwaz8SpJYL80n+0rz/hISBqb0eoGrerGp2LiQdTxIpAHwvq7zFpratoCjZzbc+w=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1loLbi-0003RP-31; Wed, 02 Jun 2021 09:48:10 +0200 From: Lars Ingebrigtsen To: Glenn Morris Subject: Re: bug#9609: Excessive transient region highlighting with highlight-nonselected-windows References: X-Now-Playing: Nobukazu Takemura's _Child's View_: "Rill" Date: Wed, 02 Jun 2021 09:48:05 +0200 In-Reply-To: (Glenn Morris's message of "Mon, 26 Sep 2011 21:42:22 -0400") Message-ID: <87fsy0g11m.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Glenn Morris writes: > emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' -f make-frame > > Two frames open showing the *scratch* buffer, once frame has focus. > > With the mouse, cl [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 9609 Cc: 9609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Glenn Morris writes: > emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' -f make-frame > > Two frames open showing the *scratch* buffer, once frame has focus. > > With the mouse, click on the "n" of "notes" in the focused frame. Do > not release the mouse. In the other frame, a region starting or ending > at "n" is now selected. I can confirm that this is still present in Emacs 28. Pretty weird behaviour. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 02 08:43:46 2021 Received: (at 9609) by debbugs.gnu.org; 2 Jun 2021 12:43:46 +0000 Received: from localhost ([127.0.0.1]:39189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loQDq-0008FN-FR for submit@debbugs.gnu.org; Wed, 02 Jun 2021 08:43:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loQDp-0008FB-3O for 9609@debbugs.gnu.org; Wed, 02 Jun 2021 08:43:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46586) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loQDj-0002iz-NF; Wed, 02 Jun 2021 08:43:39 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2213 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loQDj-00012R-8d; Wed, 02 Jun 2021 08:43:39 -0400 Date: Wed, 02 Jun 2021 15:43:25 +0300 Message-Id: <83wnrcxwr6.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen In-Reply-To: <87fsy0g11m.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 02 Jun 2021 09:48:05 +0200) Subject: Re: bug#9609: Excessive transient region highlighting with highlight-nonselected-windows References: <87fsy0g11m.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 9609 Cc: rgm@gnu.org, 9609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Date: Wed, 02 Jun 2021 09:48:05 +0200 > Cc: 9609@debbugs.gnu.org > > Glenn Morris writes: > > > emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' -f make-frame > > > > Two frames open showing the *scratch* buffer, once frame has focus. > > > > With the mouse, click on the "n" of "notes" in the focused frame. Do > > not release the mouse. In the other frame, a region starting or ending > > at "n" is now selected. > > I can confirm that this is still present in Emacs 28. > > Pretty weird behaviour. Probably we decided that the mouse was dragged because the coordinates in the other window are different. Or something like that. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 02 09:35:20 2021 Received: (at 9609) by debbugs.gnu.org; 2 Jun 2021 13:35:21 +0000 Received: from localhost ([127.0.0.1]:39268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loR1h-0003Ju-5J for submit@debbugs.gnu.org; Wed, 02 Jun 2021 09:35:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loR1c-0003Ja-2j for 9609@debbugs.gnu.org; Wed, 02 Jun 2021 09:35:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48086) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loR1W-0007tA-MN; Wed, 02 Jun 2021 09:35:06 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1415 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loR1V-0003F5-VH; Wed, 02 Jun 2021 09:35:06 -0400 Date: Wed, 02 Jun 2021 16:34:52 +0300 Message-Id: <83pmx4xudf.fsf@gnu.org> From: Eli Zaretskii To: larsi@gnus.org In-Reply-To: <83wnrcxwr6.fsf@gnu.org> (message from Eli Zaretskii on Wed, 02 Jun 2021 15:43:25 +0300) Subject: Re: bug#9609: Excessive transient region highlighting with highlight-nonselected-windows References: <87fsy0g11m.fsf@gnus.org> <83wnrcxwr6.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 9609 Cc: rgm@gnu.org, 9609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 02 Jun 2021 15:43:25 +0300 > From: Eli Zaretskii > Cc: rgm@gnu.org, 9609@debbugs.gnu.org > > > > emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' -f make-frame > > > > > > Two frames open showing the *scratch* buffer, once frame has focus. > > > > > > With the mouse, click on the "n" of "notes" in the focused frame. Do > > > not release the mouse. In the other frame, a region starting or ending > > > at "n" is now selected. > > > > I can confirm that this is still present in Emacs 28. > > > > Pretty weird behaviour. > > Probably we decided that the mouse was dragged because the coordinates > in the other window are different. Or something like that. Btw, you don't need another frame to demonstrate the issue. You could do this instead: emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' C-x 2 Click and hold the mouse button on some character From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 02 18:56:46 2021 Received: (at 9609) by debbugs.gnu.org; 2 Jun 2021 22:56:46 +0000 Received: from localhost ([127.0.0.1]:41545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loZn3-0003HP-R3 for submit@debbugs.gnu.org; Wed, 02 Jun 2021 18:56:46 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:3097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loZn1-0003HC-SW for 9609@debbugs.gnu.org; Wed, 02 Jun 2021 18:56:44 -0400 Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 98F83240006; Wed, 2 Jun 2021 22:56:36 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#9609: Excessive transient region highlighting with highlight-nonselected-windows Organization: LINKOV.NET References: <87fsy0g11m.fsf@gnus.org> <83wnrcxwr6.fsf@gnu.org> <83pmx4xudf.fsf@gnu.org> Date: Thu, 03 Jun 2021 01:02:25 +0300 In-Reply-To: <83pmx4xudf.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 02 Jun 2021 16:34:52 +0300") Message-ID: <87lf7sc4cu.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 9609 Cc: rgm@gnu.org, larsi@gnus.org, 9609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> > > emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' -f make-frame >> > > >> > > Two frames open showing the *scratch* buffer, once frame has focus. >> > > >> > > With the mouse, click on the "n" of "notes" in the focused frame. Do >> > > not release the mouse. In the other frame, a region starting or ending >> > > at "n" is now selected. >> > >> > I can confirm that this is still present in Emacs 28. >> > >> > Pretty weird behaviour. >> >> Probably we decided that the mouse was dragged because the coordinates >> in the other window are different. Or something like that. > > Btw, you don't need another frame to demonstrate the issue. You could > do this instead: > > emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' > C-x 2 > Click and hold the mouse button on some character The problem is that currently the mark is not window-local. I tried such workaround, that fixes the above problem, but it has other issues. A proper fix needs to be in some low-level function. #+begin_src emacs-lisp ;; Make the mark buffer-and-window-local. (defvar-local mark-active-window nil) (add-hook 'activate-mark-hook (lambda () (setq mark-active-window (selected-window)))) (advice-add 'activate-mark :after (lambda (&rest _args) (setq mark-active-window (selected-window))) '((name . mark-active-window))) ;; Can't use deactivate-mark-hook because when clicking mouse in another window ;; with the same buffer it calls both activate-mark and deactivate-mark, ;; but deactivate-mark checks if the region is active (region-active-p), ;; and doesn't advance further because mark-active was set to nil in the redisplay ;; hook below. OTOH, the advice is used unconditionally. (add-hook 'deactivate-mark-hook (lambda () (setq mark-active-window nil))) (advice-add 'deactivate-mark :after (lambda (&rest _args) (setq mark-active-window nil)) '((name . mark-active-window))) (defun redisplay--update-mark-active-window (window) (when mark-active-window (setq mark-active (eq mark-active-window window)))) ;; Problem: when compiled without optimization CFLAGS='-O0' then ;; quick region selection experiences lags that results in wrong selection. ;; Another problem is that in ‘follow-mode’ ‘set-mark-command’ messes up windows. (add-hook 'pre-redisplay-functions #'redisplay--update-mark-active-window) #+end_src From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 03 03:26:00 2021 Received: (at 9609) by debbugs.gnu.org; 3 Jun 2021 07:26:00 +0000 Received: from localhost ([127.0.0.1]:41978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lohjs-0007U3-Iy for submit@debbugs.gnu.org; Thu, 03 Jun 2021 03:26:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lohjq-0007Tq-Vx for 9609@debbugs.gnu.org; Thu, 03 Jun 2021 03:25:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59980) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lohjk-0004JZ-KQ; Thu, 03 Jun 2021 03:25:52 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3846 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lohjk-0007fx-5A; Thu, 03 Jun 2021 03:25:52 -0400 Date: Thu, 03 Jun 2021 10:25:40 +0300 Message-Id: <83zgw7wgsr.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87lf7sc4cu.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 03 Jun 2021 01:02:25 +0300) Subject: Re: bug#9609: Excessive transient region highlighting with highlight-nonselected-windows References: <87fsy0g11m.fsf@gnus.org> <83wnrcxwr6.fsf@gnu.org> <83pmx4xudf.fsf@gnu.org> <87lf7sc4cu.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 9609 Cc: rgm@gnu.org, larsi@gnus.org, 9609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: larsi@gnus.org, rgm@gnu.org, 9609@debbugs.gnu.org > Date: Thu, 03 Jun 2021 01:02:25 +0300 > > > emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' > > C-x 2 > > Click and hold the mouse button on some character > > The problem is that currently the mark is not window-local. But the region's overlay _is_ specific to the window where it is set. Or are you saying it isn't the region that is highlighted in the other window? Btw, we could decide that we don't care about this quirk: it's a pretty rare and obscure use case. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 03 16:33:26 2021 Received: (at 9609) by debbugs.gnu.org; 3 Jun 2021 20:33:26 +0000 Received: from localhost ([127.0.0.1]:44759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lou1u-0002Zd-IA for submit@debbugs.gnu.org; Thu, 03 Jun 2021 16:33:26 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:40947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lou1s-0002Z3-Vs for 9609@debbugs.gnu.org; Thu, 03 Jun 2021 16:33:25 -0400 Received: (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id BC35CFF807; Thu, 3 Jun 2021 20:33:17 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#9609: Excessive transient region highlighting with highlight-nonselected-windows Organization: LINKOV.NET References: <87fsy0g11m.fsf@gnus.org> <83wnrcxwr6.fsf@gnu.org> <83pmx4xudf.fsf@gnu.org> <87lf7sc4cu.fsf@mail.linkov.net> <83zgw7wgsr.fsf@gnu.org> Date: Thu, 03 Jun 2021 23:20:48 +0300 In-Reply-To: <83zgw7wgsr.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 03 Jun 2021 10:25:40 +0300") Message-ID: <87o8cm23m7.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 9609 Cc: rgm@gnu.org, larsi@gnus.org, 9609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> > emacs -Q --eval '(progn (setq highlight-nonselected-windows t) (transient-mark-mode -1))' >> > C-x 2 >> > Click and hold the mouse button on some character >> >> The problem is that currently the mark is not window-local. > > But the region's overlay _is_ specific to the window where it is set. > Or are you saying it isn't the region that is highlighted in the other > window? The region is activated in both windows of the same buffer. I thought the problem is here. > Btw, we could decide that we don't care about this quirk: it's a > pretty rare and obscure use case. From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 04 05:19:03 2021 Received: (at 9609) by debbugs.gnu.org; 4 Jun 2021 09:19:03 +0000 Received: from localhost ([127.0.0.1]:45346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lp5yp-0000wj-J9 for submit@debbugs.gnu.org; Fri, 04 Jun 2021 05:19:03 -0400 Received: from mout.gmx.net ([212.227.17.20]:33411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lp5yo-0000w6-TI for 9609@debbugs.gnu.org; Fri, 04 Jun 2021 05:19:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1622798336; bh=cU2husNMbJ47BTTDXLQfoHonz9GDmIy4NOyKLeKkEl4=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=jmsGCAKDGC0LSVn/cOXlc44HZRN4Unw6XhqD8a5spsSGX2oc9wq1JNbeghV8lpPFb bm+GdaG3UbDVpk244i+5mqbpFLh2RIJcezI0flyQxkuPi05axKi2jpC2LDeUACuGxa 25djW8UhFakLSnqOfZVonjdyGJ6zBxrxoHcm+XFw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([213.142.96.52]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MBm1U-1lfAtg209E-00CA9a; Fri, 04 Jun 2021 11:18:56 +0200 Subject: Re: bug#9609: Excessive transient region highlighting with highlight-nonselected-windows To: Juri Linkov , Eli Zaretskii References: <87fsy0g11m.fsf@gnus.org> <83wnrcxwr6.fsf@gnu.org> <83pmx4xudf.fsf@gnu.org> <87lf7sc4cu.fsf@mail.linkov.net> <83zgw7wgsr.fsf@gnu.org> <87o8cm23m7.fsf@mail.linkov.net> From: martin rudalics Message-ID: <9d817139-8c26-84d0-14c1-43d3a1048070@gmx.at> Date: Fri, 4 Jun 2021 11:18:55 +0200 MIME-Version: 1.0 In-Reply-To: <87o8cm23m7.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:zsUYr8XcIeXABtH6VL2OIk8CNdzS0BwMmkRWUcJx0m0iNOZCQrT 3zWyDd9J80lNqLmALjD3Au1KMKub7Sj2rnhNmuAliz6th117hspbs0JYVLrVCvPvApxPvgY VyZ3qiZGipR3evcLMvE6gCjHMjBh2ZtbYaRkL1UjiQPH9vUcSH5KiqM5YIx16vGBD4kQmAM /TbSI3L+mPySiPfQeYQlQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:IlYO5rESI68=:7+Zu/uQVW+nlwejpNiPgvz szicA5U0kaSXw36PDGQgEDnpnPlliDrlRr03u/JSCQYLoC5fJY7W9xf4GqHuFEX/BbZGS92hg K3Z3j4xZnIUUIFYwkwFsxgG+sVUoNqlzC9wgfo+gf6QAfPFFQ/UaxIkJOWAWC4RcGRvUAgRqS pzl2Fn6siPgJqW4XNFZvt8Xn+EkzqB9mI++sPMIBjpR3wGRhlK+iOOwRTl3a2kyV5Y7zXThXA /1Pkyw34lpAIuw8PJwKQuijJWk2d8oRN5eTx7wYBE0MNCzBIX3QDiIevsn5hsWOLXTkVHhR0n ojQmNnTk03Vf6JrE1zrjwkyYaW8AK29q2pe4COCSQBwFJFngC+uOXNqSuEVDw0poYFDoQUYOE s7wwOsVJWRulcUlOpkj7xCmMWWYo2+RMjWPuDCyy+eoj2eRW5Yvrd7qwaTw4PCjRJ5ON22NLa 1Y6sPVIlWoX7tRH9Sz88vXIwZbwUqfENnuhn54TyR76+cKuF510psrFEnfKf216hDokyLwvoP BTGml6+eRA85qzz78AagJLO1InaocDQ4+gvE8Pk8JzE5bUjaOCxvdhsNjl+n4W1nl96igPZc8 t3DUaL8//iWPPCVDYKbIiAFp+nXskIJYCzjFaSWGxY7hxF+gOI9/tU6nRFkasPsBDRWnz+TGV T9j17nIepJO4VRtKagowIkwZXq2TGVhvTWZ2WG+cGewERuR6Nu2DywMSsJNdNdeeHosMp1/ZW BM8fdoqHmxWeSMZsXroUW1CO0N+zpB3UeY6RRpaQEHtyQ1Vnjp9uaeustHSbD0sBN58sP07ec fmE60oER61jreFR0JlCs1CUtBgQ+XPhW+sZSyfsx9aTK5fB2n+AMFTJxGD6mywx6YCbp1ltFq F5Nl/lbni4OOsBaWRYC6BVIV4Lm34r8icYPmFKHFPB6GA5Tn6BTUYppFRnxWoCMTJJlKWeqYv 6oIkdxcXdih57mZttij8IkVtCLluUF3BkuJfDcJwtLLuR1FwnoOom7b5Lsnvhs+QBWOekbSop uClBl91MjW7NjkmFqMdm3kEdI0aVHlCNATIJTX4DDGyQykCWtDxXYUKHmHL07qBf6VvlRzGZX U6bGrNqQf9RjuTb12iYH3CFZmA7O0GYfJzb X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 9609 Cc: rgm@gnu.org, larsi@gnus.org, 9609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> But the region's overlay _is_ specific to the window where it is set. >> Or are you saying it isn't the region that is highlighted in the other >> window? > > The region is activated in both windows of the same buffer. > I thought the problem is here. What is the region in a non-selected window when point of that window's buffer and point of that window differ? martin From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 04 12:40:28 2021 Received: (at 9609) by debbugs.gnu.org; 4 Jun 2021 16:40:28 +0000 Received: from localhost ([127.0.0.1]:47825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpCs0-0003PC-0g for submit@debbugs.gnu.org; Fri, 04 Jun 2021 12:40:28 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:57493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpCry-0003OO-1G for 9609@debbugs.gnu.org; Fri, 04 Jun 2021 12:40:26 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id B0C18C0008; Fri, 4 Jun 2021 16:40:17 +0000 (UTC) From: Juri Linkov To: martin rudalics Subject: Re: bug#9609: Excessive transient region highlighting with highlight-nonselected-windows Organization: LINKOV.NET References: <87fsy0g11m.fsf@gnus.org> <83wnrcxwr6.fsf@gnu.org> <83pmx4xudf.fsf@gnu.org> <87lf7sc4cu.fsf@mail.linkov.net> <83zgw7wgsr.fsf@gnu.org> <87o8cm23m7.fsf@mail.linkov.net> <9d817139-8c26-84d0-14c1-43d3a1048070@gmx.at> Date: Fri, 04 Jun 2021 19:35:29 +0300 In-Reply-To: <9d817139-8c26-84d0-14c1-43d3a1048070@gmx.at> (martin rudalics's message of "Fri, 4 Jun 2021 11:18:55 +0200") Message-ID: <871r9h7fla.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 9609 Cc: rgm@gnu.org, Eli Zaretskii , larsi@gnus.org, 9609@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >>> But the region's overlay _is_ specific to the window where it is set. >>> Or are you saying it isn't the region that is highlighted in the other >>> window? >> >> The region is activated in both windows of the same buffer. >> I thought the problem is here. > > What is the region in a non-selected window when point of that window's > buffer and point of that window differ? After setting the mark in the selected window, the region is activated in the selected window between the mark and current point, and also the region is activated in the non-selected window between the same mark and window-point of the non-selected window.