From unknown Fri Jun 20 07:17:08 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#55202 <55202@debbugs.gnu.org> To: bug#55202 <55202@debbugs.gnu.org> Subject: Status: 27.1 Feature request: Show parens when point is anywhere inside of them Reply-To: bug#55202 <55202@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:17:08 +0000 retitle 55202 27.1 Feature request: Show parens when point is anywhere insi= de of them reassign 55202 emacs submitter 55202 Jos=C3=A9 J=C3=BAnior severity 55202 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 30 22:33:39 2022 Received: (at submit) by debbugs.gnu.org; 1 May 2022 02:33:39 +0000 Received: from localhost ([127.0.0.1]:59314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkzP1-0005LF-17 for submit@debbugs.gnu.org; Sat, 30 Apr 2022 22:33:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:37382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkzOy-0005L6-Va for submit@debbugs.gnu.org; Sat, 30 Apr 2022 22:33:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkzOy-0002dM-PK for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2022 22:33:36 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:46880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkzOx-0001jc-9j for bug-gnu-emacs@gnu.org; Sat, 30 Apr 2022 22:33:36 -0400 Received: by mail-wr1-x433.google.com with SMTP id i5so15474875wrc.13 for ; Sat, 30 Apr 2022 19:33:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=8BLHKHzUqIVzv05XA6qJJQIh91FTww0p9mu2SDy5md8=; b=NJVQe7F5hH1IEs2M2BSRVEej58pvzoFWYn/KNZ5WvcXpn3wh8WF2VFg3HyqwMHp6E2 Lg1CPUgdxIydZ0OBTp5pNNLiVC2m9V+25UNb4rq4/4DgjXgsdjmqYfZm0meYFhVX4+oO g+aUgsMRvV4eEuiXRw+akY6mcVnqjrGWbw91pN+mxGnrr5NfE4fpKkT5SfXtcrIaHmBD VyPoZF8iKUKmCxTl17XgrK3JejEEg0R5TWuK04kc+FJeYgxeYLDj/as4b39YFQG73vkY iIKmWZiVn9Sl2qE21SO/75+ymYNsXsFTENFR9/wY8V2Sk098uAodapjk+jkBP8aOLr2m sl3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=8BLHKHzUqIVzv05XA6qJJQIh91FTww0p9mu2SDy5md8=; b=bUNsL5oQjD83hYRfBON0MR+XclIV/N/qnzN8U4yC15/o+DXBRBeYIXahFSIHxz1KJ5 PskTp7HSWsDat0g7KY9iCxe5MqpgOV5Ywx9UVB08q+ohXdV9Je0wthtKVyIDJZjm6OZ6 iVgyooE9P0tIVr9iGneaxpN4B8+2fmlRbF/DZTuqUWzh6hFqrCtPdGBHKvJk45azAjDm dKU2IDE3o4vRYMiFRZS4OmlGDhmbtYSuEbREnjBC5gRG0XM/78ZmDtNHTUj1m/3yaf5/ XK7sHsU65hjOSR2DoTdlmh9XyTD7WbatCILuJ/vO8Lxb7V8dnhlI7exFVJBLyLSKzXvT q/Pg== X-Gm-Message-State: AOAM5305h+05uV39blSzdS06BtNokxEY3M8MipjrrsiEMEG1TYQi03QM HNhVzx6aXeORO079H3ss27tZdrMNcWdHAIhU09KmIUnRHow= X-Google-Smtp-Source: ABdhPJznLXpCyPkbCMCVxl+Mw3hBK80s2wsMUHfd8+xIf9Mu7m54sEyXm0s8DU9c6pax1IMCNVvPa3XE8UksmXDb3QU= X-Received: by 2002:a5d:648f:0:b0:20c:4eba:f529 with SMTP id o15-20020a5d648f000000b0020c4ebaf529mr4696035wri.237.1651372413092; Sat, 30 Apr 2022 19:33:33 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?Sm9zw6kgSsO6bmlvcg==?= Date: Sat, 30 Apr 2022 23:32:55 -0300 Message-ID: Subject: 27.1 Feature request: Show parens when point is anywhere inside of them To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="0000000000001306ef05ddea1a62" Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=jjnilton@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) --0000000000001306ef05ddea1a62 Content-Type: text/plain; charset="UTF-8" How can I set emacs to show parens when the point is anywhere inside of them? For example, with the point in the character "i": (po|int) Coming from other editors, I expect that the parens are highlighted, but in emacs they're only highlighted the point is on paren or immediately after it, even with the variable "Show Paren When Point Inside Paren" set to "on". --0000000000001306ef05ddea1a62 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
How can I set emacs to show parens when the point is = anywhere inside of them?

