From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16822: 24.3.50; show-paren-mode adds confusion to active region Date: Thu, 15 Jul 2021 09:53:08 +0300 Message-ID: <83eec06pbf.fsf@gnu.org> References: <874n3utenw.fsf@gentoo.i-did-not-set--mail-host-address--so-tickle-me> <87tukwqija.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25112"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yynyygy@gmail.com, 16822@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 15 08:54:09 2021 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 1m3vG5-0006LP-Cr for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Jul 2021 08:54:09 +0200 Original-Received: from localhost ([::1]:47528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3vG4-0001yF-2a for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Jul 2021 02:54:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3vFy-0001y4-EG for bug-gnu-emacs@gnu.org; Thu, 15 Jul 2021 02:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35046) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3vFy-0000Zo-6g for bug-gnu-emacs@gnu.org; Thu, 15 Jul 2021 02:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3vFy-0003hH-4u for bug-gnu-emacs@gnu.org; Thu, 15 Jul 2021 02:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Jul 2021 06:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16822 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 16822-submit@debbugs.gnu.org id=B16822.162633201114167 (code B ref 16822); Thu, 15 Jul 2021 06:54:02 +0000 Original-Received: (at 16822) by debbugs.gnu.org; 15 Jul 2021 06:53:31 +0000 Original-Received: from localhost ([127.0.0.1]:46592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3vFS-0003gR-S1 for submit@debbugs.gnu.org; Thu, 15 Jul 2021 02:53:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:32814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3vFQ-0003gE-KR for 16822@debbugs.gnu.org; Thu, 15 Jul 2021 02:53:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38704) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3vFL-0008S6-8x; Thu, 15 Jul 2021 02:53:23 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4805 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 1m3vFK-000665-Sr; Thu, 15 Jul 2021 02:53:23 -0400 In-Reply-To: <87tukwqija.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 15 Jul 2021 06:59:21 +0200) 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:210000 Archived-At: > From: Lars Ingebrigtsen > Date: Thu, 15 Jul 2021 06:59:21 +0200 > Cc: 16822@debbugs.gnu.org > > yynyygy@gmail.com writes: > > > When show-paren-mode is on, it adds confusion to the active > > region. Suppose I have some text which is (hello), > > > > 1. I set the region to (hello and place the cursor on the left paren. > > 2. I set the region to (hello) and place the cursor on the left paren. > > > > Note that in Case 1, the right paren is not part of the region while in > > Case 2 it is. In the two cases above, I get exactly the same color on > > the screen, then how can I distinguish between these two different > > cases? > > This is still the case in Emacs 28. Whether I put the mark after the > "o" or after the ")", and then go to the start of the line (in > *scratch*), I get this displayed: > [...] > Perhaps the solution here is just to introduce a new face for parens > that are part of the region? Any opinions? I admit that I don't understand the problem. Why should the display be different in these two cases? It sounds like the (unspelled-out) assumption is that showing the region is more important than showing the (mis)matched parens? But if this is the assumption, then I don't think I agree: show-paren-mode is for _temporary_ display of the parens, so if it temporarily obscures the region, it's perfectly okay. Adding a new face would bump into the problem of making sure the colors of this new face are always visible and distinguishable from the other two colors. I don't see how that could work reliably.