From unknown Sun Jun 15 08:40:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77876: 31.0.50; elec-pair --- `electric-pair-inhibit-predicate' ignored for `electric-pair-pairs' Resent-From: Fernando de Morais Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Apr 2025 20:23:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 77876@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174492137825814 (code B ref -1); Thu, 17 Apr 2025 20:23:05 +0000 Received: (at submit) by debbugs.gnu.org; 17 Apr 2025 20:22:58 +0000 Received: from localhost ([127.0.0.1]:48577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5Vl8-0006he-AV for submit@debbugs.gnu.org; Thu, 17 Apr 2025 16:22:57 -0400 Received: from lists.gnu.org ([2001:470:142::17]:55348) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u5Vl3-0006ez-VD for submit@debbugs.gnu.org; Thu, 17 Apr 2025 16:22:51 -0400 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 1u5Vkt-00073v-OT for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2025 16:22:39 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u5Vkr-00017D-UO for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2025 16:22:39 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-736c277331eso2297065b3a.1 for ; Thu, 17 Apr 2025 13:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744921354; x=1745526154; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=sM+MlSrd/NLem4QpfXnNJGKu8Pn2ZXm7zZ3tF7Pnx4E=; b=jeltUcidbxOPPsn+YSrcwCyWmH/29l0rlAN0jTO2zam5f42aUGDnHQdXooGNN+tlrw /8bwBcMwfFyPzaxMz//xT2e/2fai4b/Aak7XPMe9up2LgkG75gX5OFHHor7u7TSQMo9p X8zCbr3rGGntKRH306VG6IK1/P1OdlM9AK5znd8wETJJMIN5cFDOvRvI2bUjFZv/2e+U IWvuu8CROHmaZ5KO19pMQGjGbIvH2aKcSV4k1NQV2BFwtEc3Zy67MXFjWvA9jrizpwgG I+BovitSn/yoRNgsbvVYMkMyhenGMX58qkWeT8j7l5YR3GZsEbT+g7qUlZcKa2E/6YBe ta2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744921354; x=1745526154; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sM+MlSrd/NLem4QpfXnNJGKu8Pn2ZXm7zZ3tF7Pnx4E=; b=miDKX1zHwGYxvLZiQPHc7o76oa52yEomAA2iP9DomoP0vLopCAkuA9JHxEFre1vSl4 7yJAANelyHrZ4h1G0T65akHE7bpc2ZhYtQL4pqcw7a5uVwmnoQZPr5f0LxBKH3c9NEHk 2d15b1WQ12QNCZs7PgXukWo0D2BtXopRhn5UnB0KlKCJ7sC8/S8r/D/TmWvQA8nmZAts BjtD/LuH3ZYQBNbJQ8VPYGYEX3xkPMZt8+w/dpYjZxWuEylBgPdzrPEbpl4O1UOfhw/v c9J0J0GYrr80yTkiIqQ59o11nIPokJBDmZ6Hbc6EXoZ714INWaP6lzgfl0SlIfTxVWyJ oFvA== X-Gm-Message-State: AOJu0YxgeeUffi428TPu3QtHr0nDl5QQa71KtBzSWz4bUktLp54f2q5I sTYB5DRdlQcURkTcuNOq4uKfVHNrnv6CGLp+hscFnrfE9qh7VSRCIL7LQw== X-Gm-Gg: ASbGncvE/6zmy6kpwDqkCMm95tgqC17MRJl5SK18Kf+KJfbXzjS24PyGhk0v/aKG/lP KBepLeX4MOTapSigp8zZA8CoWWAf70gYX4lym8pgVDWA4xiThz1VyxVhnQNzndBGtIQo+v2REOA qjb9Xjri9S/BfxU/vvfbeL8yH2B77nNIADKZr1sy4cukEOEcel8AfATRRzet9VAnbN1IQaDTQ6S mUJda6m4jQnemIGKQRRRBkg5vzCRsBYlbfFw8C24/S1RGd+Xz6HMxGkp5uiE+/EJp+QoG9Yl91u CFRvHIR1NbvXGemJuMosDB9fY1TdBYCqbh4msvieaE/f X-Google-Smtp-Source: AGHT+IEjZlYCOkRP4V+XWQaz0YggK5bDDH8QBiTDfsW3HExelR/dJRRhi5MltG5inxN9VsQ5FCkHZA== X-Received: by 2002:a05:6a00:3995:b0:736:476b:fccc with SMTP id d2e1a72fcca58-73dc1b5a9fcmr195792b3a.8.1744921353737; Thu, 17 Apr 2025 13:22:33 -0700 (PDT) Received: from sekai ([187.64.57.179]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73dbfa59f87sm293273b3a.91.2025.04.17.13.22.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Apr 2025 13:22:32 -0700 (PDT) From: Fernando de Morais Date: Thu, 17 Apr 2025 17:14:46 -0300 Message-ID: <87tt6meea1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=fernandodemorais.jf@gmail.com; helo=mail-pf1-x42d.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) 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.0 (/) --=-=-= Content-Type: text/plain Content-Disposition: inline *Notice:* I don't believe this is a bug, but I would like to bring up a discussion about the issue. To illustrate the matter, using `emacs -Q', please evaluate the following snippet: #+begin_src emacs-lisp (progn (elisp-enable-lexical-binding 'interactive) (defun org-electric-pair-inhibit (char) (let ((pairs '(?* ?/ ?_ ?= ?~ ?+))) (or (when (member char pairs) (not (region-active-p))) (electric-pair-default-inhibit char)))) (autoload #'setq-mode-local "mode-local") (setopt electric-pair-mode t) (setq-mode-local org-mode electric-pair-pairs (append electric-pair-pairs '((?* . ?*) (?/ . ?/) (?_ . ?_) (?= . ?=) (?~ . ?~) (?+ . ?+))) electric-pair-inhibit-predicate #'org-electric-pair-inhibit) (find-file "temp.org")) #+end_src Results in: - The `org-electric-pair-inhibit' function is ignored, and the characters that should only be inserted in pairs when the region is active are inserted in pairs regardless. After a bit of investigation, I found that characters listed in `electric-pair-pairs' are always inserted in pairs unconditionally. The function defined in `electric-pair-inhibit-predicate' is called only for the pairs defined in the syntax table of the corresponding major mode. Although I believe this was a design decision, in my view, the `electric-pair-inhibit-predicate' function should also apply to characters in the `electric-pair-pairs' list. I'm not sure about the implications for other use cases, but a little change made to the `electric-pair-post-self-insert-function' solves the issue (diff attached). Do you think a change like this could be considered? Thanks in advance. -- Regards, Fernando de Morais. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=elec-pair.patch diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index aa2577300fd..97aeca3f3b3 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el @@ -593,11 +593,10 @@ electric-pair-post-self-insert-function ;; Insert matching pair. ((and (memq syntax '(?\( ?\" ?\$)) (not overwrite-mode) - (or unconditional - (not (electric-pair--save-literal-point-excursion - (goto-char pos) - (funcall electric-pair-inhibit-predicate - last-command-event))))) + (not (electric-pair--save-literal-point-excursion + (goto-char pos) + (funcall electric-pair-inhibit-predicate + last-command-event)))) (save-excursion (electric-pair--insert pair num)))))))) (defun electric-pair-open-newline-between-pairs-psif () --=-=-=-- From unknown Sun Jun 15 08:40:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77876: 31.0.50; elec-pair --- `electric-pair-inhibit-predicate' ignored for `electric-pair-pairs' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Apr 2025 12:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Fernando de Morais , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Cc: 77876@debbugs.gnu.org Received: via spool by 77876-submit@debbugs.gnu.org id=B77876.174567049030458 (code B ref 77876); Sat, 26 Apr 2025 12:29:02 +0000 Received: (at 77876) by debbugs.gnu.org; 26 Apr 2025 12:28:10 +0000 Received: from localhost ([127.0.0.1]:59151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8edd-0007v8-IG for submit@debbugs.gnu.org; Sat, 26 Apr 2025 08:28:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45740) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u8eda-0007uQ-24 for 77876@debbugs.gnu.org; Sat, 26 Apr 2025 08:28:06 -0400 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 1u8edU-0006fA-HV; Sat, 26 Apr 2025 08:28:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=WJKL9fSl9Dj0soz9zOIPgVaROFmuciIIEVE+FFG1gy0=; b=bD7/e2HGjG+qbei0nwG5 khnvYimPlzIDRZJ9u+Ao0DEl+qODMxAzpu5tsXZugQ4BUoQUUYscdb2xWIcjz/aqUBrcT9AKLXria MAojeX9VxZEF1qjXlKgJD9YWTAd0KeEhobirCEEzlVoodiKzSRI7Zrl5pX+NFVcxhxY5YxeKLWBGs VTG0ugH1WnrwcZXVB41PyFMSvdUylAwW5jXOFpGubDpwiAzbwSuVBeRkfBTtJGZdeODFgIKKQCsJI uLEmzMyvZmC1tX8GqdgjYT+xgbw3KCiIymfFbrni5NUT5k2h4YRAZmao7D+uucKKHGmqfxliRlvEB 8r7wwL3xTg9JSg==; Date: Sat, 26 Apr 2025 15:27:57 +0300 Message-Id: <86wmb7t8du.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87tt6meea1.fsf@gmail.com> (message from Fernando de Morais on Thu, 17 Apr 2025 17:14:46 -0300) References: <87tt6meea1.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) > From: Fernando de Morais > Date: Thu, 17 Apr 2025 17:14:46 -0300 > > *Notice:* I don't believe this is a bug, but I would like to bring up a > discussion about the issue. > > To illustrate the matter, using `emacs -Q', please evaluate the > following snippet: > > #+begin_src emacs-lisp > (progn > (elisp-enable-lexical-binding 'interactive) > > (defun org-electric-pair-inhibit (char) > (let ((pairs '(?* ?/ ?_ ?= ?~ ?+))) > (or (when (member char pairs) > (not (region-active-p))) > (electric-pair-default-inhibit char)))) > > (autoload #'setq-mode-local "mode-local") > (setopt electric-pair-mode t) > (setq-mode-local org-mode > electric-pair-pairs (append > electric-pair-pairs > '((?* . ?*) (?/ . ?/) > (?_ . ?_) (?= . ?=) > (?~ . ?~) (?+ . ?+))) > electric-pair-inhibit-predicate #'org-electric-pair-inhibit) > (find-file "temp.org")) > #+end_src > > Results in: > > - The `org-electric-pair-inhibit' function is ignored, and the > characters that should only be inserted in pairs when the region is > active are inserted in pairs regardless. > > After a bit of investigation, I found that characters listed in > `electric-pair-pairs' are always inserted in pairs unconditionally. The > function defined in `electric-pair-inhibit-predicate' is called only for > the pairs defined in the syntax table of the corresponding major mode. > > Although I believe this was a design decision, in my view, the > `electric-pair-inhibit-predicate' function should also apply to > characters in the `electric-pair-pairs' list. > > I'm not sure about the implications for other use cases, but a little > change made to the `electric-pair-post-self-insert-function' solves the > issue (diff attached). > > Do you think a change like this could be considered? Thanks in advance. > > -- > Regards, > Fernando de Morais. > > diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el > index aa2577300fd..97aeca3f3b3 100644 > --- a/lisp/elec-pair.el > +++ b/lisp/elec-pair.el > @@ -593,11 +593,10 @@ electric-pair-post-self-insert-function > ;; Insert matching pair. > ((and (memq syntax '(?\( ?\" ?\$)) > (not overwrite-mode) > - (or unconditional > - (not (electric-pair--save-literal-point-excursion > - (goto-char pos) > - (funcall electric-pair-inhibit-predicate > - last-command-event))))) > + (not (electric-pair--save-literal-point-excursion > + (goto-char pos) > + (funcall electric-pair-inhibit-predicate > + last-command-event)))) > (save-excursion (electric-pair--insert pair num)))))))) > > (defun electric-pair-open-newline-between-pairs-psif () João, any comments or suggestions? From unknown Sun Jun 15 08:40:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77876: 31.0.50; elec-pair --- `electric-pair-inhibit-predicate' ignored for `electric-pair-pairs' Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Apr 2025 14:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Fernando de Morais , 77876@debbugs.gnu.org Received: via spool by 77876-submit@debbugs.gnu.org id=B77876.174567781722153 (code B ref 77876); Sat, 26 Apr 2025 14:31:01 +0000 Received: (at 77876) by debbugs.gnu.org; 26 Apr 2025 14:30:17 +0000 Received: from localhost ([127.0.0.1]:33847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u8gXo-0005kn-Mk for submit@debbugs.gnu.org; Sat, 26 Apr 2025 10:30:17 -0400 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]:43131) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1u8gXl-0005ea-LG for 77876@debbugs.gnu.org; Sat, 26 Apr 2025 10:30:14 -0400 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-601ad30bc0cso3065997eaf.0 for <77876@debbugs.gnu.org>; Sat, 26 Apr 2025 07:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745677807; x=1746282607; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=z7XQWhuvp39rZKUX7nTiNCPbMUbqivIj84gkWHdSd1E=; b=FJtmyrpUEv6iHeDZQFsFhx+O3fQHpkJiDNXQ4iAOvvFjoCH1y5jlqzYfY9cmMjDDeZ M8VMkFb4CdbqwUxTlquN6SwBcCmIyuU76rCaQab9sBxIYHexjN9QQNYSn1dI486E0Y5z W0FPYqMK/r/MZy51bRlIm+HEOzVdc04PyPadm3BMmk7GKlXcxKbGmjDp9TCGs1AilhaW SmvfWRpmWwSYBWSE4xVWbxHqJA7Zma2ekSorEoZR8Oo5bDZJ/1mRb+w30JID0CSm94tB TrydkooA1Xg7u0pZ1FsDEUdwv11JNl9xXvao0RKwSLO3XGJAASmkhyW45x6QwFBzit+L 20Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745677807; x=1746282607; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z7XQWhuvp39rZKUX7nTiNCPbMUbqivIj84gkWHdSd1E=; b=PnVa5vg9NGFDBa6AB2gOQ8dHshzBqdapKO/LZSpsPHnbOufsxRiOGl2BbaeZJB6/Dm Ze4iFEDHKE461C1GVX6JireLvz7xgYQNf7rs8GIfjHTNCaf4/CPQFZxIz3xCwoovZlMm jq6PPghvLRq/wzRqLuSn/yGa8/Cck/HWCC6dBLoL8cxYWf26pQurcCJd+mTKljbKFp8x 3zjH7ZgxtvQsHJajcyg3u5vxHsKApSqAKS/b+aK91NouqnJd2ON98Me+/3cUWEVUeTwq NrQ2kJJo9ZzLK+TA/3YYNY+yJjgYPnOA+fYPVHHbtMxjuhqQY9H9YBCVhmRKgVO7Q6Cn vJTg== X-Forwarded-Encrypted: i=1; AJvYcCUKzWHApWJEmI9CuCPrnol7yFYWVb5hYzsAd2qbxReHqICacdMcwxouKraLztxbL/fTb+BKWg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwIy8S3nCzVpfgzWUqPpJWEKeX/Ms6FhI5CxITJ2uQQ7YboFeqb NdMOQORhDDZ4QUoEupI43Wflq2X+F1X3mwSfqTFsJQSpKekrfX+npjVnXPMvJ5ros+9pMd6tjP4 97eYX6Kzhp56e9KP1fYChgOZHpZw= X-Gm-Gg: ASbGncsML9ktY3k3wyhe4PT26RNAakKf4ZT5Qwj7UGPrSsOgEYsxVqyUJXtZkkYY4Uk RCwy2j5dVnMoh79/wV4CSty2md7Yq7PImlpciheyCw/GN/ragvfHqlsb/R+TBuFRPZ/8CEbyiJJ C3SyeBi6p4OA+WvupwYGcXvw== X-Google-Smtp-Source: AGHT+IHoX5avaEdDrfTa6Q9VM0829JAoEnLCSEMAtDS1lSJrk1S/Ct+DaP5oTSu1gOxT8yk5j6ehMOvj0pai8R2ZXfY= X-Received: by 2002:a05:6870:71cb:b0:2b7:5726:c931 with SMTP id 586e51a60fabf-2d9a3264f44mr3281502fac.5.1745677807359; Sat, 26 Apr 2025 07:30:07 -0700 (PDT) MIME-Version: 1.0 References: <87tt6meea1.fsf@gmail.com> <86wmb7t8du.fsf@gnu.org> In-Reply-To: <86wmb7t8du.fsf@gnu.org> From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Date: Sat, 26 Apr 2025 15:30:35 +0100 X-Gm-Features: ATxdqUFm6XvN9tOjXXlz3KcuUt38yJDtYSg-sJx-SFLhK27nEuIvmz-350H7hcY Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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 (-) On Sat, Apr 26, 2025 at 1:28=E2=80=AFPM Eli Zaretskii wrote: > > > From: Fernando de Morais > > Date: Thu, 17 Apr 2025 17:14:46 -0300 > > > > *Notice:* I don't believe this is a bug, but I would like to bring up a > > discussion about the issue. > > > > To illustrate the matter, using `emacs -Q', please evaluate the > > following snippet: > > > > #+begin_src emacs-lisp > > (progn > > (elisp-enable-lexical-binding 'interactive) > > > > (defun org-electric-pair-inhibit (char) > > (let ((pairs '(?* ?/ ?_ ?=3D ?~ ?+))) > > (or (when (member char pairs) > > (not (region-active-p))) > > (electric-pair-default-inhibit char)))) > > > > (autoload #'setq-mode-local "mode-local") > > (setopt electric-pair-mode t) > > (setq-mode-local org-mode > > electric-pair-pairs (append > > electric-pair-pairs > > '((?* . ?*) (?/ . ?/) > > (?_ . ?_) (?=3D . ?=3D) > > (?~ . ?~) (?+ . ?+))) > > electric-pair-inhibit-predicate #'org-electric-pair-in= hibit) > > (find-file "temp.org")) > > #+end_src > > > > Results in: > > > > - The `org-electric-pair-inhibit' function is ignored, and the > > characters that should only be inserted in pairs when the region is > > active are inserted in pairs regardless. > > > > After a bit of investigation, I found that characters listed in > > `electric-pair-pairs' are always inserted in pairs unconditionally. Th= e > > function defined in `electric-pair-inhibit-predicate' is called only fo= r > > the pairs defined in the syntax table of the corresponding major mode. > > > > Although I believe this was a design decision, in my view, the > > `electric-pair-inhibit-predicate' function should also apply to > > characters in the `electric-pair-pairs' list. > > > > I'm not sure about the implications for other use cases, but a little > > change made to the `electric-pair-post-self-insert-function' solves the > > issue (diff attached). > > > > Do you think a change like this could be considered? Thanks in advance= . > > > > -- > > Regards, > > Fernando de Morais. > > > > diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el > > index aa2577300fd..97aeca3f3b3 100644 > > --- a/lisp/elec-pair.el > > +++ b/lisp/elec-pair.el > > @@ -593,11 +593,10 @@ electric-pair-post-self-insert-function > > ;; Insert matching pair. > > ((and (memq syntax '(?\( ?\" ?\$)) > > (not overwrite-mode) > > - (or unconditional > > - (not (electric-pair--save-literal-point-excursion > > - (goto-char pos) > > - (funcall electric-pair-inhibit-predicate > > - last-command-event))))) > > + (not (electric-pair--save-literal-point-excursion > > + (goto-char pos) > > + (funcall electric-pair-inhibit-predicate > > + last-command-event)))) > > (save-excursion (electric-pair--insert pair num)))))))) > > > > (defun electric-pair-open-newline-between-pairs-psif () > > Jo=C3=A3o, any comments or suggestions? I don't know, much of this is out of my mental cache. But I would start by checking if it passes the unit tests for elec-pair.el (hoping that they haven't been disabled as as has happened in the past). The tests have a pretty important say on what the library is supposed to do, as they were carefully crafted from a g= ood number of edge cases and bug reports. Jo=C3=A3o From unknown Sun Jun 15 08:40:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77876: 31.0.50; elec-pair --- `electric-pair-inhibit-predicate' ignored for `electric-pair-pairs' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 May 2025 09:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: fernandodemorais.jf@gmail.com, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Cc: 77876@debbugs.gnu.org Received: via spool by 77876-submit@debbugs.gnu.org id=B77876.174686957721032 (code B ref 77876); Sat, 10 May 2025 09:33:02 +0000 Received: (at 77876) by debbugs.gnu.org; 10 May 2025 09:32:57 +0000 Received: from localhost ([127.0.0.1]:43928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uDgZk-0005T3-Kx for submit@debbugs.gnu.org; Sat, 10 May 2025 05:32:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54802) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uDgZi-0005Sn-5t for 77876@debbugs.gnu.org; Sat, 10 May 2025 05:32:54 -0400 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 1uDgZc-0001di-MP; Sat, 10 May 2025 05:32:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ABr1H/jGApOSb8uEMv0J+/OHV8tZYQn0gwlrrZtpWYE=; b=hANaLy5qNYoOJ0r03A9t ksqBxgrBhtGZmA7RrCBGHUA679XuUe+LFkOA2eP3DvGWbfIQknXwkI2HEljEnQ5Zdpw4qvDMKnxOb B7UGpnrGR2tjlVu75cHIX1OrWFJ6AHEP4j/4jiE7AolGv2ou7jVHMcQ5PsZp2jucLaWhlaGcsZII2 CkHNVHvVWiMv0hlhXkVyzGJBIDGvUgNNVvpwcsj8euIzqSHSiN59VcaIvDQ2iFl5aqR7SThRG1xPF 8eOk+hsQpR8nYcOZw/oPnqPqR9PcxT7+NCrjktm1ameRJkxZCBpL+e250j99Xi1YF24sJAyYZZ1hz 0f5Ulm/PyL2rrQ==; Date: Sat, 10 May 2025 12:32:46 +0300 Message-Id: <864ixsbykh.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Sat, 26 Apr 2025 15:30:35 +0100) References: <87tt6meea1.fsf@gmail.com> <86wmb7t8du.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) Ping! Any progress with this issue? > From: João Távora > Date: Sat, 26 Apr 2025 15:30:35 +0100 > Cc: Fernando de Morais , 77876@debbugs.gnu.org > > On Sat, Apr 26, 2025 at 1:28 PM Eli Zaretskii wrote: > > > > > From: Fernando de Morais > > > Date: Thu, 17 Apr 2025 17:14:46 -0300 > > > > > > *Notice:* I don't believe this is a bug, but I would like to bring up a > > > discussion about the issue. > > > > > > To illustrate the matter, using `emacs -Q', please evaluate the > > > following snippet: > > > > > > #+begin_src emacs-lisp > > > (progn > > > (elisp-enable-lexical-binding 'interactive) > > > > > > (defun org-electric-pair-inhibit (char) > > > (let ((pairs '(?* ?/ ?_ ?= ?~ ?+))) > > > (or (when (member char pairs) > > > (not (region-active-p))) > > > (electric-pair-default-inhibit char)))) > > > > > > (autoload #'setq-mode-local "mode-local") > > > (setopt electric-pair-mode t) > > > (setq-mode-local org-mode > > > electric-pair-pairs (append > > > electric-pair-pairs > > > '((?* . ?*) (?/ . ?/) > > > (?_ . ?_) (?= . ?=) > > > (?~ . ?~) (?+ . ?+))) > > > electric-pair-inhibit-predicate #'org-electric-pair-inhibit) > > > (find-file "temp.org")) > > > #+end_src > > > > > > Results in: > > > > > > - The `org-electric-pair-inhibit' function is ignored, and the > > > characters that should only be inserted in pairs when the region is > > > active are inserted in pairs regardless. > > > > > > After a bit of investigation, I found that characters listed in > > > `electric-pair-pairs' are always inserted in pairs unconditionally. The > > > function defined in `electric-pair-inhibit-predicate' is called only for > > > the pairs defined in the syntax table of the corresponding major mode. > > > > > > Although I believe this was a design decision, in my view, the > > > `electric-pair-inhibit-predicate' function should also apply to > > > characters in the `electric-pair-pairs' list. > > > > > > I'm not sure about the implications for other use cases, but a little > > > change made to the `electric-pair-post-self-insert-function' solves the > > > issue (diff attached). > > > > > > Do you think a change like this could be considered? Thanks in advance. > > > > > > -- > > > Regards, > > > Fernando de Morais. > > > > > > diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el > > > index aa2577300fd..97aeca3f3b3 100644 > > > --- a/lisp/elec-pair.el > > > +++ b/lisp/elec-pair.el > > > @@ -593,11 +593,10 @@ electric-pair-post-self-insert-function > > > ;; Insert matching pair. > > > ((and (memq syntax '(?\( ?\" ?\$)) > > > (not overwrite-mode) > > > - (or unconditional > > > - (not (electric-pair--save-literal-point-excursion > > > - (goto-char pos) > > > - (funcall electric-pair-inhibit-predicate > > > - last-command-event))))) > > > + (not (electric-pair--save-literal-point-excursion > > > + (goto-char pos) > > > + (funcall electric-pair-inhibit-predicate > > > + last-command-event)))) > > > (save-excursion (electric-pair--insert pair num)))))))) > > > > > > (defun electric-pair-open-newline-between-pairs-psif () > > > > João, any comments or suggestions? > > I don't know, much of this is out of my mental cache. But I would > start by checking > if it passes the unit tests for elec-pair.el (hoping that they haven't > been disabled > as as has happened in the past). The tests have a pretty important say on > what the library is supposed to do, as they were carefully crafted from a good > number of edge cases and bug reports. > > João > From unknown Sun Jun 15 08:40:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77876: 31.0.50; elec-pair --- `electric-pair-inhibit-predicate' ignored for `electric-pair-pairs' Resent-From: Fernando de Morais Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 May 2025 14:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 77876@debbugs.gnu.org Received: via spool by 77876-submit@debbugs.gnu.org id=B77876.174688759017877 (code B ref 77876); Sat, 10 May 2025 14:34:02 +0000 Received: (at 77876) by debbugs.gnu.org; 10 May 2025 14:33:10 +0000 Received: from localhost ([127.0.0.1]:47803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uDlGH-0004eF-T5 for submit@debbugs.gnu.org; Sat, 10 May 2025 10:33:10 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:45205) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uDlGC-0004dP-4J for 77876@debbugs.gnu.org; Sat, 10 May 2025 10:33:05 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7390d21bb1cso3106907b3a.2 for <77876@debbugs.gnu.org>; Sat, 10 May 2025 07:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746887577; x=1747492377; darn=debbugs.gnu.org; h=mime-version:user-agent:references:message-id:date:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=tiASmIhnYtvkw6mAtCAtKAttrRDfeD+haacdK/eAI1Q=; b=FjfUvf9Wubp8FQ5Gr34hzyZyQ3vTNoQba3YeYY2bhCSdafAjMjDF5BivA7biqhB1Kx Esm11et086mtJQ/c8jUJMZXgqwCzP6GnH3QzTwH0fgAdtczovu5Qg9MrsO/sBPNhNsCk w17u6/D4CCEzqLdg39ukHxlb4McWncOomjsMSQvah72ckLbxNmO4U1Qb2w6VKmhxCj6w 1gXg2oWKTPeVFsu+bWFh+WyhNJ2UjD/i3AFtXyYTKmOE9UKmW5Sp9747rSgq7PmkeYtF m1K5IR5KPwCS609EwWXkfr12fFXgWGGUYq2wolyzeI731Aj42Gou5K6B3ZNaJ0OmdBSp V4uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746887577; x=1747492377; h=mime-version:user-agent:references:message-id:date:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tiASmIhnYtvkw6mAtCAtKAttrRDfeD+haacdK/eAI1Q=; b=wUEXwhGQmVKcYHZASPVCpzFnBt+jn4ZjeuKhNhiTlVsj5Kty01XdFj6Fv/ReDuvvVp VCpW2IuWBQZ1/RnEfd/JdbUQ350rtc5MJw2YfA2PnGSmw+Ykn9ARLSAwvn22+UnZO475 3QeO/JeV7Ew29X7kk2Es7F/WmwqNsiLau3WRoiX8b4YEXQ0vAPhwV2dZQ9r/NKUQIUQS Aed5W54R7GGJobr8a/U3kTLK0quhSdc/l1Smrk2Dp8yHpGQ6ChncZS40KUfbAxC26SRj EI2pPAmmVyRpjMUZr6MqURVv6hcgNeceKZPE1g2gQxmiA5Mx9lAez+jG6u/ynaa+xCYJ cipQ== X-Forwarded-Encrypted: i=1; AJvYcCWjvCNe/XO+RazyB5KOPvvstA8gA1EbeFb5UwOy2k/A1R1Td05IjIZiAjyae6NX3DHTfpoVmA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxapfsj4iHe3FaKEIQrUxFabolEJU6TEULDZ0wdpI7u2/wAXPMw ro88DNy1CoTYMTFcmzgV0IJ7lUQtJKwpg0JrzRn2Ybg7/eoWOmw35XqROQ== X-Gm-Gg: ASbGncttn0I/EL5HCKNMiYpamspaQ6BO8hb7p181khxxpO0tY+ApD+zByB2x+2PIQSR ILq8fhchqjWYUKFMi3vTJsXaLgUwrjX3GoNuMOphBgtQrCJ1XQoyIxY9cQ+i6lE/C7xGzjFIc5k 0YPInYYpbhhR/ez8dKzajTiZAESDLVbss0P7ZwOdC4UaceiYdrZmSZnv06AYSKaO7P0RuuMFoBJ yzNVioAKehXBJPwFRY23QMyv+wjOFAAnbkMOEAMuLPHI36RPtcu9B7hEbpsRZrk3tw0KG0yT00T LNQoTNWZ3H76yocg0NIngbYwrQNyD/jhGJJSlL7VBFFIBD7AZ4YzX+RINyNu8n8fIg== X-Google-Smtp-Source: AGHT+IE31qfkw0n1e58qAS6hCpFTizidz1FQQKleuOWstk7WRU6D6ukfm9dFDkQFRePyHFvQR/jIOA== X-Received: by 2002:a05:6a20:d48d:b0:1ee:c7c8:ca4 with SMTP id adf61e73a8af0-215abc730d9mr11898745637.36.1746887577189; Sat, 10 May 2025 07:32:57 -0700 (PDT) Received: from sekai ([187.64.57.179]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74237739a62sm3299761b3a.71.2025.05.10.07.32.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 May 2025 07:32:56 -0700 (PDT) From: Fernando de Morais In-Reply-To: <864ixsbykh.fsf@gnu.org> Date: Sat, 10 May 2025 11:31:45 -0300 Message-ID: <87ikm8r0z2.fsf@gmail.com> References: <87tt6meea1.fsf@gmail.com> <86wmb7t8du.fsf@gnu.org> <864ixsbykh.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) 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 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: > Ping! Any progress with this issue? Sorry for my late reply. I had trouble finding the tests and then figuring out how to use them, but attached are the results: both for the tests applied to the `elec-pair' without modifications, and with them. Eight tests---the same ones---failed in both scenarios. The others were successful. Additionally, I=E2=80=99ve been using `elec-pair' with the modifications since my original email, and I haven=E2=80=99t encountered any inconsistencies or errors in my daily use. Thanks! --=20 Regards, Fernando de Morais. --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=tests-with-changes Content-Transfer-Encoding: base64 U2VsZWN0b3I6IHQKUGFzc2VkOiAgODkxCkZhaWxlZDogIDggKDggdW5leHBlY3RlZCkKU2tpcHBl ZDogMApUb3RhbDogICA4OTkvODk5CgpTdGFydGVkIGF0OiAgIDIwMjUtMDUtMTAgMTA6NTE6MzMt MDMwMApGaW5pc2hlZC4KRmluaXNoZWQgYXQ6ICAyMDI1LTA1LTEwIDEwOjUxOjM2L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KDgyMTcgIiN4MjAxOSIgIj/igJkiKSkpKSkK Cgo= --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=tests-without-changes Content-Transfer-Encoding: base64 U2VsZWN0b3I6IHQKUGFzc2VkOiAgODkxCkZhaWxlZDogIDggKDggdW5leHBlY3RlZCkKU2tpcHBl ZDogMApUb3RhbDogICA4OTkvODk5CgpTdGFydGVkIGF0OiAgIDIwMjUtMDUtMTAgMTE6MTE6MjYt MDMwMApGaW5pc2hlZC4KRmluaXNoZWQgYXQ6ICAyMDI1LTA1LTEwIDExOjExOjMwLTAzMDAKCi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi5GRi4uLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLkYuLi4uLi4uLi4uLi5GRkYuLi4uLkYuLi4uLi4uLkYuLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4u Li4uLi4uLi4uLi4uLi4uLi4uLi4u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J0LXRlc3QtZmFpbGVkCiAgICAgKChzaG91bGQKICAgICAgIChlcXVh bCAoYnVmZmVyLXN1YnN0cmluZy1uby1wcm9wZXJ0aWVzIChwb2ludC1taW4pIChwb2ludC1tYXgp KQoJICAgICAgZXhwZWN0ZWQtc3RyaW5nKSkKICAgICAgOmZvcm0gKGVxdWFsICIg4oCYIiAiIOKA mSIpIDp2YWx1ZSBuaWwgOmV4cGxhbmF0aW9uCiAgICAgIChhcnJheS1lbHQgMSAoZGlmZmVyZW50 LWF0b21zICg4MjE2ICIjeDIwMTgiICI/4oCYIikgKDgyMTcgIiN4MjAxOSIgIj/igJkiKSkpKSkK Cgo= --=-=-=-- From unknown Sun Jun 15 08:40:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77876: 31.0.50; elec-pair --- `electric-pair-inhibit-predicate' ignored for `electric-pair-pairs' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 May 2025 08:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: joaotavora@gmail.com, Fernando de Morais Cc: 77876@debbugs.gnu.org Received: via spool by 77876-submit@debbugs.gnu.org id=B77876.17474714493567 (code B ref 77876); Sat, 17 May 2025 08:45:02 +0000 Received: (at 77876) by debbugs.gnu.org; 17 May 2025 08:44:09 +0000 Received: from localhost ([127.0.0.1]:45453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGD9M-0000vT-WC for submit@debbugs.gnu.org; Sat, 17 May 2025 04:44:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49796) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uGD9K-0000us-1p for 77876@debbugs.gnu.org; Sat, 17 May 2025 04:44:06 -0400 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 1uGD9E-0004iV-Js; Sat, 17 May 2025 04:44:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Xb7neLX3CQENLRqrkEQJd9gYyjJ/JaflVbKybhdUbqE=; b=Abb7I/Wlg6XV7m62aWYZ etR52zWEMPqOm09k6ksZaXRkHoJF1BKcRbe8IYjVaerTth0ie915O/jcRXnoJ7eb4vlCk65xj+3FB Rq88/tsDflYoXd6IXvdzcfLFC3KNqY6EmwlKOT2+Xi1QHZyNfV3zFQEARiiePHY6TFWKAC8505got 6w7DsGlo1UR2L8Dt+U6POEJOjBLPPrordukBn2XM8iKzv7T/Z0EP6pgrbKwNp3MyegcNLmsm9CGrI z8zRg5u5tf9o84Qcj3y2+ZA0s/5fzT7584wRgaVGM74JfTSg0xT//UT2A4MRBokIGB8I2PFw691Ax PEwkSkdSoIXyQQ==; Date: Sat, 17 May 2025 11:43:57 +0300 Message-Id: <86frh3wrsi.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87ikm8r0z2.fsf@gmail.com> (message from Fernando de Morais on Sat, 10 May 2025 11:31:45 -0300) References: <87tt6meea1.fsf@gmail.com> <86wmb7t8du.fsf@gnu.org> <864ixsbykh.fsf@gnu.org> <87ikm8r0z2.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) > From: Fernando de Morais > Cc: João Távora , > 77876@debbugs.gnu.org > Date: Sat, 10 May 2025 11:31:45 -0300 > > Eli Zaretskii writes: > > > Ping! Any progress with this issue? > > Sorry for my late reply. I had trouble finding the tests and then > figuring out how to use them, but attached are the results: both for the > tests applied to the `elec-pair' without modifications, and with them. > > Eight tests---the same ones---failed in both scenarios. The others were > successful. Additionally, I’ve been using `elec-pair' with the > modifications since my original email, and I haven’t encountered any > inconsistencies or errors in my daily use. Thanks. My results are different: all tests pass both before and after the change. João, based on these results, I think we can install the change? Or do you remember why the 'unconditional' condition was in the code? From unknown Sun Jun 15 08:40:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77876: 31.0.50; elec-pair --- `electric-pair-inhibit-predicate' ignored for `electric-pair-pairs' Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 May 2025 10:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Fernando de Morais , Stefan Monnier , 77876@debbugs.gnu.org Received: via spool by 77876-submit@debbugs.gnu.org id=B77876.174747796130703 (code B ref 77876); Sat, 17 May 2025 10:33:02 +0000 Received: (at 77876) by debbugs.gnu.org; 17 May 2025 10:32:41 +0000 Received: from localhost ([127.0.0.1]:46261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uGEqO-0007z9-Ug for submit@debbugs.gnu.org; Sat, 17 May 2025 06:32:41 -0400 Received: from mail-oo1-xc2b.google.com ([2607:f8b0:4864:20::c2b]:53319) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uGEqK-0007yp-Ge for 77876@debbugs.gnu.org; Sat, 17 May 2025 06:32:37 -0400 Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-604f0d27c24so1754976eaf.2 for <77876@debbugs.gnu.org>; Sat, 17 May 2025 03:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747477950; x=1748082750; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VVkpLkhdUQfYoW4XVk/fv77xCAK6Fe0y/CD8zjjP0ow=; b=ENzQG600HQHdY59yq+GenJIr2Rgni0WoMUa/ceWrCCGmhHKab2iQFEDaxH45TxkGuw 5U+0Hx6kL8A4GaKmkvcK5/fxKUzZvD2ADmuhRLk297l8wGz5ymCMsjlB7CfeSz1zemgs 7auH+CSmYNLcfc/R/UjdDW6vAVt0EBcwk28WjtfrlFEhFefXMDK0E260s4wNOpJvHX+K L+2QNgrJ8eX03g2iFn4MrOmYGdhYb5O91Br6A4phwB39RoHzgCln2opFfd7v4s+233nr E9rzhqq7CIBv6wCd1GWZIkrfB5k5eUQhk8EetAGyDZBonp1yaFZw8aDG8XlLItyqEOUe 069g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747477950; x=1748082750; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VVkpLkhdUQfYoW4XVk/fv77xCAK6Fe0y/CD8zjjP0ow=; b=TJNigzQoncybDfOEyiD19kgZDgs2Tm8wFXJuk1hQoOkQedAQ9X8NA0s7GsjyHySwHY kE3kbj2Deh8G0y1jAbwZXU7j4BVXA8idJVp6sVfpA7EsClJ4rN5G41cUZA34lQzeYJK8 CAUldu9AyRty3z0hFnOXAOY3oV47MviZUirynqjaottDmybbHnch8F6qBW9k51KVx3gM xckpjeAV98sOO7xhgkSHncO/6e8hLuoy8Dg26lViXAEmseZ1yY+uAAfD6EuSh2igtupT hfTm/trD0TAOvyxGs1RqoOpfkzW71ELJ3R1zxcSxp6swU6xbQy0huGSEdg8AGf8WK78l EW7w== X-Forwarded-Encrypted: i=1; AJvYcCUuarD4M8oVCzSapvyWsYgRTFOEs/l6tT7wFOURk2YBfKGZd4KxnoJ8f05nhZ53+c2eAMtEPw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyRlMzZaomkY3FqSIIRj0KOlVZxfuR97j+ckR5/fdeuTMvFO9AG XyrCgLNG9hkyrlYXTc9zkkVt2mHUilt6HMmBCOn9rbyQmNok+Vx7mu+i3Qry0HrwUQUri6RYs2y VRu/+cIcel9hWub0IgciQnWfdKWhHNNc= X-Gm-Gg: ASbGncvqXdCNrbvr3Imm4Wrl7mNO1xQIY67fGEdxqNXeJGLB2Mke4ZU+kYiwATthrUE GGOUO4nCZwPEil8nBEUheOS2bftWbsdgzT6nz5FdyLQf0RjrX2VfVFIOtLVEJN0NsqpizQGl8fR RI2UGS8emEXH+sMyLwYUmnCfkniL1ALAolOFg+pRB/yg== X-Google-Smtp-Source: AGHT+IF0AsTuepvQI12CLrK2uRcavRkURwaxCOgZDvl2fGwVcoYqMQNYUVbCVb4G5KK1i7RhP5Ao0zb6ZPvLVMvKtnA= X-Received: by 2002:a05:6820:8c5:b0:609:de23:cfbb with SMTP id 006d021491bc7-609f4970912mr2611098eaf.8.1747477950466; Sat, 17 May 2025 03:32:30 -0700 (PDT) MIME-Version: 1.0 References: <87tt6meea1.fsf@gmail.com> <86wmb7t8du.fsf@gnu.org> <864ixsbykh.fsf@gnu.org> <87ikm8r0z2.fsf@gmail.com> <86frh3wrsi.fsf@gnu.org> In-Reply-To: <86frh3wrsi.fsf@gnu.org> From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Date: Sat, 17 May 2025 11:32:19 +0100 X-Gm-Features: AX0GCFvAaDOqmAxjxBpXzuQ8glZMSN88_SJgwbpR28wrcrxCXV-Zj-3GQlpBwWw Message-ID: Content-Type: multipart/alternative; boundary="0000000000007d8e620635526ae1" X-Spam-Score: 0.0 (/) 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 (-) --0000000000007d8e620635526ae1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think unconditional is how that variable is supposed to work. The syntax-aware stuff is what I did, and it uses other mechanisms. So this change appears to be fusing two mechanisms. Ask Stefan Nonnier perhaps. he introduced this library into Emacs and guided my work on it. Jo=C3=A3o On Sat, May 17, 2025, 09:44 Eli Zaretskii wrote: > > From: Fernando de Morais > > Cc: Jo=C3=A3o T=C3=A1vora , > > 77876@debbugs.gnu.org > > Date: Sat, 10 May 2025 11:31:45 -0300 > > > > Eli Zaretskii writes: > > > > > Ping! Any progress with this issue? > > > > Sorry for my late reply. I had trouble finding the tests and then > > figuring out how to use them, but attached are the results: both for th= e > > tests applied to the `elec-pair' without modifications, and with them. > > > > Eight tests---the same ones---failed in both scenarios. The others wer= e > > successful. Additionally, I=E2=80=99ve been using `elec-pair' with the > > modifications since my original email, and I haven=E2=80=99t encountere= d any > > inconsistencies or errors in my daily use. > > Thanks. My results are different: all tests pass both before and > after the change. > > Jo=C3=A3o, based on these results, I think we can install the change? Or > do you remember why the 'unconditional' condition was in the code? > --0000000000007d8e620635526ae1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think unconditional is how that variable is suppos= ed to work.=C2=A0 The syntax-aware stuff is what I did, and it uses other m= echanisms. So this change appears to be fusing two mechanisms. Ask Stefan N= onnier perhaps. he introduced this library into Emacs and guided my work on= it.=C2=A0

Jo=C3=A3o

On Sat, May 17, 2025, 09:44 Eli Zaretskii <eliz@gnu.org> wrote:
> From: Fernando de Morais <fernandodemorais.jf@gmail.com>
> Cc: Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com>,
>=C2=A0 =C2=A077876@debbugs.gnu.org
> Date: Sat, 10 May 2025 11:31:45 -0300
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Ping! Any progress with this issue?
>
> Sorry for my late reply.=C2=A0 I had trouble finding the tests and the= n
> figuring out how to use them, but attached are the results: both for t= he
> tests applied to the `elec-pair' without modifications, and with t= hem.
>
> Eight tests---the same ones---failed in both scenarios.=C2=A0 The othe= rs were
> successful.=C2=A0 Additionally, I=E2=80=99ve been using `elec-pair'= ; with the
> modifications since my original email, and I haven=E2=80=99t encounter= ed any
> inconsistencies or errors in my daily use.

Thanks.=C2=A0 My results are different: all tests pass both before and
after the change.

Jo=C3=A3o, based on these results, I think we can install the change?=C2=A0= Or
do you remember why the 'unconditional' condition was in the code?<= br>
--0000000000007d8e620635526ae1-- From unknown Sun Jun 15 08:40:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77876: 31.0.50; elec-pair --- `electric-pair-inhibit-predicate' ignored for `electric-pair-pairs' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 May 2025 09:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , Stefan Monnier Cc: fernandodemorais.jf@gmail.com, 77876@debbugs.gnu.org Received: via spool by 77876-submit@debbugs.gnu.org id=B77876.174807815231970 (code B ref 77876); Sat, 24 May 2025 09:16:02 +0000 Received: (at 77876) by debbugs.gnu.org; 24 May 2025 09:15:52 +0000 Received: from localhost ([127.0.0.1]:57042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uIkyu-0008Ja-8E for submit@debbugs.gnu.org; Sat, 24 May 2025 05:15:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51560) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uIkyr-0008JK-ME for 77876@debbugs.gnu.org; Sat, 24 May 2025 05:15:50 -0400 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 1uIkym-00021r-C5; Sat, 24 May 2025 05:15:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=l+T/pSS3qY8Le3dSi28TOCJ56ZdZi8cM2DEDDA9bJ4Y=; b=esvn+iVtRgj+UZgW06tJ 5ZEd7McUHo0cA9w8hCOHwC/1M+n7tATE8x6bJzSfRktE+qPHAmDl2L9krKOY4/tK93dA048Fn6Z0b 86GmuARsh2V/PDmbW3hl8Y7V6oAnX+1KCfjBplvOG1fTN9FnWcxHtDZAvUo3A2Yq312m4IV0D28W2 MjEus3y9lIjHcV5w5kLmIqiysyBqcyZAzwNJNYFsbCzy1LTGvw4qe6HAIIemmA+DQiPplcxuMKalS dvM/CaHl5FXl3+b2ndKMAGXm2ln1sP9D5sx1O0bf2soPmQ8bf+ZBHbGeZ5qZO/LHBPWP0dl1TtugX y9CjZMblcnvQpw==; Date: Sat, 24 May 2025 12:15:42 +0300 Message-Id: <86plfy1i9t.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Sat, 17 May 2025 11:32:19 +0100) References: <87tt6meea1.fsf@gmail.com> <86wmb7t8du.fsf@gnu.org> <864ixsbykh.fsf@gnu.org> <87ikm8r0z2.fsf@gmail.com> <86frh3wrsi.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) Stefan, can you help us understand what is TRT in this case? > From: João Távora > Date: Sat, 17 May 2025 11:32:19 +0100 > Cc: Fernando de Morais , 77876@debbugs.gnu.org, > Stefan Monnier > > I think unconditional is how that variable is supposed to work. The syntax-aware stuff is what I did, and it > uses other mechanisms. So this change appears to be fusing two mechanisms. Ask Stefan Nonnier > perhaps. he introduced this library into Emacs and guided my work on it. > > João > > On Sat, May 17, 2025, 09:44 Eli Zaretskii wrote: > > > From: Fernando de Morais > > Cc: João Távora , > > 77876@debbugs.gnu.org > > Date: Sat, 10 May 2025 11:31:45 -0300 > > > > Eli Zaretskii writes: > > > > > Ping! Any progress with this issue? > > > > Sorry for my late reply. I had trouble finding the tests and then > > figuring out how to use them, but attached are the results: both for the > > tests applied to the `elec-pair' without modifications, and with them. > > > > Eight tests---the same ones---failed in both scenarios. The others were > > successful. Additionally, I’ve been using `elec-pair' with the > > modifications since my original email, and I haven’t encountered any > > inconsistencies or errors in my daily use. > > Thanks. My results are different: all tests pass both before and > after the change. > > João, based on these results, I think we can install the change? Or > do you remember why the 'unconditional' condition was in the code? From unknown Sun Jun 15 08:40:59 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77876: 31.0.50; elec-pair --- `electric-pair-inhibit-predicate' ignored for `electric-pair-pairs' Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 May 2025 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77876 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Fernando de Morais Cc: 77876@debbugs.gnu.org Received: via spool by 77876-submit@debbugs.gnu.org id=B77876.174818219228196 (code B ref 77876); Sun, 25 May 2025 14:10:02 +0000 Received: (at 77876) by debbugs.gnu.org; 25 May 2025 14:09:52 +0000 Received: from localhost ([127.0.0.1]:46182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uJC2y-0007Kg-BE for submit@debbugs.gnu.org; Sun, 25 May 2025 10:09:52 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42236) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uJC2v-0007K7-26 for 77876@debbugs.gnu.org; Sun, 25 May 2025 10:09:50 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4107B44083C; Sun, 25 May 2025 10:09:43 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1748182182; bh=LkWScdm9YhIpGvc0TQ08m+PSyCcn+2AffN4Ss5jOJR0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=a/yBKn/WtHO6PPeHYY+1VCXReTfrPjDFerOXI5mndJ18/UPdl3gd9Ig8YlAh2eCwZ xW3lGnPiVW0BFv6RmbjkixCvV0uvm7UGwSmOjnhE8FZSlq556xTVVp40NrIlYY95+L EzZjkwP+rGKIHcc+z/kyX0psuYQ/jgjnsONUPT0+a8dRu8nnf3Rt7S8aYOhwIb08Q1 lO1h30ocThph1bDFi1fXm7qk/eJPvyxso/VkBIpyOL0qALOQUYqE4pcDMDuYaYP6G9 kHR4TjZm5CZ2DX4bAop745N75MSEnGDdEwqmuBvpclTOuXt66HevfhpU5a5k5vT5Rz n8T+SsL8+mQuw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0C563440823; Sun, 25 May 2025 10:09:42 -0400 (EDT) Received: from alfajor (unknown [104.247.225.139]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D0AD0120512; Sun, 25 May 2025 10:09:41 -0400 (EDT) From: Stefan Monnier In-Reply-To: <87tt6meea1.fsf@gmail.com> Message-ID: References: <87tt6meea1.fsf@gmail.com> Date: Sun, 25 May 2025 10:09:40 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.352 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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 (---) > Although I believe this was a design decision, in my view, the > `electric-pair-inhibit-predicate' function should also apply to > characters in the `electric-pair-pairs' list. Currently, there the `electric-pair-inhibit-predicate` is called only for pairs that come fro the syntax-table and not for those in `electric-pair-pairs`, and this is by design, as you noted. I can't remember how we ended up with this design, but if you look at the code, the default `electric-pair-inhibit-if-helps-balance` presumes that it's called for a char that has a specific meaning in the syntax-table. And the use of `unconditional` that you remove is the only use of that value, which was computed for a reason. Maybe a good way forward is to call `electric-pair-inhibit-predicate` "unconditionally", but to pass it somehow the information whether the pair comes from `electric-pair-pairs` or not, so `electric-pair-inhibit-if-helps-balance` can skip trying to preserve balance? Ideally, the way this information is passed could be (re)used in bug#78053. E.g. maybe pass it a string instead of a char? This would be backward incompatible, so it's not ideal. Another approach could be to replace the (CHAR . CHAR) syntax of `electric-pair-pairs` with a new syntax (CHAR CHAR ...) where the `...` could be used to hold information such as a predicate to decide when this pair can be used, so you could use something like: (setq-local electric-pair-pairs '((?* ?* :predicate region-active-p) (?/ ?/ :predicate region-active-p) (?_ ?_ :predicate region-active-p) (?= ?= :predicate region-active-p) (?~ ?~ :predicate region-active-p) (?+ ?+ :predicate region-active-p))) - Stefan