For example, with the poi= nt in the character "i": (po|int)

Coming= from other editors, I expect that the parens are highlighted, but in emacs= they're only highlighted the point is on paren or immediately after it= , even with the variable "Show Paren When Point Inside Paren" set= to "on".


--0000000000001306ef05ddea1a62-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 01 04:43:13 2022 Received: (at 55202) by debbugs.gnu.org; 1 May 2022 08:43:13 +0000 Received: from localhost ([127.0.0.1]:59476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl5Ae-0008RQ-RN for submit@debbugs.gnu.org; Sun, 01 May 2022 04:43:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:56802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl5Ac-0008RB-K4 for 55202@debbugs.gnu.org; Sun, 01 May 2022 04:43:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=5Lg5iZiC6PxmwE1xtHFBO0F6Wbr560L/kHotVFcxzeA=; b=rgNasbx4Q6K+zhb35DGYwK8t7Z umwi7prCyA1kofcTh1DezwO7dqG8expS/E9zO6YtRJcpiwJNdoTkfFq/cpWMdi6peItmGPCqoHLMc bu9dG77zpHvCup+qi28fsv6NLXYjGLpPRZ0Ylw7Y2lerQHd4zbxoHFlsnkyXBz8vXECI=; Received: from [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 1nl5AU-0002A7-Df; Sun, 01 May 2022 10:43:04 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?Sm9zw6kgSsO6bmlvcg==?= Subject: Re: bug#55202: 27.1 Feature request: Show parens when point is anywhere inside of them References: X-Now-Playing: David Byrne and Brian Eno's _My Life In The Bush Of Ghosts_: "The Carrier" Date: Sun, 01 May 2022 10:43:01 +0200 In-Reply-To: (=?utf-8?Q?=22Jos=C3=A9_J=C3=BAnior=22's?= message of "Sat, 30 Apr 2022 23:32:55 -0300") Message-ID: <87bkwhtzhm.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: José Júnior writes: > How can I set emacs to show parens when the point is anywhere inside of them? > > For example, with the point in the character "i": (po|int) > > Coming from other editors, I expect that the parens a [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 55202 Cc: 55202@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 (---) Jos=C3=A9 J=C3=BAnior writes: > How can I set emacs to show parens when the point is anywhere inside of t= hem? > > For example, with the point in the character "i": (po|int) > > Coming from other editors, I expect that the parens are highlighted, > but in emacs they're only highlighted the point is on paren or > immediately after it, even with the variable "Show Paren When Point > Inside Paren" set to "on". That variable doc says "If non-nil, show parens when point is just inside one.", so when point is right by the paren. Anyway, I think it would make sense to add what you're requesting -- but I'm not sure it would be efficient, or that it's well-defined. For instance, if you're in text-mode and the text is {(foo|bar}) what should it be blinking? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun May 01 05:17:30 2022 Received: (at submit) by debbugs.gnu.org; 1 May 2022 09:17:30 +0000 Received: from localhost ([127.0.0.1]:59529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl5hp-00058i-Ol for submit@debbugs.gnu.org; Sun, 01 May 2022 05:17:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:35342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl5hn-00056z-MP for submit@debbugs.gnu.org; Sun, 01 May 2022 05:17:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl5hn-0000yF-Fa for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 05:17:27 -0400 Received: from ciao.gmane.io ([116.202.254.214]:41108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl5hl-0002rj-Hf for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 05:17:27 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nl5hf-0005Lb-8a for bug-gnu-emacs@gnu.org; Sun, 01 May 2022 11:17:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Rudolf Schlatte Subject: Re: bug#55202: 27.1 Feature request: Show parens when point is anywhere inside of them Date: Sun, 01 May 2022 11:17:11 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) Cancel-Lock: sha1:+B4R82gYqOmQNPCEVHReuIOHSTc= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit 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: -2.1 (--) José Júnior writes: > How can I set emacs to show parens when the point is anywhere inside of them? If you are comfortable with installing packages, "highlight parentheses" (https://sr.ht/~tsdh/highlight-parentheses.el/) implements this. From debbugs-submit-bounces@debbugs.gnu.org Sun May 01 09:20:00 2022 Received: (at 55202) by debbugs.gnu.org; 1 May 2022 13:20:00 +0000 Received: from localhost ([127.0.0.1]:59888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl9UV-0007xy-Rt for submit@debbugs.gnu.org; Sun, 01 May 2022 09:20:00 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:39910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nl9UT-0007xY-NQ for 55202@debbugs.gnu.org; Sun, 01 May 2022 09:19:58 -0400 Received: by mail-wm1-f42.google.com with SMTP id ay11-20020a05600c1e0b00b0038eb92fa965so9489697wmb.4 for <55202@debbugs.gnu.org>; Sun, 01 May 2022 06:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q54cRkb3M9labs5oc8SOxm4lGuxK8N/TpZsrTTvNJs4=; b=grW55dKuLG787KjyR5qf/0IHZQJsgmQi7zjwuiGNBkRAqJWn/WLy+YNcCttxJYBjLm 6bCuVH2K08sXE2GJfE4ujxs8u2UCEBLUGhajpiMngTKhPza+CXpNeotzbdeiQ91CHtXd Wez0laendS/aydfnuPNEZFhr5fxdVkJFLWAqGJpQYtwfEyoxX2buC9k3+P/BQzzmsvdF r65ndZWL6gt00V/rSF9DOLi2jI18UOD74Kd+Q3zD6DCnYUOq1vSj1UiviuR5FS/1tyAK 2L++cmYO7O+lG8klSUXm5ixtz9dIJH5yjRh9WgTUIP/tpV0NWdjxlGz84LJf28kI8F0T fJ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q54cRkb3M9labs5oc8SOxm4lGuxK8N/TpZsrTTvNJs4=; b=30TOUlVLODiN/PrQjBWuvAIpuuHK48EaBkO3Imgb68ZX2ZAOIx0CStLYremXmNXeG7 kqem5WWp9kQauKLEdXliHNCU6zvtRLrdEVuHA1FK+q5S+fMafXSJbHKrKCUEZsiXaA8J LSSKukBUTgfOVc27MS2SLwQkD1SK0PzrKgZ6Ks/sTmMjf99cDq10YTw04VysWkxSMd5p XaZC/GF3c5yPa8vCttCxaFlN7nzF1MgfPpzC4INprTdkvWScP9OPevK49hGW9s+jLFFe EyF0cjQO74Be5aYKn5BrSebLQG2JUuYwIRE8ITUJvhEaxYdL2PRjynEsiLhK2pjZ96fN Bd0A== X-Gm-Message-State: AOAM533ah8pj5j4IYyAaaX7bnB+oM/CEvUuNnawRQyEe0hEW4WfgwjOt ea/HFjFNCpmXEYbfl4stl9pIx7PPuku+EPMHQdM= X-Google-Smtp-Source: ABdhPJwTNHB85V/RPyC5fO712mtQYkN7eRH63ZNKcanuctztlbtFeR1wnzhQwCl30oiZp+qGRsC/OO4oVFdbkh9jaYc= X-Received: by 2002:a1c:721a:0:b0:394:7a5:a1f3 with SMTP id n26-20020a1c721a000000b0039407a5a1f3mr11273643wmc.104.1651411191662; Sun, 01 May 2022 06:19:51 -0700 (PDT) MIME-Version: 1.0 References: <87bkwhtzhm.fsf@gnus.org> In-Reply-To: <87bkwhtzhm.fsf@gnus.org> From: =?UTF-8?B?Sm9zw6kgSsO6bmlvcg==?= Date: Sun, 1 May 2022 10:19:15 -0300 Message-ID: Subject: Re: bug#55202: 27.1 Feature request: Show parens when point is anywhere inside of them To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="000000000000750b7105ddf32187" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55202 Cc: 55202@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 (-) --000000000000750b7105ddf32187 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > That variable doc says "If non-nil, show parens when point is just > inside one.", so when point is right by the paren. Thanks for the explanation. Anyway, I think it would make sense to add what you're requesting -- but > I'm not sure it would be efficient, or that it's well-defined. For > instance, if you're in text-mode and the text is > > {(foo|bar}) > > what should it be blinking? > I didn't know how to answer, so I looked how other editors do. I found two behaviors: 1. Unless the point is right by the parens, it should highlight the curly braces. So in this case it would highlight the curly braces. With the point in these places would highlight the parens, otherwise would highlight the curly braces: {|(|foobar}|)| 2. Ignore and don't highlight anything. On Sun, May 1, 2022 at 5:43 AM Lars Ingebrigtsen wrote: > Jos=C3=A9 J=C3=BAnior writes: > > > How can I set emacs to show parens when the point is anywhere inside of > them? > > > > For example, with the point in the character "i": (po|int) > > > > Coming from other editors, I expect that the parens are highlighted, > > but in emacs they're only highlighted the point is on paren or > > immediately after it, even with the variable "Show Paren When Point > > Inside Paren" set to "on". > > That variable doc says "If non-nil, show parens when point is just > inside one.", so when point is right by the paren. > > Anyway, I think it would make sense to add what you're requesting -- but > I'm not sure it would be efficient, or that it's well-defined. For > instance, if you're in text-mode and the text is > > {(foo|bar}) > > what should it be blinking? > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no > --000000000000750b7105ddf32187 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That variable doc says "If non-nil, show parens when point is just
inside one.", so when point is right by the paren.

Thanks for the explanation.

=
Anyway, I thin= k it would make sense to add what you're requesting -- but
I'm not sure it would be efficient, or that it's well-defined.=C2= =A0 For
instance, if you're in text-mode and the text is

=C2=A0 {(foo|bar})

what should it be blinking?

I didn't know how to answer, so I looked how = other editors do. I found two behaviors:

1. U= nless the point is right by the parens, it should highlight the curly brace= s. So in this case it would highlight the curly braces.

With the point in these places would highlight the parens, otherwise = would highlight the curly braces:

{|(|foobar}|)|

2. Ignore and don&#= 39;t highlight anything.

On Sun, May 1, 2022 at 5:43 AM Lars Ingeb= rigtsen <larsi@gnus.= org> wrote:
Jos=C3=A9 J=C3=BAnior <jjnilton@gmail.com> writes:

> How can I set emacs to show parens when the point is anywhere inside o= f them?
>
> For example, with the point in the character "i": (po|int) >
> Coming from other editors, I expect that the parens are highlighted, > but in emacs they're only highlighted the point is on paren or
> immediately after it, even with the variable "Show Paren When Poi= nt
> Inside Paren" set to "on".

That variable doc says "If non-nil, show parens when point is just
inside one.", so when point is right by the paren.

Anyway, I think it would make sense to add what you're requesting -- bu= t
I'm not sure it would be efficient, or that it's well-defined.=C2= =A0 For
instance, if you're in text-mode and the text is

=C2=A0 {(foo|bar})

what should it be blinking?

--
(domestic pets only, the antidote for overdose, milk.)
=C2=A0 =C2=A0bloggy blog: http://lars.ingebrigtsen.no
--000000000000750b7105ddf32187-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 02 04:04:32 2022 Received: (at 55202) by debbugs.gnu.org; 2 May 2022 08:04:32 +0000 Received: from localhost ([127.0.0.1]:34703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlR2l-0005ZI-Qs for submit@debbugs.gnu.org; Mon, 02 May 2022 04:04:32 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlR2k-0005Z5-5K for 55202@debbugs.gnu.org; Mon, 02 May 2022 04:04:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=h+IiJr+0zGp50qecXss4tNJHa6sPE70rdFpi4OCorPM=; b=W/j9HbbzmHwfWSuImJznMJTiqg AtKlOyWod9FGMJDPzM4ZedKARMUJGl6BSpagWxIE4ixaHs61bEoNBAJrWA1aFgKOIa5NG5Tm97dW6 n1ANnVnjijQ/3wjtqZ+EeBiY58lYVf36p9XOGYuSyX7x16uBHFUO5KGNj8zYnl0BxjMc=; Received: from [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 1nlR2b-0006k1-Jn; Mon, 02 May 2022 10:04:23 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?Sm9zw6kgSsO6bmlvcg==?= Subject: Re: bug#55202: 27.1 Feature request: Show parens when point is anywhere inside of them References: <87bkwhtzhm.fsf@gnus.org> X-Now-Playing: Bogdan Raczynski's _Mixes_: "Mix 7" Date: Mon, 02 May 2022 10:04:20 +0200 In-Reply-To: (=?utf-8?Q?=22Jos=C3=A9_J=C3=BAnior=22's?= message of "Sun, 1 May 2022 10:19:15 -0300") Message-ID: <877d74bbsr.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: José Júnior writes: > I didn't know how to answer, so I looked how other editors do. I found two behaviors: > > 1. Unless the point is right by the parens, it should highlight the curly braces. So in > this case it would [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 55202 Cc: 55202@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 (---) Jos=C3=A9 J=C3=BAnior writes: > I didn't know how to answer, so I looked how other editors do. I found tw= o behaviors:=20 > > 1. Unless the point is right by the parens, it should highlight the curly= braces. So in > this case it would highlight the curly braces. > > With the point in these places would highlight the parens, otherwise woul= d highlight > the curly braces: > > {|(|foobar}|)|=20 > > 2. Ignore and don't highlight anything. I guess 2) seems more consistent, but I don't have much of an opinion. Choosing one or the other of the parentheses seems a bit arbitrary.=20 --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon May 02 22:11:21 2022 Received: (at 55202) by debbugs.gnu.org; 3 May 2022 02:11:21 +0000 Received: from localhost ([127.0.0.1]:38353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nli0X-0007N7-8U for submit@debbugs.gnu.org; Mon, 02 May 2022 22:11:21 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:39484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nli0V-0007Mt-6M for 55202@debbugs.gnu.org; Mon, 02 May 2022 22:11:19 -0400 Received: by mail-wr1-f48.google.com with SMTP id d5so21583461wrb.6 for <55202@debbugs.gnu.org>; Mon, 02 May 2022 19:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B5b5z0dD8q1nbZk8SXJaVqVJrYVjR3MlABc/vQB2KK8=; b=pIJXI9A9FeKSZsWKh5VsXhUc5zJNdB2dcXRa9gS1Grx9T/nGkPJpT/Gjflotln37ob URXEEZHLZval5puhxBpy6OM/2SSEYs4dvOv5K1GJfysP3TNND5unPLtNGHHQIvFIwXS+ 6tCaHSbkXbMoNNrJ3pGPAhETVxJnYdd0AZwhnZhwlrLqpemELZpI/03WogxeBXOLW5bg FKjJSlrXQlv6e8hVyl2vv5GxKW51G/Psn7/kCQmPnnn2vwWrdUb2eNYS0CN8bN/FVgV+ 8We+uOK4/FF//F209w9HoS8H4rwDfWdvCV1PFDx1qVgUnOhNXlmRWrKdDy3BM0kCAbiA af1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B5b5z0dD8q1nbZk8SXJaVqVJrYVjR3MlABc/vQB2KK8=; b=aTw7xfUaMeav/V/iQYicthDFHm5Uci1SvLdxkKjjNPTHGimMxWJrsOe05RZcKCeR3n 3jNUNBfk1pYDkCKNoFDIJm5axD1FS6lksdDqH4MNGCba32lkwEwWAzAPzGAQWxfxo2f7 kXYOEC8S+51ruHSoxOgz1yMm8op/gqXouW83JNpbps34DCik5ry/NGzbnxwQ4qEphkjJ Y98y+RGL2W/FkcFtAya0O0kG3QLo/LLKEAoirazka/JMEM+hN0zK4oxUspPhsijZG+VX bJkrMeQLuH5LL7kMiQAEjFdeofeGn99YzBqnAU5OexST8lUwGXCEzDGPJu4g3+IYihmb ZjgA== X-Gm-Message-State: AOAM530kkDdXe2GYsBSvq3N0dN8F1B9UQV6iZgl4RFqUpSqNEHHtDSI5 /e0YavkDKiqZBSDeS4q2SWzIv0akNGN5ukjNrjM= X-Google-Smtp-Source: ABdhPJyCrCFstTHovrcSOriATkmJXrPOznYkhmb6El4M/YS2ky1u5d3p6mEiWedAatHWwBsav9rafzh9v5jIk2EGfWo= X-Received: by 2002:a5d:648f:0:b0:20c:4eba:f529 with SMTP id o15-20020a5d648f000000b0020c4ebaf529mr11026271wri.237.1651543872973; Mon, 02 May 2022 19:11:12 -0700 (PDT) MIME-Version: 1.0 References: <87bkwhtzhm.fsf@gnus.org> <877d74bbsr.fsf@gnus.org> In-Reply-To: <877d74bbsr.fsf@gnus.org> From: =?UTF-8?B?Sm9zw6kgSsO6bmlvcg==?= Date: Mon, 2 May 2022 23:10:36 -0300 Message-ID: Subject: Re: bug#55202: 27.1 Feature request: Show parens when point is anywhere inside of them To: Lars Ingebrigtsen Content-Type: multipart/alternative; boundary="000000000000e1314405de120588" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55202 Cc: 55202@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 (-) --000000000000e1314405de120588 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I've been using this workaround so far, and it seems to work (like the first option, though): (define-advice show-paren-function (:around (fn) fix) "Highlight enclosing parens." (cond ((looking-at-p "\\s(") (funcall fn)) (t (save-excursion (ignore-errors (backward-up-list)) (funcall fn))))) source I don't know about efficiency, but I haven't tried it in deeply nested blocks. On Mon, May 2, 2022 at 5:04 AM Lars Ingebrigtsen wrote: > Jos=C3=A9 J=C3=BAnior writes: > > > I didn't know how to answer, so I looked how other editors do. I found > two behaviors: > > > > 1. Unless the point is right by the parens, it should highlight the > curly braces. So in > > this case it would highlight the curly braces. > > > > With the point in these places would highlight the parens, otherwise > would highlight > > the curly braces: > > > > {|(|foobar}|)| > > > > 2. Ignore and don't highlight anything. > > I guess 2) seems more consistent, but I don't have much of an opinion. > Choosing one or the other of the parentheses seems a bit arbitrary. > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no > --000000000000e1314405de120588 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I've been using this workaround so far, and it seems t= o work (like the first option, though):

(define-advice show-paren-fu= nction (:around (fn) fix)
=C2=A0 "Highlight enclosing parens."=
=C2=A0 (cond ((looking-at-p "\\s(") (funcall fn))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 (t (save-excursion
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(ignore-errors (backward-up-list))
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(funcall fn)))))

source

I don't know= about efficiency, but I haven't tried it in deeply nested blocks.
<= /div>

On Mon, May 2, 2022 at 5:04 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
Jos=C3=A9 J=C3=BAnior <jjnilton@gmail.com> writes:<= br>
> I didn't know how to answer, so I looked how other editors do. I f= ound two behaviors:
>
> 1. Unless the point is right by the parens, it should highlight the cu= rly braces. So in
> this case it would highlight the curly braces.
>
> With the point in these places would highlight the parens, otherwise w= ould highlight
> the curly braces:
>
> {|(|foobar}|)|
>
> 2. Ignore and don't highlight anything.

I guess 2) seems more consistent, but I don't have much of an opinion.<= br> Choosing one or the other of the parentheses seems a bit arbitrary.

--
(domestic pets only, the antidote for overdose, milk.)
=C2=A0 =C2=A0bloggy blog: http://lars.ingebrigtsen.no
--000000000000e1314405de120588--