From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: goncholden via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#54551: show-paren-mode inconsistency Date: Fri, 25 Mar 2022 07:10:36 +0000 Message-ID: References: <83ee2rccyk.fsf@gnu.org> <837d8icyva.fsf@gnu.org> Reply-To: goncholden Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8644"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54551@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 25 08:16:09 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 1nXeB6-00024P-Fg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Mar 2022 08:16:08 +0100 Original-Received: from localhost ([::1]:48036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXeB4-0008L9-FE for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Mar 2022 03:16:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXe6C-0003Gh-PL for bug-gnu-emacs@gnu.org; Fri, 25 Mar 2022 03:11:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXe6A-00017a-1Z for bug-gnu-emacs@gnu.org; Fri, 25 Mar 2022 03:11:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nXe69-0006E8-U0 for bug-gnu-emacs@gnu.org; Fri, 25 Mar 2022 03:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: goncholden Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Mar 2022 07:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54551 X-GNU-PR-Package: emacs Original-Received: via spool by 54551-submit@debbugs.gnu.org id=B54551.164819224623911 (code B ref 54551); Fri, 25 Mar 2022 07:11:01 +0000 Original-Received: (at 54551) by debbugs.gnu.org; 25 Mar 2022 07:10:46 +0000 Original-Received: from localhost ([127.0.0.1]:49925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXe5u-0006Da-Dt for submit@debbugs.gnu.org; Fri, 25 Mar 2022 03:10:46 -0400 Original-Received: from mail-40137.protonmail.ch ([185.70.40.137]:14391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXe5r-0006DM-Pf for 54551@debbugs.gnu.org; Fri, 25 Mar 2022 03:10:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1648192237; bh=pff7fHVPgNnhZyuBNZcDUa8G5KLftiMxeknQajbVN4A=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=YOiV0fzmJbYZHl9BrvAGk8gPvdoSsv4+tu7gW2I32azwLvc35dxHvj6g2wPzB+RwC fjUDGXdE9ySvNhoM9gqpcgHrcd+4n9I62Zz3dBZO46Y7k2LF/MP/xa9pWdDKrUwX72 i/4ACN5ruZ258aXCj1OznacGvGG7NKPM4HdAAGZU3dS4sxg2zidRTeZ1wG1AEHqX3v BWPULVPwpRRbl4xr40csIjt8VVq/oY7Cq4xhMCQ4RAFYdNzvGlTnnFXScxZFHyXOHU kf5X9Fw2aYfpnQnHd4rHLMwt/m9LdbHEFat7AjQBskV86jzhYXI9KjViYTF8aRmPNI xeKCLZbe0iacg== In-Reply-To: <837d8icyva.fsf@gnu.org> 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" X-ACL-Warn: , goncholden Xref: news.gmane.io gmane.emacs.bugs:228911 Archived-At: ------- Original Message ------- On Friday, March 25th, 2022 at 6:47 PM, Eli Zaretskii wrote: > > Date: Thu, 24 Mar 2022 22:48:35 +0000 > > From: goncholden goncholden@protonmail.com > > Cc: 54551@debbugs.gnu.org > > > > Consider the following command > > > > (setq initial-frame-alist '((width . 72) (height . 26)) ). > > > > Would be instructive that when one puts the cursor in the space between= (width . 72) and (height . 26), the entire (width . 72) (height . 26) woul= d be highlighted. > > Why only "(width . 72) (height . 26)" and not the entire setq expression? > > Or maybe I don't understand what you mean by "instructive", i.e. what > > exactly would you like Emacs to show you and why? > > show-paren-mode has a specific goal: to show you the matching > > parenthesis in an unobtrusive way, and do that as you type as well as > > when you move through the code. That is the "instructive" role that > > it takes up upon itself. It sounds like you want something else, > > which would then call for a different feature with different visuals > > (parenthesized expressions tend to nest, so being "inside" one of them > > means you are "inside" all of the outer ones, and displaying them > > calls for a different technique than what show-paren does). > > > But (setq show-paren-when-point-inside-paren t) does not do that. > > > > Can be very non-intuitive when debugging. > > For debugging, I suggest that you use C-M-u. > > > Also, if you put the cursor on the parenthesis following (height . 26),= only (height . 26) gets highlighted, rather than the entire (height . 26) = (height . 26). > > What do you mean by "the entire (height . 26)"? Did you try to set > show-paren-style to 'expression', and if not, does it do what you > want? I had been trying "(customize-set-variable 'show-paren-when-point-inside-pa= ren t)". It has been suggested to me to try "highlight-sexp", which seems to work be= tter than the functionality provided by show-paren-when-point-inside-paren. With "highlight-sexp", placing cursor after "(width . 72)" does highlight "(width . 72) (height . 26)" for the expression "(setq initial-frame-alist '((width . 72) (height . 26)) )" "highlight-sexp" does highlight the innermost expression, not so with "show-paren-when-point-inside-paren". You are making sense, but I wondered if you could see possibilities for improvements to "show-paren-mode". I am debugging a problem where emacs states that there exists an extra closing parenthesis, but having extreme difficulty locating it. Have split the file in two and using "require" on a child file. Otherwise I have to comment each line of code rather than whole sections. Commenting each line is likely to introduce errors if one is not very careful removing the comment tags.