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: Thu, 17 Oct 2024 12:48:29 -0400 Message-ID: References: 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="5060"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73688@debbugs.gnu.org To: Marc Soda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 17 18:49:57 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 1t1ThD-00018Y-ON for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Oct 2024 18:49:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1Th0-0006CN-7d; Thu, 17 Oct 2024 12:49:42 -0400 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 1t1Tgy-0006C2-SM for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 12:49:40 -0400 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 1t1Tgy-0003dM-JF for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 12:49:40 -0400 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=xXISIepevvbGrNL4567LcXnzPvljluFaIB2OOrqlJpQ=; b=OplmZCcY11358gUj2mtlazY9mhW0U+NOl5UJieeaRLALISnZK2JYqV8gyyry5AZdgrzackGv4ppzErH1e45b6WgmR9sHD/imFalt7L13BmH1kBYyenVb8d0nmJt78+omOA7KYEjmCO+1tdOkfJrxgF/sTqiYaP2j60XEM9cyRbgXMGvUKgxGvC0nQcxicluzQLawnovu4rIvbOGhhGJ4EOeNNF9q0Zyob6/6DpXYK7BnIA2zK9NUwrTMfDe7P64dXbgcLVE2jMGEadHEAkUMez8gARG2dKuoal/58SzA4pw9Zi5UPf9YiNyNfgdxffMTvaUvbhvCXMCQmMA6BAF5gA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1ThJ-0000rL-Ma for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2024 12:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Oct 2024 16:50:01 +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.17291837483230 (code B ref 73688); Thu, 17 Oct 2024 16:50:01 +0000 Original-Received: (at 73688) by debbugs.gnu.org; 17 Oct 2024 16:49:08 +0000 Original-Received: from localhost ([127.0.0.1]:35416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1TgO-0000py-HW for submit@debbugs.gnu.org; Thu, 17 Oct 2024 12:49:08 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1TgJ-0000pO-2d for 73688@debbugs.gnu.org; Thu, 17 Oct 2024 12:49:03 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7F64E80932; Thu, 17 Oct 2024 12:48:32 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1729183710; bh=zUkDh5LZYvB3IMWDyCkZAYlv0L/1yP4FhMC/PSO4LZk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=GqwDYn6nfVzpotucL42by7w3D5Nj3D3569aFPlT+dLzHRDNWhaXQLRFS00duOHni7 r2c7HHcFCv1Hjk9QmaU9A8YPhxbMmC1Lu+zapefbOrSShEi4hyTOUGVZ7Kz2PTt8Da YkVzkVUHnmOZCJr0l5mkjlX+UYjFe5tV4ER3aRvkX7HW7qqZ9P1vIeCVeH/rr667o7 oJQwxrDKqlMoucQFmD11mNeUoin2B7/VGk47HHYnjXDH1YgQHSw14sDHz7igaRxXzG GEb+ablGpukNP2hV0AHFy0JY2ngMgm0Nedwn3ZX/GcegaxoKlK5NLsvpXTrQmUsa3I dSDP+hXUqKcqg== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9E07F8027D; Thu, 17 Oct 2024 12:48:30 -0400 (EDT) Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 77D7A120647; Thu, 17 Oct 2024 12:48:30 -0400 (EDT) In-Reply-To: (Marc Soda's message of "Tue, 08 Oct 2024 03:10:54 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293735 Archived-At: > When using electric-pair-mode, electric-pair-conservative-inhibit > doesn't respect electric-pair-preserve-balance. That's a feature. At least that was for me the main reason to have `electric-pair-conservative-inhibit`, i.e. so the behavior does not depend on the global paren balance of the whole buffer (both because it can be costly to compute and because it can be difficult to predict for the user). IOW, why do you use `electric-pair-conservative-inhibit` if you care about preserving global balance? Stefan