From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Nikolay Kudryavtsev Newsgroups: gmane.emacs.bugs Subject: bug#73688: [PATCH] electric-pair-mode - preserve balance in conservative mode Date: Sat, 9 Nov 2024 13:30:53 +0300 Message-ID: <6eb1f1cd-80dd-4fec-bebc-9d361321000d@gmail.com> References: <86v7wwn4lz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40463"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 73688@debbugs.gnu.org To: Eli Zaretskii , Marc Soda , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 11:33:22 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 1t9imQ-000AJw-91 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 11:33:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9im8-0003ID-U9; Sat, 09 Nov 2024 05:33: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 1t9im6-0003Hv-R4 for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 05:33:02 -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 1t9im6-00015z-Il for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 05:33:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:References:MIME-Version:Date:From:To:Subject; bh=AIsVZHHaOszB29SFjrS7oS19YHd1gW5TV8iVlTisB2A=; b=g0o4ZHbc0waav68oxfKFG8ZEqGqtp3AYjt5Fil8FWh4BQ6coeplfIFjdtfVUICiwUJQQxwPtIfbhQ6MKVXqE3MNomHImgUyNLawj7t1GDCTVSPfE+pDqCSp0LZ7clk9CjsMRtNby3ugErfvRnnGBsCFKilgNmBQ2If+Rt9zqqh3ydrUOiUW0IqoRlmWGuHvB+QRJKGPgWF/FR6E3BsD67uaIF748bmXC3LDsH7VeQEfq/YEbhr66UVw6EkY24Tmg9v8mFlMZEL4pzLqCxQEdE/WNcHdVKXH418T2UIY239RCEUIWJRh8jZenKuB8P4yFpXm4EZCCuXAsUl0k3OPHKw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t9im6-0004yF-DW for bug-gnu-emacs@gnu.org; Sat, 09 Nov 2024 05:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Nikolay Kudryavtsev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Nov 2024 10:33: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.173114832819027 (code B ref 73688); Sat, 09 Nov 2024 10:33:02 +0000 Original-Received: (at 73688) by debbugs.gnu.org; 9 Nov 2024 10:32:08 +0000 Original-Received: from localhost ([127.0.0.1]:53541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9ilD-0004wp-MS for submit@debbugs.gnu.org; Sat, 09 Nov 2024 05:32:07 -0500 Original-Received: from mail-lj1-f171.google.com ([209.85.208.171]:53251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t9ilC-0004wI-5Q for 73688@debbugs.gnu.org; Sat, 09 Nov 2024 05:32:06 -0500 Original-Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2fb5fa911aaso38123491fa.2 for <73688@debbugs.gnu.org>; Sat, 09 Nov 2024 02:32:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731148260; x=1731753060; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:from:to :cc:subject:date:message-id:reply-to; bh=AIsVZHHaOszB29SFjrS7oS19YHd1gW5TV8iVlTisB2A=; b=OiBPfuAyOWtj/U2LFEONFVLwXkdXNFIviubQtx+02A3bXke4p814NIUsoXH7yxLdCP qGrmcJWgi+JOe4iCE8ty3Gxlb+ZiJlIfoBG7CuDVaxh3AshsDBZrz6RrxNB9qOsBplpB azbiTQzCMERuRMyMh5dGu4TP2A5jFJxDuF8ts9+/crf1vJHtMyq4tQmuRWf/1hlyn3Y7 4Aez8jIwoN9U41szvJFePoPJS1pItXchKM/A7unMH/Ze32z14cOHEs2w8M4bSiGTHylN 33/31IwZbbIcmyVf/jRxxteDBzFq/3jOuyabiXU9Vh61J7zr0doUFSJwkKbD3mV9/jTd He5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731148260; x=1731753060; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AIsVZHHaOszB29SFjrS7oS19YHd1gW5TV8iVlTisB2A=; b=pcwVII6H8FrQ/d7xjgqSENLBkVd7aXgvz12EYR3SBhtk3NFGjq6ar48i6PH04TYI7R xSfyFeRsdwgwZO2hoGjzfopEVu0exPaROKc2mFLIykw+zJ0ranecVcx3atqvpgkbEcrL IYBKTCti77nDNTsyB15kYJZeD8sFZly4Ykaf0znkevo766woQDgAIqGgVKlbA5QGeHAP 9gE7gIhhcokANYE0wAshcSZWsou9owXEwmitVGV2A1Z1m0ULV2wcHBqva73WfMClNO7i nFe+XWkMDlbMuJxEzFXygiE1rFgEs9I6K59JMFX82Rfgyuv233aGuArD4SCa20zO4Rt9 i5Ng== X-Gm-Message-State: AOJu0YxZOt890MiHIiUz/Ovo7V+FpLs7RQySqIpYIBkeemayn3dm8BpK wL+Q7L/OQgraTo4mtPhNRZwgXOwBaVnIL1IEUVZ0pAuSgLrqpO8p X-Google-Smtp-Source: AGHT+IHZYuUe1y61eh74MRn18JY48qf8AcJDWWL1YH+fHHnTxeVkpNUwYTlmCwNrNoiHOzbgfmb3PQ== X-Received: by 2002:a2e:bc1a:0:b0:2fa:d4ef:f234 with SMTP id 38308e7fff4ca-2ff2016361fmr36949411fa.1.1731148259691; Sat, 09 Nov 2024 02:30:59 -0800 (PST) Original-Received: from ?IPV6:2a02:2168:b20b:5100:683:d2c3:f768:ca4? ([2a02:2168:b20b:5100:683:d2c3:f768:ca4]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ff179d85e3sm10034791fa.116.2024.11.09.02.30.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 Nov 2024 02:30:57 -0800 (PST) X-Google-Original-From: Nikolay Kudryavtsev Content-Language: en-US, ru In-Reply-To: <86v7wwn4lz.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:295121 Archived-At: I'm another person interested in exactly this feature. Had a similar rough hack in my init, though I didn't notice that electric-pair-conservative-inhibit mostly works... 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.