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#61098: 29.0.60; Confusing behavior of show-paren-mode Date: Tue, 31 Jan 2023 14:03:28 +0200 Message-ID: <83r0va3o8f.fsf@gnu.org> References: <877cx8ose0.fsf@zohomail.eu> <83o7qiam16.fsf@gnu.org> <87y1pjstse.fsf@zohomail.eu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27687"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61098@debbugs.gnu.org To: Rah Guzar , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 31 13:04:13 2023 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 1pMpMz-0006wf-4Q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Jan 2023 13:04:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pMpMp-0007uS-Sz; Tue, 31 Jan 2023 07:04:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMpMo-0007s0-C4 for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 07:04:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pMpMo-0005OR-3j for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 07:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pMpMn-00008L-VK for bug-gnu-emacs@gnu.org; Tue, 31 Jan 2023 07:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Jan 2023 12:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61098 X-GNU-PR-Package: emacs Original-Received: via spool by 61098-submit@debbugs.gnu.org id=B61098.1675166621484 (code B ref 61098); Tue, 31 Jan 2023 12:04:01 +0000 Original-Received: (at 61098) by debbugs.gnu.org; 31 Jan 2023 12:03:41 +0000 Original-Received: from localhost ([127.0.0.1]:51773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMpMT-00007k-BQ for submit@debbugs.gnu.org; Tue, 31 Jan 2023 07:03:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMpMS-00007T-9j for 61098@debbugs.gnu.org; Tue, 31 Jan 2023 07:03:40 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMpMM-0005He-Hv; Tue, 31 Jan 2023 07:03:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UssjkxcRLbRtul3vxLQiLT5lmB+88CQxOU9EASa1DHY=; b=iTdhd8h0hNWS 0uRJBiQ/gd2mJvJ7g0MwDNcCs6P/WwKtG5pB4/PR4odV9xqnuKRbKo4XK71OEwZ/Qx4ceMiKYZE0S mlIAc4iBisg/UsAtmQBD9dY/yCV8LQYLrTcRIUj87Ams3sEL8RBiU2IQ4fFKKHCOoY0H74lY2/NSJ 6ybzIOhKe617akszMZn8UGPcyg7GvQ3PH2r6ptGCdk8Bi85iGSOZofMRyjpKo6eCAkd6jqNrLxCjs V8Hj7sl5aKqAJoBPw2W5yz6PXi38hBpWxe7pxgwt6bq1qpk+pv1qwOynI5X2xk/iz+eZCUaeS8+W0 9IXlR8I/H+LuLg9ggYrdIw==; Original-Received: from [87.69.77.57] (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 1pMpML-0004Jy-UJ; Tue, 31 Jan 2023 07:03:34 -0500 In-Reply-To: <87y1pjstse.fsf@zohomail.eu> (message from Rah Guzar on Mon, 30 Jan 2023 20:21:33 +0100) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:254510 Archived-At: > From: Rah Guzar > Cc: Stefan Monnier , 61098@debbugs.gnu.org > Date: Mon, 30 Jan 2023 20:21:33 +0100 > > Hi, > Thanks for the patch, it works as you described. Thanks for testing. I'm still waiting for Stefan to help me understand why after that patch "M-x show-paren-local-mode" _disables_ the mode rather than enabling it. Stefan, any wisdom? > However I have questions about the show-paren-predicate variable. > > When I see its default value (not (derived-mode . special-mode)) > it makes me think there is some dsl involved. The customize interface > mentions Lisp Expression as a possibility but the documentation doesn't > explain what form this expression is supposed to take. It should be an expression that yields a boolean value (that's why the variable is named "predicate"). I will improve the doc string when I install the final version of the changes. > This makes me think that the default is just a pseudo sentence > intended to convey what it does and there are only three > possibilities. No, it's a real expression in Lisp, just quoted. > If the latter is correct, I think a simpler way would be to disable > the mode in the body of special-mode if the value of `show-paren-predicate` > demands it. I think this will get rid of the problem that the mode is > disabled the first time show-paren-local-mode is called. > > I am using the equivalent of this which adds a hook to special-mode-hook > to achieve the outcome and I am pretty happy with it. I don't think I understand what you have in mind, but let's wait for Stefan to chime in.