From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72437: Unexpected behavior when inserting with prefix arg in electric-pair-mode Date: Sat, 03 Aug 2024 00:12:33 -0700 Message-ID: <87le1edqqm.fsf@breatheoutbreathe.in> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33084"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org To: 72437@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 03 09:14:14 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 1sa8xx-0008Vc-MR for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Aug 2024 09:14:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sa8xV-00072Q-OZ; Sat, 03 Aug 2024 03:13:45 -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 1sa8xU-00072H-A5 for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2024 03:13:44 -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 1sa8xT-0001zv-VM; Sat, 03 Aug 2024 03:13:44 -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:From:To:Subject; bh=EFtWRyxE9YUKFnuZRIEhNoZShIlnKKcV5sfJegPHGf4=; b=dQXZPBDT/2Y6Foplv1yA15cXn4akKchapKjCRmSNP6wSO2GrK4DVQwi+IdalTLDz+bUPIisnM4xBroRZdWIRZU71syc3/DTEQsy32p7cHcqV70csLhXBHB0VObepvICGwRvzXn4k3eviGDC4vKbEvAsVG8KQ8qNKsRLmdLXHFGnW9OrmKsNGpDGj8yfy70vOBsVwKm9hI5sSWCeuUEAd7oSNcBQ3y1uSGCkEmdGPnH5uBN5qLsebCoEDWIu/AkiikM3a3DZ0vGBO891NMNxQ39VSlj4OS4U+6z+txr+sKjwGUT6ZtYjniXwKTgu6ypHgMm4u7ASsgD5SKjvHQeZ98w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sa8xm-0003kH-JX; Sat, 03 Aug 2024 03:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: eliz@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Aug 2024 07:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72437 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: eliz@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172266918514321 (code B ref -1); Sat, 03 Aug 2024 07:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Aug 2024 07:13:05 +0000 Original-Received: from localhost ([127.0.0.1]:54017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sa8wr-0003iu-0Z for submit@debbugs.gnu.org; Sat, 03 Aug 2024 03:13:05 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sa8wm-0003iT-Li for submit@debbugs.gnu.org; Sat, 03 Aug 2024 03:13:03 -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 1sa8wT-0006z5-31 for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2024 03:12:41 -0400 Original-Received: from out-185.mta0.migadu.com ([91.218.175.185]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sa8wR-0001vg-Gl for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2024 03:12:40 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1722669157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=EFtWRyxE9YUKFnuZRIEhNoZShIlnKKcV5sfJegPHGf4=; b=nXrxRgtTtNYHKNh+wZ8Ussrp0UDXUU3OyCBAZYfVggK9sxQeZshMlLo63WuklRr4+nHT/I u8gSdFu8Zb75rsluXt1mJPiwOm6apLpLtPeUXBbUea8Omz97bSqeycRlEFs6AqzIkL3PXa IWtgJFya9W0rUYvp9cP4VYoI4TwNPTU= X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=91.218.175.185; envelope-from=joseph@breatheoutbreathe.in; helo=out-185.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:289666 Archived-At: Migrated from this thread on the devel mailing list: https://yhetil.org/emacs-devel/86ikwiumza.fsf@gnu.org/T/#t On Emacs 29.4, with emacs -Q Turn on electric-pair-mode (electric-pair-mode +1) Then press "C-2 (" Expected result: Either (()) or ()() Actual result: (() I noticed the unexpected behavior when attempting to surround some text with multiple braces in order to create Anki flashcards. More or less, I wanted to go from "foo" to "{{foo}}", and I thought perhaps that with the whole word selected, pressing "C-2 {" would DTRT. In general, I'm not sure whether "{}{}" or "{{}}"is more useful or expected, but I suspect both are better than "{{}". Thank you! Joseph