From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73688: [PATCH] electric-pair-mode - preserve balance in conservative mode Date: Sat, 09 Nov 2024 10:55:35 -0500 Message-ID: References: <86v7wwn4lz.fsf@gnu.org> <6eb1f1cd-80dd-4fec-bebc-9d361321000d@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25430"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , Marc Soda , 73688@debbugs.gnu.org To: Nikolay Kudryavtsev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 16:56:12 2024 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 1t9nop-0006Ok-5C for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 16:56:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9noi-00037U-2p; Sat, 09 Nov 2024 10:56:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9noh-00037L-CF for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 10:56:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9noh-0004sf-4S for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 10:56:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=UfNFwLfYZMpcwq6BVTOnAkWjvmuKkkz+038+eSTFG3k=; b=XtbIYvfeIllCy9wtvo4hq219GSSHwmft3q5fyCAGASTXEFrBRLiQHVnoOOta3YgPI1A7aWcnd/rK4gdQq5wUyesa6lDtSqkvI3qkSUhMDXcP8waZgBvX+wLXV6Qec3WtqbIZHjg3FMaN6zvGizIi4x6IetxydzxRbXtgSsL+kwxwCP90RFaE30Jlfe+r79VfXKp6xVMlkoOvHNgyQ4KzllSabI4PKK3VvT4TC/29QEpelj3tO7GT6sFkQWNwcpmQ6YV64M6TV0vWPeKKNgFmOBkYApQEzGUMDmd0Abk2aYFL5nRE+mX0fZeR+lAcZMTh4kY2HFAEJfmV6AQnO9qgOw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9nog-0002HD-VF for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 10:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 15:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73688 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 73688-submit@debbugs.gnu.org id=B73688.17311677518727 (code B ref 73688); Sat, 09 Nov 2024 15:56:02 +0000 Original-Received: (at 73688) by debbugs.gnu.org; 9 Nov 2024 15:55:51 +0000 Original-Received: from localhost ([127.0.0.1]:54102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9noU-0002Gg-SB for submit@debbugs.gnu.org; Sat, 09 Nov 2024 10:55:51 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9noQ-0002GQ-Mc for 73688@debbugs.gnu.org; Sat, 09 Nov 2024 10:55:49 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4D80E100208; Sat, 9 Nov 2024 10:55:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1731167736; bh=Se10WP4zxfXWeoP/UbBMsbFwHRuN3b6l6KGPt8FRnZs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Med1TBnSiH/IT1bEKlWciH/yOeCcC8mrfaUWhEjcOaLBqpvARaXO+z91MqE1UQluq qVSJ0v25a/PoalRpJeDgAgngheo24vKSSGDWfsTCVGZaYhGhO98pryvJNxiZ6oNTdV NrXLEwMzQCxcg+nlhYqZ6883hubAacUkycCdkGUy+r5/6xKf6F5M6bn6M9uHG4NT3o qzP6kf1Yyryfo39df/yNOORwEo5/jwfdqFy648lGCt4B2m9GLW+MGe2Z1wJ4jzqjuE dnmttzXRmw3v+lI52JKVDAl01hPtMesRhNqGYCLSGm23wh8TzLBdawoWZGecgHUykL IWDmglQiyi0zw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 77AC8100055; Sat, 9 Nov 2024 10:55:36 -0500 (EST) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3F2A0120371; Sat, 9 Nov 2024 10:55:36 -0500 (EST) In-Reply-To: <6eb1f1cd-80dd-4fec-bebc-9d361321000d@gmail.com> (Nikolay Kudryavtsev's message of "Sat, 9 Nov 2024 13:30:53 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:295138 Archived-At: > Not 100% sure about this, but I'm probably not the first person to think > that a single predicate design just does not work here in a satisfying > manner and it should be electric-pair-inhibit-predicates and then the end > user can tweak them as needed. But then we'd have to hard-code whether the predicates are AND'ed or OR'ed together. In contrast the current design lets you choosing between `(add-function :before-until ...)` and `(add-function :before-while ...)`. Stefan