From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#42654: Using electric-pair-inihibit-predicate won't work for all members of electric-pair-pairs Date: Mon, 06 Jun 2022 17:28:33 +0200 Message-ID: <87h74xstem.fsf@gnus.org> References: <1TK38SyOLkqabqkCrOYwMFSlY5dxH2-9LZVgtl-xgLwFmdAta5cLCMcWRLXya124ex_cHppAJJOM0nyVVS16JUlTv7zWNdB2oy68gM1cNYw=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26329"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 42654@debbugs.gnu.org To: ej32u@protonmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 06 17:56:42 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 1nyF5t-0006aS-Tf for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jun 2022 17:56:41 +0200 Original-Received: from localhost ([::1]:55586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyF5s-0004ml-Rn for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jun 2022 11:56:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyEf8-0005CJ-AP for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2022 11:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42617) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyEf8-0001J5-1l for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2022 11:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyEf7-0004U0-Rk for bug-gnu-emacs@gnu.org; Mon, 06 Jun 2022 11:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jun 2022 15:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42654 X-GNU-PR-Package: emacs Original-Received: via spool by 42654-submit@debbugs.gnu.org id=B42654.165452932917189 (code B ref 42654); Mon, 06 Jun 2022 15:29:01 +0000 Original-Received: (at 42654) by debbugs.gnu.org; 6 Jun 2022 15:28:49 +0000 Original-Received: from localhost ([127.0.0.1]:36511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyEev-0004TB-3N for submit@debbugs.gnu.org; Mon, 06 Jun 2022 11:28:49 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:41590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyEes-0004Sg-E5 for 42654@debbugs.gnu.org; Mon, 06 Jun 2022 11:28:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=6QSl0A85tvKD/qjvmTCUjMF74UdBZnWxnEXbVomkVEs=; b=fpkEbsVWBBFsZs+DBRe7wutYDA qJjaYG+eXdwIV627WAWKPkfZsMGhbf++L4keeNKk9F9Gg/4lSrttx8lXL+s/DHqSRpJyAvIAB1N08 f88YW/9Kqqon+rhAjmvFbRcWktFuQdRNLVFAKjadX8V9yDHbmAcwSUUQXMnHKstZU1rw=; Original-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 1nyEeg-0004i2-P6; Mon, 06 Jun 2022 17:28:39 +0200 X-Now-Playing: Vilde & Inga's _How Forests Think_: "=?UTF-8?Q?=E2=80=94?= VI" In-Reply-To: <1TK38SyOLkqabqkCrOYwMFSlY5dxH2-9LZVgtl-xgLwFmdAta5cLCMcWRLXya124ex_cHppAJJOM0nyVVS16JUlTv7zWNdB2oy68gM1cNYw=@protonmail.com> (ej32u@protonmail.com's message of "Sat, 01 Aug 2020 17:31:55 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233798 Archived-At: ej32u@protonmail.com writes: > * More pairs can be defined by adding to electric-pair-pairs. > * To use electric-pair-inhibit-predicate, the syntax of the character must be one of ' > (?\( ?\" ?\$). > * In Org mode, it is convenient to have pairs for "~", "+", "_", and "/". These > characters are not in the syntax classes required to run the inhibition function. > * The syntax class of the characters can be modified, such as with > (modify-syntax-entry ?* "$"). > * Once the syntax class is modified, the characters are automatically paired by > electric-pair-mode. This means that the characters then do no need to be added to > electric-pair-pairs. > > I think it is a bug that electric-pair-inhibit-predicate won't be run when checking > members of electric-pair-pairs. Yes, the syntax can be modified, but that makes the > adding of the pair to electric-pair-pairs redundant, no? (I'm going through old bug reports that unfortunately weren't resolved at the time.) Looking at the code, I'm not quite sure I understand your point here. Perhaps it would be easier if you had a simple test case, and you could explain what you see happening, and what you want to have happen? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no