From unknown Mon Aug 11 21:15:02 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#6316 <6316@debbugs.gnu.org> To: bug#6316 <6316@debbugs.gnu.org> Subject: Status: 24.0.50; unexpected region highlighting with disabled transient-mark-mode Reply-To: bug#6316 <6316@debbugs.gnu.org> Date: Tue, 12 Aug 2025 04:15:02 +0000 retitle 6316 24.0.50; unexpected region highlighting with disabled transien= t-mark-mode reassign 6316 emacs submitter 6316 Stephen Berman severity 6316 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon May 31 03:30:51 2010 Received: (at submit) by debbugs.gnu.org; 31 May 2010 07:30:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIzSU-0008JX-U3 for submit@debbugs.gnu.org; Mon, 31 May 2010 03:30:51 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIzSS-0008JQ-0c for submit@debbugs.gnu.org; Mon, 31 May 2010 03:30:48 -0400 Received: from lists.gnu.org ([199.232.76.165]:49256) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OIzSO-0000px-Uf for submit@debbugs.gnu.org; Mon, 31 May 2010 03:30:45 -0400 Received: from [140.186.70.92] (port=59536 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIzSN-0005aV-Cw for bug-gnu-emacs@gnu.org; Mon, 31 May 2010 03:30:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIzSM-0007zg-B5 for bug-gnu-emacs@gnu.org; Mon, 31 May 2010 03:30:43 -0400 Received: from mail.gmx.net ([213.165.64.20]:42694) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OIzSL-0007xz-UR for bug-gnu-emacs@gnu.org; Mon, 31 May 2010 03:30:42 -0400 Received: (qmail invoked by alias); 31 May 2010 07:30:36 -0000 Received: from i59F56B61.versanet.de (EHLO escher.home) [89.245.107.97] by mail.gmx.net (mp060) with SMTP; 31 May 2010 09:30:36 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX181YfQQK481gemkBLil8714cn3dyyM6MQ0ntLebuX JibVG1eYU1q0SJ Received: by escher.home (Postfix, from userid 1000) id D1F7510243; Mon, 31 May 2010 09:30:34 +0200 (CEST) From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 24.0.50; unexpected region highlighting with disabled transient-mark-mode Date: Mon, 31 May 2010 09:30:34 +0200 Message-ID: <87k4qkfrz9.fsf@escher.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.7 (----) 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: -4.7 (----) 1. emacs -Q 2. Type `M-x transient-mark-mode' to disable transient-mark-mode. 3. Select some text with the mouse. To give a specific example for the sake of replication, type `C-h v transient-mark-mode RET', then in the *Help* buffer double click on the left parenthesis of "(only . OLDVAL)" to select the whole sexp, which thus gets highlighted. 4. Type `M-w', then put point at the start of the paragraph (in *Help*) beginning "Non-nil also enables highlighting". Note that the region is not highlighted. 5. Paste "(only . OLDVAL)" into *scratch*, then double click on "OLDVAL", selecting and highlighting it. 6. Type `C-x o' to switch back to the *Help* buffer. => The region in *Help* between point and the left parenthesis of "(only . OLDVAL)" is now highlighted. This annoying misbehavior has existed for some time, but I can't say when it first appeared. In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.18.6) of 2010-05-29 on escher Windowing system distributor `The X.Org Foundation', version 11.0.10605000 configured using `configure '--without-toolkit-scroll-bars'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default enable-multibyte-characters: t From debbugs-submit-bounces@debbugs.gnu.org Mon May 31 08:29:24 2010 Received: (at 6316) by debbugs.gnu.org; 31 May 2010 12:29:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJ47P-0002hP-UB for submit@debbugs.gnu.org; Mon, 31 May 2010 08:29:24 -0400 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OJ47N-0002hH-PO for 6316@debbugs.gnu.org; Mon, 31 May 2010 08:29:22 -0400 Received: (qmail invoked by alias); 31 May 2010 12:29:18 -0000 Received: from i59F56B61.versanet.de (EHLO escher.home) [89.245.107.97] by mail.gmx.net (mp028) with SMTP; 31 May 2010 14:29:18 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/KW+JglYbK4ztkqzFI4s6cqUAWUewzmVLXjlEMKw 0MYLHoUnORdPED Received: by escher.home (Postfix, from userid 1000) id E874910243; Mon, 31 May 2010 14:29:16 +0200 (CEST) From: Stephen Berman To: Stephen Berman Subject: Re: bug#6316: 24.0.50; unexpected region highlighting with disabled transient-mark-mode References: <87k4qkfrz9.fsf@escher.home> Date: Mon, 31 May 2010 14:29:16 +0200 In-Reply-To: <87k4qkfrz9.fsf@escher.home> (Stephen Berman's message of "Mon, 31 May 2010 09:30:34 +0200") Message-ID: <876324fe5f.fsf@escher.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 6316 Cc: 6316@debbugs.gnu.org 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: -3.0 (---) On Mon, 31 May 2010 09:30:34 +0200 Stephen Berman wrote: > 1. emacs -Q > 2. Type `M-x transient-mark-mode' to disable transient-mark-mode. > 3. Select some text with the mouse. To give a specific example for the > sake of replication, type `C-h v transient-mark-mode RET', then in the > *Help* buffer double click on the left parenthesis of "(only . OLDVAL)" > to select the whole sexp, which thus gets highlighted. > 4. Type `M-w', then put point at the start of the paragraph (in *Help*) > beginning "Non-nil also enables highlighting". Note that the region is > not highlighted. > 5. Paste "(only . OLDVAL)" into *scratch*, then double click on "OLDVAL", > selecting and highlighting it. > 6. Type `C-x o' to switch back to the *Help* buffer. > => The region in *Help* between point and the left parenthesis of > "(only . OLDVAL)" is now highlighted. I should have mentioned that selection with the mouse is not crucial; the same unexpected highlighting occurs if selection is done via the keyboard -- with the important qualification that in step 5, the selection must be made by typing `C-SPC' twice to activate the mark, then moving point to the end of "OLDVAL", so that it is highlighted. (Mark activation is not necessary in step 3, in which case the selected text would not be highlighted.) Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Tue May 29 16:44:52 2012 Received: (at 6316) by debbugs.gnu.org; 29 May 2012 20:44:52 +0000 Received: from localhost ([127.0.0.1]:48849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SZTHM-0000CB-Ok for submit@debbugs.gnu.org; Tue, 29 May 2012 16:44:52 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:37635) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SZTH1-0000Bc-3Q for 6316@debbugs.gnu.org; Tue, 29 May 2012 16:44:30 -0400 Received: (qmail invoked by alias); 29 May 2012 20:42:39 -0000 Received: from i59F5468D.versanet.de (EHLO escher.home) [89.245.70.141] by mail.gmx.net (mp016) with SMTP; 29 May 2012 22:42:39 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX19xXTF86rZxITn6AUmEAVdFZKTEsYHB5hC9nBljeS YC8xEuJpg1U9E9 From: Stephen Berman To: 6316@debbugs.gnu.org Subject: Re: bug#6316: 24.0.50; unexpected region highlighting References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> Date: Tue, 29 May 2012 22:42:37 +0200 In-Reply-To: <876324fe5f.fsf@escher.home> (Stephen Berman's message of "Mon, 31 May 2010 14:29:16 +0200") Message-ID: <87r4u2en2a.fsf_-_@escher.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 6316 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 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: -1.9 (-) Ping, in case this has been forgotten. The problem persists in the current trunk. I've also truncated the title of the bug report, since transient-mark-mode is actually irrelevant, as an unrelated posting to emacs-devel (http://permalink.gmane.org/gmane.emacs.devel/127927>), excerpted below, shows. It would be very nice to have this bug fixed. Steve Berman On Mon, 31 May 2010 14:29:16 +0200 Stephen Berman wrote: > On Mon, 31 May 2010 09:30:34 +0200 Stephen Berman wrote: > >> 1. emacs -Q >> 2. Type `M-x transient-mark-mode' to disable transient-mark-mode. >> 3. Select some text with the mouse. To give a specific example for the >> sake of replication, type `C-h v transient-mark-mode RET', then in the >> *Help* buffer double click on the left parenthesis of "(only . OLDVAL)" >> to select the whole sexp, which thus gets highlighted. >> 4. Type `M-w', then put point at the start of the paragraph (in *Help*) >> beginning "Non-nil also enables highlighting". Note that the region is >> not highlighted. >> 5. Paste "(only . OLDVAL)" into *scratch*, then double click on "OLDVAL", >> selecting and highlighting it. >> 6. Type `C-x o' to switch back to the *Help* buffer. >> => The region in *Help* between point and the left parenthesis of >> "(only . OLDVAL)" is now highlighted. > > I should have mentioned that selection with the mouse is not crucial; > the same unexpected highlighting occurs if selection is done via the > keyboard -- with the important qualification that in step 5, the > selection must be made by typing `C-SPC' twice to activate the mark, > then moving point to the end of "OLDVAL", so that it is highlighted. > (Mark activation is not necessary in step 3, in which case the selected > text would not be highlighted.) > > Steve Berman On Wed, 28 Jul 2010 00:44:34 +0100 David De La Harpe Golden wrote: [...] > Note that I can replicate similar issues in emacs 23.2, really: > > emacs -Q > C-x 3 > shift-select "is for notes" in LHS *scratch*. It is highlighted. > C-x o to RHS *scratch* > > Everything from the start of "is for notes" to the end of the buffer is > highlighted, because that's where the point was in the other window, and > select-window is "naive" (it just warps to the point saved in the the window). > > A fix for select-active-regions somewhat similar to the zero-length regions > fix proposed approach should certainly be possible - really we don't want to > propagate the active region of a newly switched-to-window until it "really" > changes anew post-restoration. From debbugs-submit-bounces@debbugs.gnu.org Tue May 27 09:57:53 2014 Received: (at 6316) by debbugs.gnu.org; 27 May 2014 13:57:53 +0000 Received: from localhost ([127.0.0.1]:33512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpHsz-0004Ky-NG for submit@debbugs.gnu.org; Tue, 27 May 2014 09:57:53 -0400 Received: from mout.gmx.net ([212.227.17.22]:49648) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpHss-0004Kg-Pp for 6316@debbugs.gnu.org; Tue, 27 May 2014 09:57:47 -0400 Received: from rosalinde.fritz.box ([89.245.105.29]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0MQih7-1XH9s23hO9-00U4Aw for <6316@debbugs.gnu.org>; Tue, 27 May 2014 15:57:36 +0200 From: Stephen Berman To: 6316@debbugs.gnu.org Subject: Re: bug#6316: 24.0.50; unexpected region highlighting References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> <87r4u2en2a.fsf_-_@escher.home> Date: Tue, 27 May 2014 15:57:33 +0200 In-Reply-To: <87r4u2en2a.fsf_-_@escher.home> (Stephen Berman's message of "Tue, 29 May 2012 22:42:37 +0200") Message-ID: <8761krqq7m.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:6owFyEB0AyVSFqpBNkJ5ys8mNBGMH7/P/ZwljLGMr6vj4cPtlCk V6CeIwjLz8MrKZ7i/5y5zSIIT3tXILVQn2VR9nj7y1FcVKipB9yA5IgZHMeIk2qFRV4wrpu TGHA1/oJFElVPR7gad9TaEygvV2NfELDcb6vlx1aGDaJzeLCfWoXsSSLucL37cURD6LDcVg cpPswEPzXKL0zhrGo9DaQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 6316 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) Could someone who knows how region highlighting works take a look at this issue, which continues to annoy me? If I knew how to debug this, I'd try to, but I don't even know how to start... Steve Berman On Tue, 29 May 2012 22:42:37 +0200 Stephen Berman wrote: > Ping, in case this has been forgotten. The problem persists in the > current trunk. I've also truncated the title of the bug report, since > transient-mark-mode is actually irrelevant, as an unrelated posting to > emacs-devel (http://permalink.gmane.org/gmane.emacs.devel/127927>), > excerpted below, shows. It would be very nice to have this bug fixed. > > Steve Berman > > On Mon, 31 May 2010 14:29:16 +0200 Stephen Berman wrote: > >> On Mon, 31 May 2010 09:30:34 +0200 Stephen Berman wrote: >> >>> 1. emacs -Q >>> 2. Type `M-x transient-mark-mode' to disable transient-mark-mode. >>> 3. Select some text with the mouse. To give a specific example for the >>> sake of replication, type `C-h v transient-mark-mode RET', then in the >>> *Help* buffer double click on the left parenthesis of "(only . OLDVAL)" >>> to select the whole sexp, which thus gets highlighted. >>> 4. Type `M-w', then put point at the start of the paragraph (in *Help*) >>> beginning "Non-nil also enables highlighting". Note that the region is >>> not highlighted. >>> 5. Paste "(only . OLDVAL)" into *scratch*, then double click on "OLDVAL", >>> selecting and highlighting it. >>> 6. Type `C-x o' to switch back to the *Help* buffer. >>> => The region in *Help* between point and the left parenthesis of >>> "(only . OLDVAL)" is now highlighted. >> >> I should have mentioned that selection with the mouse is not crucial; >> the same unexpected highlighting occurs if selection is done via the >> keyboard -- with the important qualification that in step 5, the >> selection must be made by typing `C-SPC' twice to activate the mark, >> then moving point to the end of "OLDVAL", so that it is highlighted. >> (Mark activation is not necessary in step 3, in which case the selected >> text would not be highlighted.) >> >> Steve Berman > > > On Wed, 28 Jul 2010 00:44:34 +0100 David De La Harpe Golden > wrote: > > [...] >> Note that I can replicate similar issues in emacs 23.2, really: >> >> emacs -Q >> C-x 3 >> shift-select "is for notes" in LHS *scratch*. It is highlighted. >> C-x o to RHS *scratch* >> >> Everything from the start of "is for notes" to the end of the buffer is >> highlighted, because that's where the point was in the other window, and >> select-window is "naive" (it just warps to the point saved in the the window). >> >> A fix for select-active-regions somewhat similar to the zero-length regions >> fix proposed approach should certainly be possible - really we don't want to >> propagate the active region of a newly switched-to-window until it "really" >> changes anew post-restoration. From debbugs-submit-bounces@debbugs.gnu.org Tue May 27 11:00:30 2014 Received: (at 6316) by debbugs.gnu.org; 27 May 2014 15:00:30 +0000 Received: from localhost ([127.0.0.1]:33523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpIrZ-0005zw-Hy for submit@debbugs.gnu.org; Tue, 27 May 2014 11:00:30 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12972) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpIrT-0005za-1p for 6316@debbugs.gnu.org; Tue, 27 May 2014 11:00:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNLd/fU/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArUGAIDvNVNLd/fU/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="64381767" Received: from 75-119-247-212.dsl.teksavvy.com (HELO pastel.home) ([75.119.247.212]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 27 May 2014 11:00:12 -0400 Received: by pastel.home (Postfix, from userid 20848) id B41566046C; Tue, 27 May 2014 11:00:12 -0400 (EDT) From: Stefan Monnier To: Stephen Berman Subject: Re: bug#6316: 24.0.50; unexpected region highlighting Message-ID: References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> <87r4u2en2a.fsf_-_@escher.home> <8761krqq7m.fsf@rosalinde.fritz.box> Date: Tue, 27 May 2014 11:00:12 -0400 In-Reply-To: <8761krqq7m.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Tue, 27 May 2014 15:57:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 6316 Cc: 6316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) > Could someone who knows how region highlighting works take a look at > this issue, which continues to annoy me? I installed a patch which fixes this particular recipe, but this is a very messy part of transient-mark-mode, so I wouldn't be surprised if there are other problematic cases. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue May 27 16:52:03 2014 Received: (at 6316) by debbugs.gnu.org; 27 May 2014 20:52:03 +0000 Received: from localhost ([127.0.0.1]:33728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpOLq-0000Az-DX for submit@debbugs.gnu.org; Tue, 27 May 2014 16:52:02 -0400 Received: from mout.gmx.net ([212.227.15.15]:62042) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpOLn-0000Ab-4p for 6316@debbugs.gnu.org; Tue, 27 May 2014 16:52:00 -0400 Received: from rosalinde.fritz.box ([89.245.105.29]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MCtql-1Wyyqy0p1P-009jcb; Tue, 27 May 2014 22:51:51 +0200 From: Stephen Berman To: Stefan Monnier Subject: Re: bug#6316: 24.0.50; unexpected region highlighting References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> <87r4u2en2a.fsf_-_@escher.home> <8761krqq7m.fsf@rosalinde.fritz.box> Date: Tue, 27 May 2014 22:51:48 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 27 May 2014 11:00:12 -0400") Message-ID: <87wqd7osgr.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:5CtoEAaGBr16XOXVIxQBM+3pDUUNpTKQSfR3KnrWCuw6XQAUqKO qtD9LVjvNszkjLA2+UkXaj7foc433ZYCD37UGxMohLPu82ItWtPriDQKDR6Ccjjool/nYFE JfOeSazvB7W5WnbDmMh68MhjO2SpdAO6A0xZ4SKckoaXb21MTlZIoxlwG+mnGmhVpLpRFUH 4zs5vJY9vQ2PzYL/eJgGg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 6316 Cc: 6316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) On Tue, 27 May 2014 11:00:12 -0400 Stefan Monnier wrote: >> Could someone who knows how region highlighting works take a look at >> this issue, which continues to annoy me? > > I installed a patch which fixes this particular recipe, I confirm that the unexpected highlighting with the recipe of my OP is gone, thanks much. > but this is > a very messy part of transient-mark-mode, so I wouldn't be surprised if > there are other problematic cases. Indeed, the recipe David De La Harpe Golden gave still produces unexpected highlighting (though, despite being phenomenologically the same sort of problem, maybe it's technically different, since it happens even with transient-mark-mode enabled). Your patch also does not account for the case of using a motion command to unhighlight the region when transient-mark-mode is disabled, instead of using M-w to do that as in my OP. The reason is apparently that moving point does not deactivate the mark, unlike M-w or C-g, so your fix does not come into play. It's clear that motion commands should not deactivate the mark when transient-mark-mode is enabled, since they change the bounds of the active region. But when transient-mark-mode is disabled but then temporarily enabled by double clicking or shift selection, thus highlighting the region, and moving point unhighlights the region, doesn't it seem reasonable to deactivate the mark in this case? Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 23 12:31:55 2014 Received: (at 6316) by debbugs.gnu.org; 23 Jun 2014 16:31:55 +0000 Received: from localhost ([127.0.0.1]:58417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wz79q-0002tl-J4 for submit@debbugs.gnu.org; Mon, 23 Jun 2014 12:31:55 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:36067) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wz79j-0002tJ-GP for 6316@debbugs.gnu.org; Mon, 23 Jun 2014 12:31:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IPAS-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0wh X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="69252625" Received: from 75-119-224-253.dsl.teksavvy.com (HELO pastel.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Jun 2014 12:31:37 -0400 Received: by pastel.home (Postfix, from userid 20848) id 6064D603CD; Mon, 23 Jun 2014 12:31:37 -0400 (EDT) From: Stefan Monnier To: Stephen Berman Subject: Re: bug#6316: 24.0.50; unexpected region highlighting Message-ID: References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> <87r4u2en2a.fsf_-_@escher.home> <8761krqq7m.fsf@rosalinde.fritz.box> <87wqd7osgr.fsf@rosalinde.fritz.box> Date: Mon, 23 Jun 2014 12:31:37 -0400 In-Reply-To: <87wqd7osgr.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Tue, 27 May 2014 22:51:48 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 6316 Cc: 6316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) > Indeed, the recipe David De La Harpe Golden gave still produces > unexpected highlighting (though, despite being phenomenologically the > same sort of problem, maybe it's technically different, since it happens > even with transient-mark-mode enabled). I installed another patch into trunk which should fix this problem more thoroughly. Can you confirm it fixes all the cases you know? Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 24 11:59:55 2014 Received: (at 6316) by debbugs.gnu.org; 24 Jun 2014 15:59:55 +0000 Received: from localhost ([127.0.0.1]:59468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzT8Q-0004VR-Rg for submit@debbugs.gnu.org; Tue, 24 Jun 2014 11:59:54 -0400 Received: from mout.gmx.net ([212.227.15.18]:62541) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WzT8K-0004V7-7G for 6316@debbugs.gnu.org; Tue, 24 Jun 2014 11:59:48 -0400 Received: from rosalinde.fritz.box ([89.245.117.43]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MAQ0o-1WoznW0WyY-00BaVa; Tue, 24 Jun 2014 17:59:36 +0200 From: Stephen Berman To: Stefan Monnier Subject: Re: bug#6316: 24.0.50; unexpected region highlighting References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> <87r4u2en2a.fsf_-_@escher.home> <8761krqq7m.fsf@rosalinde.fritz.box> <87wqd7osgr.fsf@rosalinde.fritz.box> Date: Tue, 24 Jun 2014 17:59:16 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 23 Jun 2014 12:31:37 -0400") Message-ID: <87mwd28fjf.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:ygWVfegIxnaV9O7K7oYb1YTwUV79KrDVbAX7J2CyCFR7jgT0F0r z0lRT7/ESYZslNgzzNYRFpCp0/uOXvAVb97asKSr1rc3JQkKLU1/t1O+VVdI81DazBUCs1N ErFr376GX7JzGjUczuuf6XYX/6D0XAGmtZdZiEkPg/WvO37pDXosCR+qIwihrgN0p5ykmZh a0PYJc3Es6naUUFWWheDg== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 6316 Cc: 6316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) On Mon, 23 Jun 2014 12:31:37 -0400 Stefan Monnier wrote: >> Indeed, the recipe David De La Harpe Golden gave still produces >> unexpected highlighting (though, despite being phenomenologically the >> same sort of problem, maybe it's technically different, since it happens >> even with transient-mark-mode enabled). > > I installed another patch into trunk which should fix this problem > more thoroughly. Can you confirm it fixes all the cases you know? It does not fix the above case, though again, since that happens whether or not transient-mark-mode is enabled, it's probably a different issue. It does fix the case I mentioned in my previous reply of using a motion command to unhighlight the region when transient-mark-mode is disabled, so it improves upon the previous patch in that respect. However, with your new patch, temporarily enabling transient-mark-mode, when it is disabled, seems to break transient-mark-mode; here's a recipe: 0. emacs -Q 1. Sanity check: `M-< C-SPC M-f' results in ";; This" being highlighted. Typing `M-x transient-mark-mode' shows the message "Transient-Mark mode disabled" and results in ";; This" becoming unhighlighted. Now typing `C-SPC M-f M-x transient-mark-mode' shows the message "Transient-Mark mode enabled" and results in " buffer" being highlighted. 2. Type `M-x transient-mark-mode' to disable transient-mark-mode again. 3. Type `C-SPC C-SPC' to temporarily enable transient-mark-mode, showing the message "Mark activated". 4. Type `M-x transient-mark-mode' to enable transient-mark-mode again (verified by the message "Transient-Mark mode enabled"). 5. Type `C-SPC M-f' => The region is not highlighted. Moreover, `C-h v transient-mark-mode' says: transient-mark-mode is a variable defined in `C source code'. Its value is nil Original value was t Local in buffer *scratch*; global value is t The same thing happens if in step 3 you use shift-selection instead of `C-SPC C-SPC'. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 01 14:15:02 2014 Received: (at 6316) by debbugs.gnu.org; 1 Jul 2014 18:15:03 +0000 Received: from localhost ([127.0.0.1]:39582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X22a5-0003SR-PH for submit@debbugs.gnu.org; Tue, 01 Jul 2014 14:15:02 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:7069) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X22a3-0003Rs-73 for 6316@debbugs.gnu.org; Tue, 01 Jul 2014 14:15:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0whgSwk X-IPAS-Result: ArUGAIDvNVNLd+D9/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCws0EhQYDSSIBAjSGReOegeEOASpGYFqg0whgSwk X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="71425085" Received: from 75-119-224-253.dsl.teksavvy.com (HELO ceviche.home) ([75.119.224.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Jul 2014 14:14:52 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 1EDF7660FA; Tue, 1 Jul 2014 14:14:52 -0400 (EDT) From: Stefan Monnier To: Stephen Berman Subject: Re: bug#6316: 24.0.50; unexpected region highlighting Message-ID: References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> <87r4u2en2a.fsf_-_@escher.home> <8761krqq7m.fsf@rosalinde.fritz.box> <87wqd7osgr.fsf@rosalinde.fritz.box> <87mwd28fjf.fsf@rosalinde.fritz.box> Date: Tue, 01 Jul 2014 14:14:52 -0400 In-Reply-To: <87mwd28fjf.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Tue, 24 Jun 2014 17:59:16 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 6316 Cc: 6316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) > However, with your new patch, temporarily enabling transient-mark-mode, > when it is disabled, seems to break transient-mark-mode; here's a recipe: Yes, the buffer "remembers" that it was nil. I installed an additional patch which tries to avoid this problem, tho it probably comes with other undesirable cases. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 02 05:28:14 2014 Received: (at 6316) by debbugs.gnu.org; 2 Jul 2014 09:28:14 +0000 Received: from localhost ([127.0.0.1]:39901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2Gpm-0002b0-89 for submit@debbugs.gnu.org; Wed, 02 Jul 2014 05:28:14 -0400 Received: from mout.gmx.net ([212.227.15.18]:52259) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2Gpg-0002aP-5y for 6316@debbugs.gnu.org; Wed, 02 Jul 2014 05:28:08 -0400 Received: from rosalinde.fritz.box ([89.245.110.132]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LvlTo-1Wab0C0GFQ-017WQS; Wed, 02 Jul 2014 11:27:56 +0200 From: Stephen Berman To: Stefan Monnier Subject: Re: bug#6316: 24.0.50; unexpected region highlighting References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> <87r4u2en2a.fsf_-_@escher.home> <8761krqq7m.fsf@rosalinde.fritz.box> <87wqd7osgr.fsf@rosalinde.fritz.box> <87mwd28fjf.fsf@rosalinde.fritz.box> Date: Wed, 02 Jul 2014 11:27:54 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 01 Jul 2014 14:14:52 -0400") Message-ID: <8738ek2jqd.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:H+HMeMAQkwrn6zWO6puo8NdnrfMFcBCInk9IYACMt+tt3elFeE3 qnWX6b28N2nxS4M1FGQVYnmKA6I6VcMKcDrCtm0/NKBEcMVXnVe/chFbKTJhHNlV9ZhgdmY NZYgND01PQ+S6oPR4I4CAfCP7ihmEt1gfXkhBVcwHvRR9ItyIkgPc0Tc3/ioxFoYTFFQ+my BOlPdhZ34mh/cio9wyIKQ== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 6316 Cc: 6316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) On Tue, 01 Jul 2014 14:14:52 -0400 Stefan Monnier wrote: >> However, with your new patch, temporarily enabling transient-mark-mode, >> when it is disabled, seems to break transient-mark-mode; here's a recipe: > > Yes, the buffer "remembers" that it was nil. > I installed an additional patch which tries to avoid this problem, I confirm that it fixes that problem. In addition, it fixes (presumably in combination with your previous patch) another case of unexpected region highlighting that differs somewhat from the recipe of my OP: 0. emacs -Q 1. M-x transient-mark-mode (disabling it). 2. C-SPC to set the mark in *scratch*, then move point, creating a nonempty region, which, as expected, is not highlighted. 3. Open another buffer, e.g. with `C-h v transient-mark-mode RET' and select and highlight a region in it, e.g. with `C-SPC C-SPC M-f'. 4. Switch back to *scratch*. => The region in *scratch* is now highlighted. I observe this in emacs-24, which contains your fix for my OP, but not in trunk, which also contains your last two patches for this bug report. > tho it probably comes with other undesirable cases. I haven't found any new ones yet, and given the above problem, I would be in favor of backporting your last two patches to emacs-24 (sorry I didn't notice the above problem earlier). There is another apparently longer-standing behavior (at least it happens with -Q in 24.3, as well as emacs-24 and trunk), which I noticed while testing you latest patch: if you mark and highlight a region in a buffer and then call e.g. `C-h f' or `C-h v', when the *Help* buffer opens this unhighlights the region in the other buffer, although the latter remains the current buffer. Is this supposed to happen, and if so, why? (If it's not supposed to happen, I'll open a new bug.) Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 02 09:29:43 2014 Received: (at 6316) by debbugs.gnu.org; 2 Jul 2014 13:29:43 +0000 Received: from localhost ([127.0.0.1]:40011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2KbS-0001hT-NL for submit@debbugs.gnu.org; Wed, 02 Jul 2014 09:29:43 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:28562) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2KbI-0001h5-Oe for 6316@debbugs.gnu.org; Wed, 02 Jul 2014 09:29:33 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s62DTLVW032298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Jul 2014 13:29:22 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s62DTKeg016293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Jul 2014 13:29:20 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s62DTKBv000377; Wed, 2 Jul 2014 13:29:20 GMT MIME-Version: 1.0 Message-ID: <8270a362-a76c-46bd-bf13-fc5ff59cc911@default> Date: Wed, 2 Jul 2014 06:29:19 -0700 (PDT) From: Drew Adams To: Stephen Berman , Stefan Monnier Subject: RE: bug#6316: 24.0.50; unexpected region highlighting References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> <87r4u2en2a.fsf_-_@escher.home> <8761krqq7m.fsf@rosalinde.fritz.box> <87wqd7osgr.fsf@rosalinde.fritz.box> <87mwd28fjf.fsf@rosalinde.fritz.box> <8738ek2jqd.fsf@rosalinde.fritz.box> In-Reply-To: <8738ek2jqd.fsf@rosalinde.fritz.box> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 6316 Cc: 6316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.3 (--) > if you mark and highlight a region in a > buffer and then call e.g. `C-h f' or `C-h v', when the *Help* buffer > opens this unhighlights the region in the other buffer, although the > latter remains the current buffer. Is this supposed to happen, and if > so, why? (If it's not supposed to happen, I'll open a new bug.) `highlight-nonselected-windows' =3D t controls whether the region remains highlighted in nonselected windows. But after a command the region is deactivated, so depending on your recipe you will not notice the effect of the variable. IOW, in your recipe, your command `C-h v' deactivated the region in the original buffer. To see the effect of the variable: C-SPC M-f C-x C-o C-SPC M-f. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 02 09:50:56 2014 Received: (at 6316) by debbugs.gnu.org; 2 Jul 2014 13:50:56 +0000 Received: from localhost ([127.0.0.1]:40031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2Kw0-0002Pq-0M for submit@debbugs.gnu.org; Wed, 02 Jul 2014 09:50:56 -0400 Received: from mout.gmx.net ([212.227.17.21]:59490) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X2Kvu-0002PO-Kq for 6316@debbugs.gnu.org; Wed, 02 Jul 2014 09:50:50 -0400 Received: from rosalinde.fritz.box ([89.245.110.132]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LmOLO-1WTpC02iBu-00Zt8o; Wed, 02 Jul 2014 15:50:38 +0200 From: Stephen Berman To: Drew Adams Subject: Re: bug#6316: 24.0.50; unexpected region highlighting References: <87k4qkfrz9.fsf@escher.home> <876324fe5f.fsf@escher.home> <87r4u2en2a.fsf_-_@escher.home> <8761krqq7m.fsf@rosalinde.fritz.box> <87wqd7osgr.fsf@rosalinde.fritz.box> <87mwd28fjf.fsf@rosalinde.fritz.box> <8738ek2jqd.fsf@rosalinde.fritz.box> <8270a362-a76c-46bd-bf13-fc5ff59cc911@default> Date: Wed, 02 Jul 2014 15:50:37 +0200 In-Reply-To: <8270a362-a76c-46bd-bf13-fc5ff59cc911@default> (Drew Adams's message of "Wed, 2 Jul 2014 06:29:19 -0700 (PDT)") Message-ID: <878uobswcy.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:dzS0uUBMQk6LjkooWK6xI/qr467uoAHJpIdta/k0jnfHXnr55Uw 50qBaBeaxIJi3m+2pFBsxTO8ROmhZH3TYMA2wNo/WZB+fftQO7SEk8yri3/tIx1zHXgaESH D+Snt1JygN2nIjNCDvb11AmtowhnS4+qmXA+TB/3OfraN6FU0/fC+sUHBpJUh5bmKJg1lWN +AqrC1iy64Roj39pWhQ/A== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 6316 Cc: Stefan Monnier , 6316@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (/) On Wed, 2 Jul 2014 06:29:19 -0700 (PDT) Drew Adams wrote: >> if you mark and highlight a region in a >> buffer and then call e.g. `C-h f' or `C-h v', when the *Help* buffer >> opens this unhighlights the region in the other buffer, although the >> latter remains the current buffer. Is this supposed to happen, and if >> so, why? (If it's not supposed to happen, I'll open a new bug.) > > `highlight-nonselected-windows' = t controls whether the region remains > highlighted in nonselected windows. As I noted, when you call `C-h f' or `C-h v', it doesn't make the *Help* buffer current, i.e., the window containing the now unhighlighted region is still selected. > But after a command the region is deactivated, so depending on your ^^^^^^^^^^^^^^^ "After certain non-motion commands, including any command that changes the text in the buffer," according to (emacs)Mark. > recipe you will not notice the effect of the variable. IOW, in your > recipe, your command `C-h v' deactivated the region in the original > buffer. Evidently it did; but should it, and if so, why? Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 06:18:09 2019 Received: (at 6316-done) by debbugs.gnu.org; 26 Sep 2019 10:18:09 +0000 Received: from localhost ([127.0.0.1]:42728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDQqe-0007b0-M3 for submit@debbugs.gnu.org; Thu, 26 Sep 2019 06:18:09 -0400 Received: from mail-pl1-f177.google.com ([209.85.214.177]:33250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDQqc-0007aN-8h for 6316-done@debbugs.gnu.org; Thu, 26 Sep 2019 06:18:07 -0400 Received: by mail-pl1-f177.google.com with SMTP id d22so1159198pls.0 for <6316-done@debbugs.gnu.org>; Thu, 26 Sep 2019 03:18:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=oT7ZBG65d0fv3XJedsL8a5sRHNf3rlSRUnUP1Y0vYwk=; b=gK1XZp2yn/tJ7oqbOwcm73W0NDofE3eJNyP6XadXtcVKHS2Fgx78UNeKXQ++ooWSCe T/cjkcoLWkEdTx/z+oxnQMEt+3YnbpHAG4nONZ6FxmI/oNFpuJfV1SOd+uHomT0M/Y1H TK7wuTccNnMZjNX0wX+YaJF8Hq6i0SiwAsC1JH0B/uNHaHcmmBc6Ex4QVikmf8rW+KW3 2wjBy5HeOb384OMKeSo1Dy6/t1MXmzJwW7sG/HGQUmsOxKnxbUfMcoG8hfW75MIcGeC3 jyf7UIlHXs6ov/N62gGZay54xm/LcqNLd7IxXVWCbVG6SgUAvRPcFi2xFevdRGL3kMc2 WA6g== X-Gm-Message-State: APjAAAUpdssLn8dxGfkzzBjbRfZfj3iuhvEOGn/2pnSZmjIWfQfBoji4 O5xZp07d6Ue9mtITz6GiKzzbwsG0Bu7v6pX5lNk= X-Google-Smtp-Source: APXvYqwRIYtDsNHyXM0OIhfXBet85xtCEggfbWVl8GDytqZg0alLr0l83bP1vMp36h2yBwF2ACGojjiXX9YVBdgXGtI= X-Received: by 2002:a17:902:a515:: with SMTP id s21mr3115459plq.259.1569493079497; Thu, 26 Sep 2019 03:17:59 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Thu, 26 Sep 2019 12:17:48 +0200 Message-ID: Subject: Re: bug#6316: 24.0.50; unexpected region highlighting To: Stephen Berman Content-Type: multipart/alternative; boundary="0000000000007b203605937215f1" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 6316-done Cc: 6316-done@debbugs.gnu.org, Stefan Monnier 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.6 (/) --0000000000007b203605937215f1 Content-Type: text/plain; charset="UTF-8" Stephen Berman writes: > On Tue, 01 Jul 2014 14:14:52 -0400 Stefan Monnier < monnier@iro.umontreal.ca> wrote: > >>> However, with your new patch, temporarily enabling transient-mark-mode, >>> when it is disabled, seems to break transient-mark-mode; here's a recipe: >> >> Yes, the buffer "remembers" that it was nil. >> I installed an additional patch which tries to avoid this problem, > > I confirm that it fixes that problem. In addition, it fixes (presumably > in combination with your previous patch) another case of unexpected > region highlighting that differs somewhat from the recipe of my OP: > > 0. emacs -Q > 1. M-x transient-mark-mode (disabling it). > 2. C-SPC to set the mark in *scratch*, then move point, creating a > nonempty region, which, as expected, is not highlighted. > 3. Open another buffer, e.g. with `C-h v transient-mark-mode RET' and > select and highlight a region in it, e.g. with `C-SPC C-SPC M-f'. > 4. Switch back to *scratch*. > => The region in *scratch* is now highlighted. [...] >> tho it probably comes with other undesirable cases. > > I haven't found any new ones yet, and given the above problem, I would > be in favor of backporting your last two patches to emacs-24 (sorry I > didn't notice the above problem earlier). Good. That confirms that the original issue has been solved. > There is another apparently longer-standing behavior (at least it > happens with -Q in 24.3, as well as emacs-24 and trunk), which I noticed > while testing you latest patch: if you mark and highlight a region in a > buffer and then call e.g. `C-h f' or `C-h v', when the *Help* buffer > opens this unhighlights the region in the other buffer, although the > latter remains the current buffer. Is this supposed to happen, and if > so, why? (If it's not supposed to happen, I'll open a new bug.) I can't reproduce this on current master. I'm going to assume that it's been fixed some time in the last five years. It therefore looks like everything is done here, and I'm closing this bug. If that's incorrect, please reopen the bug. Best regards, Stefan Kangas --0000000000007b203605937215f1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Stephen Berman <stephen.berman@gmx.net> writes:

