From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#73688: [PATCH] electric-pair-mode - preserve balance in conservative mode Date: Sat, 30 Nov 2024 12:30:43 +0000 Message-ID: References: <86v7wwn4lz.fsf@gnu.org> <6eb1f1cd-80dd-4fec-bebc-9d361321000d@gmail.com> <865xoem96o.fsf@gnu.org> <8e331068-57e1-4375-8ccb-10eb83648986@gmail.com> <86frn981ix.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14952"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73688@debbugs.gnu.org, marc@soda.fm, Nikolay Kudryavtsev , monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 30 13:31:26 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 1tHMdC-0003kt-2a for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Nov 2024 13:31:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHMcs-0000Fs-FM; Sat, 30 Nov 2024 07:31:06 -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 1tHMcp-0000Fb-JC for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 07:31: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 1tHMcp-0001FV-3E for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 07:31:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=M/cJ6Waz5kfnKkMojkZJhsdwtNNElHu7B6dTmQjPg7o=; b=rfHCulL7txxDQm/XaxPdGZYQPl6rocuF4xLVifkpfmeJXodyB7gdzwCgB4q1TN+mga/zPx/e/zGswjIdkeWAzogT4vhtPatgmkamsbziohIEhlL2YyLz7gm7VZroaLWONAj8cv0NvA3drMZjz5Nqag54zZNJny5412DD6PNyAtJHcOo6xEwdAE6+aACbx/6hLw0hAx7LqpwXsvYhHCldjUAkEK604SLJnNZceb2NXj7U+eZ3ZqzntMhjypgNau3O/PI6HpZ03yetR60cB0w3nqe5d2dr0WYoip4VejRZje4M4HfJCM+lR7Z2Wf3owNore9dVdDsofT7eQztAlwMk3Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tHMco-0006aO-L7 for bug-gnu-emacs@gnu.org; Sat, 30 Nov 2024 07:31:02 -0500 X-Loop: help-debbugs@gnu.org 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, 30 Nov 2024 12:31: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.173296981024884 (code B ref 73688); Sat, 30 Nov 2024 12:31:02 +0000 Original-Received: (at 73688) by debbugs.gnu.org; 30 Nov 2024 12:30:10 +0000 Original-Received: from localhost ([127.0.0.1]:45858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHMbx-0006T8-QA for submit@debbugs.gnu.org; Sat, 30 Nov 2024 07:30:10 -0500 Original-Received: from mail-oi1-f169.google.com ([209.85.167.169]:61614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tHMbv-0006RZ-MX for 73688@debbugs.gnu.org; Sat, 30 Nov 2024 07:30:08 -0500 Original-Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3ea4c550a3fso1181551b6e.2 for <73688@debbugs.gnu.org>; Sat, 30 Nov 2024 04:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732969742; x=1733574542; 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=M/cJ6Waz5kfnKkMojkZJhsdwtNNElHu7B6dTmQjPg7o=; b=Mue82MYA/jJJWFQqNLYMQcvt6i5J9aZRVnhui7Z6KinaBoisuCiPt0uBj8aQckIqZf E4P730QT3xmIYFwMpPGMAFD/4QY87g4bOATBF6dCzmJQ17Tgtk7BAReK09Trvrnfjn6s UYch8hKb0aAOO0XR51CrSe+zt66Ykv3MNGHzyYeoY82Lp7pxqVqO4jndwY/jWdKQviSl sXO1IGJwENNNxnjmi5Tgb1NKMSBs7EAPhoORxR0U/gU4PVmb0auds4Ivqs8B2OL5cDIy hd372x5iPAV1SCKy+HzkL3DfLee1OgJRKx13tWb87Lu8GJ9nuGK2/AMLu68g/7+My0sw L0yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732969742; x=1733574542; 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=M/cJ6Waz5kfnKkMojkZJhsdwtNNElHu7B6dTmQjPg7o=; b=pUUL67hnbF/qppe4ImxWhDKX+BwRifVxhlJSTO4BPJ/HT1BgC7cSG5LRgZ18UGGaH1 9UOHE4Jp91fLHJ0xJII2Bi4H/CTUbcvJedYYF0BYlXi8vJjz6YpA+O3jYS0RpL/deZt+ mBzP/dHgwrU4+4B8Nh1Ob5axi+IlTm9CNZZr9IbJpey0I9ALDVqbPoVYdKQVhcVIvHMP f2ZiKHDOz2gtRkILLjL+NFOzJNvepMc2fINbnrUggAKhA/rmvjPMUqwG7CGZVZSLeDaX syiE7/JGWff8lsgnf5O6/ZmdtmxfsvrZzWWabCev3p64HeqljICkFCd7Rq+9p6or2xXG VmJw== X-Forwarded-Encrypted: i=1; AJvYcCXrb5rk0cWcnnEE4eFdr1Kg54qOjQEG4pUy+LZ4Dv8ppdJHAscHFCfh24Nx3gCw4Tpjiz3J1g==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwwsZ0UPhxJRdT3IGOkaEi4TxiLR2OCkfs34VkOm58XlHPVOpGE dj38Djc9P9iC1C0vtu0+2ei5dNtu8FoFKS1qBoaKG+KYFETxM8n0eECqsCTiDX5Z8WmFHyz376o kO9KIa/dpytmrWqwDTcRoEhVX9Eg= X-Gm-Gg: ASbGncupWbUibEJF2/gPN01NUP89OWrYI3BaqXC1vWF7W5sIobOGm4wXJtoaEfBoUq6 BTuVF/5sVXi10izVURdKTmM3DQ8Op/g== X-Google-Smtp-Source: AGHT+IHd1yFP9jUYs88QZ5E5eeHpOk8CF19RDTvwJVDA0N8XcMAOmRQLN6JnzeLk0eCNOG9bTWaA6xtuou67NMqSF1M= X-Received: by 2002:a05:6808:2e8c:b0:3ea:69df:c258 with SMTP id 5614622812f47-3ea6dda81f8mr13969100b6e.37.1732969742057; Sat, 30 Nov 2024 04:29:02 -0800 (PST) In-Reply-To: <86frn981ix.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296162 Archived-At: On Sat, Nov 30, 2024 at 10:22=E2=80=AFAM Eli Zaretskii wrote= : > > Implementing it would lead to deprecating > > electric-pair-inhibit-predicate(should be still working though for X > > major versions), and beyond this use-case there doesn't seem to be that > > many other use cases for inhibit-predicates anyway. But this would give > > us a lot more flexibility for whenever they appear, since this seems to > > be the proper solution here. > > Stefan and Jo=C3=A3o, any comments or suggestions? I see some talk of multiple ORd predicates, and deprecating electric-pair-i= -p saying it's not flexible, and I don't think that's true. I don't think it's a good idea to hardcode in some intermediate level of just-what-I-want customization when there are already two levels: - a relatively blunt customization-based one that fits a majority of users, - a finer-grained powerful based on Elisp add-function one that fits very specific needs. To me that's a good example of Alan Kay's =E2=80=9CSimple things should be simple; complex things should be possible.". So I think it's a better idea to add snippet examples to the documentation that describe how to achieve these complex things. Jo=C3=A3o