> On Tue, 01 Jul 2014 1= 4:14:52 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>>> However, = with your new patch, temporarily enabling transient-mark-mode,
>>&= gt; when it is disabled, seems to break transient-mark-mode; here's a r= ecipe:
>>
>> Yes, the buffer "remembers" that i= t was nil.
>> I installed an additional patch which tries to avoid= this problem,
>
> I confirm that it fixes that problem.=C2=A0 = In addition, it fixes (presumably
> in combination with your previous= patch) another case of unexpected
> region highlighting that differs= somewhat from the recipe of my OP:
>
> 0. emacs -Q
> 1. = M-x transient-mark-mode (disabling it).
> 2. C-SPC to set the mark in= *scratch*, then move point, creating a
> =C2=A0 =C2=A0nonempty regio= n, which, as expected, is not highlighted.
> 3. Open another buffer, = e.g. with `C-h v transient-mark-mode RET' and
> =C2=A0 =C2=A0sele= ct and highlight a region in it, e.g. with `C-SPC C-SPC M-f'.
> 4= . Switch back to *scratch*.
> =3D> The region in *scratch* is now = highlighted.
[...]
>> tho it probably comes with other undesira= ble cases.
>
> I haven't found any new ones yet, and given = the above problem, I would
> be in favor of backporting your last two= patches to emacs-24 (sorry I
> didn't notice the above problem e= arlier).

Good.=C2=A0 That confirms that the original issue has been = solved.

> There is another apparently longer-standing behavior (a= t least it
> happens with -Q in 24.3, as well as emacs-24 and trunk),= which I noticed
> while testing you latest patch: if you mark and hi= ghlight a region in a
> buffer and then call e.g. `C-h f' or `C-h= v', when the *Help* buffer
> opens this unhighlights the region = in the other buffer, although the
> latter remains the current buffer= .=C2=A0 Is this supposed to happen, and if
> so, why? =C2=A0(If it= 9;s not supposed to happen, I'll open a new bug.)

I can't re= produce this on current master.=C2=A0 I'm going to assume that it's=
been fixed some time in the last five years.

It therefore looks = like everything is done here, and I'm closing this
bug.=C2=A0 If tha= t's incorrect, please reopen the bug.

Best regards,
Stefan Ka= ngas
--0000000000007b203605937215f1-- From unknown Mon Aug 11 21:15:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 24 Oct 2019 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator