From unknown Mon Jun 23 13:15:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32896: 27.0.50; wishlist: Delete matching pairs Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Oct 2018 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32896 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 32896@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.153840450016254 (code B ref -1); Mon, 01 Oct 2018 14:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Oct 2018 14:35:00 +0000 Received: from localhost ([127.0.0.1]:33406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6zHo-0004E6-Go for submit@debbugs.gnu.org; Mon, 01 Oct 2018 10:35:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6zHl-0004Dr-Iq for submit@debbugs.gnu.org; Mon, 01 Oct 2018 10:34:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6zHf-0003iC-JC for submit@debbugs.gnu.org; Mon, 01 Oct 2018 10:34:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56781) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6zHf-0003i6-GE for submit@debbugs.gnu.org; Mon, 01 Oct 2018 10:34:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6zHe-00075C-Po for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 10:34:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6zHb-0003gg-M1 for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 10:34:50 -0400 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]:39261) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6zHb-0003gQ-FK for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 10:34:47 -0400 Received: by mail-ot1-x32e.google.com with SMTP id c20-v6so6714950otl.6 for ; Mon, 01 Oct 2018 07:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=z1lwz6dSf/J+bUqZwrhdw903gP1reRUDq2Eed1F9XH4=; b=omeS/etaV+aH3I3dqWUDTcOXyIVy51pqycYJCUomn7ALdzT87SSrh39byiUDi3ouaH OKT2JxQlGfxzAv6dNdaFaab9kj/He7bhpEa3YaK2pc7dO41kQVeQs+9DQCi8R99ddHzr A9yR/LvsWj8vYD8reuh9d9EkgorizYOb6MNqU9Qi7dGC+nv3uFFLlneyo7gBHO1giPo8 UeTPkVHVs1rBowF4ocLHJbdc8LUCDkapXkrYnICY9EU0zFwUCektijqCeAsbd9A7hmqT +nj3AOywmbrGV03ph5EZIs/AO97t8lbulzKa2Y1dzvNqsJHRExteRtD1PdTuOeY2DvSq Djhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=z1lwz6dSf/J+bUqZwrhdw903gP1reRUDq2Eed1F9XH4=; b=HuqVq43CEdBLM5ap9ET9DzY5wIXKsxPC92Q4wBlnj0/vKHSw1TyUPj9WI3TvHFvZiC DP+p3XJ2MzlAhaKUOVbDvjJjpVy43033wbLan6Oq0WB356kKYl9/cTRmHFbU5GrAD6NO bUOunCqDpYIXPmRiRTl+y3RHspQ9i0CT5Z55aK0s0zk+/2rEWCMCWilbJxA7A88CCPjR T9axUl1fESxKEOfQNvsmpoLvFy1ok2kRtdqYlJunnnBukI4kIg9fieRa3ukxNAIul4LK 1IfLzuYRLZx8POW8d7C4z/iTZ6EX/5bfp0O2jPs4QPtzxY9CkhSzRDJs6Gnkb9u/NRA3 jXgQ== X-Gm-Message-State: ABuFfoi4ysvtyHlbrwvG1CdCvacf95l/U1Hk/P8lF/qGOBbFzBqB/7tg QRQgL7TgSJ4qTxypb22Zl8pPOPEC X-Google-Smtp-Source: ACcGV61/DtHGI4azC5/ScFYLW/1JTgi+xNyPqMrizN2wMjian0rEc+KiRJ065+RwKL9AMWmGKN3KrA== X-Received: by 2002:a9d:525b:: with SMTP id q27-v6mr6403901otg.229.1538404486133; Mon, 01 Oct 2018 07:34:46 -0700 (PDT) Received: from mars (nat-128-62-58-204.public.utexas.edu. [128.62.58.204]) by smtp.gmail.com with ESMTPSA id g188-v6sm967033oic.10.2018.10.01.07.34.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Oct 2018 07:34:45 -0700 (PDT) User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham Date: Mon, 01 Oct 2018 09:34:43 -0500 Message-ID: <87r2h9wxa4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain It would be nice if Emacs had a command to remove matching pairs of things so that (with | representing point): (|let (message "%s" "foobar")) I could delete the parens around the let function. This should work for other pairs too: (let ((foobar "foobar")) (message "%s" "|foobar")) to delete the quotes around the second "foobar" I know there are 3rd-party packages that implement this but it seems like this should be included with Emacs since it's such a great tool for editing. Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAluyMIMACgkQHkInolPp mscMjwf/a70YFGh83eZvpdjxHYf+LfrNrX9TziMoFMLOg75lWKOpt1MbZtQ8X2tj Rio4LjEYJezOAPl2ipxFz142hoNIREzeR+kH0Vr7dVLiGm96sOB1tEF08/Q0/Lvc choi2Oc8STSZXzELCBjd/AnrgKiHomAkhy4S5KpYrb3e5Yk3cka3u4JL/EL4JZ5t 0MnwikzOBEeotlLPjaYtx2AU+9q2mY5QC86aUjrG/TQV4nJiOWdXHGCSgnXaujh2 A61QcFx1i/9MfkK2Fy3Iv+bBgG2YYUQU/NXR14lPmq04Asu5XyK0j48GxQOrOAAr AU7bplAG2vPfGgeEQbHNxcVhD0UO8A== =Ey5E -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Jun 23 13:15:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Alex Branham Subject: bug#32896: closed (Re: bug#32896: 27.0.50; wishlist: Delete matching pairs) Message-ID: References: <87a7not799.fsf@mail.linkov.net> <87r2h9wxa4.fsf@gmail.com> X-Gnu-PR-Message: they-closed 32896 X-Gnu-PR-Package: emacs Reply-To: 32896@debbugs.gnu.org Date: Mon, 08 Oct 2018 23:09:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1539040143-4110-1" This is a multi-part message in MIME format... ------------=_1539040143-4110-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32896: 27.0.50; wishlist: Delete matching pairs which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 32896@debbugs.gnu.org. --=20 32896: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32896 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1539040143-4110-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32896-done) by debbugs.gnu.org; 8 Oct 2018 23:08:44 +0000 Received: from localhost ([127.0.0.1]:40917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9edo-00013T-KY for submit@debbugs.gnu.org; Mon, 08 Oct 2018 19:08:44 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:59472 helo=pdx1-sub0-mail-a36.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9edm-00013L-OI for 32896-done@debbugs.gnu.org; Mon, 08 Oct 2018 19:08:43 -0400 Received: from pdx1-sub0-mail-a36.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTP id 59A3880365; Mon, 8 Oct 2018 16:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=zuvY/D lSUJiViZw39BUkz8dJbMM=; b=Lk8nAqkatDPIsGAkMi+zx2H+g1Esg8beX9UZnq TTbdgYelCp56yoHGTPZq5H8ISJ35SpgUbDqO9h9lLjWt6i6N5hW9YNbc8M+fZ/6C zDnIMS9d2hFNpUOO3MMtdp0J9dEKEVobo3HPuEri13rCAUdVGU17FDUmOtqXdQs/ pb9tA= Received: from localhost.linkov.net (m91-129-107-184.cust.tele2.ee [91.129.107.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTPSA id CFEB88036B; Mon, 8 Oct 2018 16:08:40 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a36 From: Juri Linkov To: Alex Branham Subject: Re: bug#32896: 27.0.50; wishlist: Delete matching pairs Organization: LINKOV.NET References: <87r2h9wxa4.fsf@gmail.com> Date: Tue, 09 Oct 2018 01:15:30 +0300 In-Reply-To: <87r2h9wxa4.fsf@gmail.com> (Alex Branham's message of "Mon, 01 Oct 2018 09:34:43 -0500") Message-ID: <87a7not799.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudefgddulecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddukeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtrdhlihhnkhhovhdrnhgvthdpihhnvghtpeeluddruddvledruddtjedrudekgedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegrlhgvgidrsghrrghnhhgrmhesghhmrghilhdrtghomhenucevlhhushhtvghrufhiiigvpedt Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32896-done Cc: 32896-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > It would be nice if Emacs had a command to remove matching pairs of > things so that (with | representing point): > > (|let (message "%s" "foobar")) > > I could delete the parens around the let function. This should work for > other pairs too: > > (let ((foobar "foobar")) (message "%s" "|foobar")) > > to delete the quotes around the second "foobar" > > I know there are 3rd-party packages that implement this but it seems > like this should be included with Emacs since it's such a great tool fo= r > editing. Fortunately, Emacs already has such a command named =E2=80=98delete-pair=E2= =80=99: it deletes the parens around the let function as in your first example as well as the quotes in your second example. It makes sense to bind this command to e.g. =E2=80=98C-x M-(=E2=80=99 to be the in= verse of =E2=80=98M-(=E2=80=99 (insert-pair) ------------=_1539040143-4110-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 1 Oct 2018 14:35:00 +0000 Received: from localhost ([127.0.0.1]:33406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6zHo-0004E6-Go for submit@debbugs.gnu.org; Mon, 01 Oct 2018 10:35:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6zHl-0004Dr-Iq for submit@debbugs.gnu.org; Mon, 01 Oct 2018 10:34:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6zHf-0003iC-JC for submit@debbugs.gnu.org; Mon, 01 Oct 2018 10:34:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56781) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6zHf-0003i6-GE for submit@debbugs.gnu.org; Mon, 01 Oct 2018 10:34:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6zHe-00075C-Po for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 10:34:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6zHb-0003gg-M1 for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 10:34:50 -0400 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]:39261) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6zHb-0003gQ-FK for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2018 10:34:47 -0400 Received: by mail-ot1-x32e.google.com with SMTP id c20-v6so6714950otl.6 for ; Mon, 01 Oct 2018 07:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=z1lwz6dSf/J+bUqZwrhdw903gP1reRUDq2Eed1F9XH4=; b=omeS/etaV+aH3I3dqWUDTcOXyIVy51pqycYJCUomn7ALdzT87SSrh39byiUDi3ouaH OKT2JxQlGfxzAv6dNdaFaab9kj/He7bhpEa3YaK2pc7dO41kQVeQs+9DQCi8R99ddHzr A9yR/LvsWj8vYD8reuh9d9EkgorizYOb6MNqU9Qi7dGC+nv3uFFLlneyo7gBHO1giPo8 UeTPkVHVs1rBowF4ocLHJbdc8LUCDkapXkrYnICY9EU0zFwUCektijqCeAsbd9A7hmqT +nj3AOywmbrGV03ph5EZIs/AO97t8lbulzKa2Y1dzvNqsJHRExteRtD1PdTuOeY2DvSq Djhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=z1lwz6dSf/J+bUqZwrhdw903gP1reRUDq2Eed1F9XH4=; b=HuqVq43CEdBLM5ap9ET9DzY5wIXKsxPC92Q4wBlnj0/vKHSw1TyUPj9WI3TvHFvZiC DP+p3XJ2MzlAhaKUOVbDvjJjpVy43033wbLan6Oq0WB356kKYl9/cTRmHFbU5GrAD6NO bUOunCqDpYIXPmRiRTl+y3RHspQ9i0CT5Z55aK0s0zk+/2rEWCMCWilbJxA7A88CCPjR T9axUl1fESxKEOfQNvsmpoLvFy1ok2kRtdqYlJunnnBukI4kIg9fieRa3ukxNAIul4LK 1IfLzuYRLZx8POW8d7C4z/iTZ6EX/5bfp0O2jPs4QPtzxY9CkhSzRDJs6Gnkb9u/NRA3 jXgQ== X-Gm-Message-State: ABuFfoi4ysvtyHlbrwvG1CdCvacf95l/U1Hk/P8lF/qGOBbFzBqB/7tg QRQgL7TgSJ4qTxypb22Zl8pPOPEC X-Google-Smtp-Source: ACcGV61/DtHGI4azC5/ScFYLW/1JTgi+xNyPqMrizN2wMjian0rEc+KiRJ065+RwKL9AMWmGKN3KrA== X-Received: by 2002:a9d:525b:: with SMTP id q27-v6mr6403901otg.229.1538404486133; Mon, 01 Oct 2018 07:34:46 -0700 (PDT) Received: from mars (nat-128-62-58-204.public.utexas.edu. [128.62.58.204]) by smtp.gmail.com with ESMTPSA id g188-v6sm967033oic.10.2018.10.01.07.34.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Oct 2018 07:34:45 -0700 (PDT) User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham To: bug-gnu-emacs@gnu.org Subject: 27.0.50; wishlist: Delete matching pairs Date: Mon, 01 Oct 2018 09:34:43 -0500 Message-ID: <87r2h9wxa4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain It would be nice if Emacs had a command to remove matching pairs of things so that (with | representing point): (|let (message "%s" "foobar")) I could delete the parens around the let function. This should work for other pairs too: (let ((foobar "foobar")) (message "%s" "|foobar")) to delete the quotes around the second "foobar" I know there are 3rd-party packages that implement this but it seems like this should be included with Emacs since it's such a great tool for editing. Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAluyMIMACgkQHkInolPp mscMjwf/a70YFGh83eZvpdjxHYf+LfrNrX9TziMoFMLOg75lWKOpt1MbZtQ8X2tj Rio4LjEYJezOAPl2ipxFz142hoNIREzeR+kH0Vr7dVLiGm96sOB1tEF08/Q0/Lvc choi2Oc8STSZXzELCBjd/AnrgKiHomAkhy4S5KpYrb3e5Yk3cka3u4JL/EL4JZ5t 0MnwikzOBEeotlLPjaYtx2AU+9q2mY5QC86aUjrG/TQV4nJiOWdXHGCSgnXaujh2 A61QcFx1i/9MfkK2Fy3Iv+bBgG2YYUQU/NXR14lPmq04Asu5XyK0j48GxQOrOAAr AU7bplAG2vPfGgeEQbHNxcVhD0UO8A== =Ey5E -----END PGP SIGNATURE----- --=-=-=-- ------------=_1539040143-4110-1-- From unknown Mon Jun 23 13:15:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32896: 27.0.50; wishlist: Delete matching pairs Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Oct 2018 23:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32896 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 32896-done@debbugs.gnu.org Received: via spool by 32896-done@debbugs.gnu.org id=D32896.15390413896367 (code D ref 32896); Mon, 08 Oct 2018 23:30:02 +0000 Received: (at 32896-done) by debbugs.gnu.org; 8 Oct 2018 23:29:49 +0000 Received: from localhost ([127.0.0.1]:40945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9eyC-0001ed-LC for submit@debbugs.gnu.org; Mon, 08 Oct 2018 19:29:48 -0400 Received: from mail-ot1-f45.google.com ([209.85.210.45]:43948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9eyA-0001eN-Vv for 32896-done@debbugs.gnu.org; Mon, 08 Oct 2018 19:29:47 -0400 Received: by mail-ot1-f45.google.com with SMTP id k9so1125470otl.10 for <32896-done@debbugs.gnu.org>; Mon, 08 Oct 2018 16:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=H5VYDBHZZfchda05Jkg0KudFOCe8syzxnr2+ltD9FqM=; b=Vuf0qTe6kmTMbMTXs2/LWHHlvziAKDwQw7JXLV49iIAAdsfkVkuAi7kV28zDkPNj8Q 0ZnpNgX/MSGnmtZy8FikqCIMuXC5dovZsRue0i2PsoC65eIlmPz6m7Stt2iVyO9JEo/u iEQEU5bOWCYgAMg28ZRf90BVqaR5beiL0SKphIQ54lBNgAy+HhdLMnHSv/I6yIp4dDBf 9MlDx5wDvsGz8/juDHkF8TnDfCAKvsvLoo6t0FoxQaIRMdrX3Hf+aK+U2V1oRmVxsyMX cyq7wUgyRnat1fq3IB/mcmMD9itVjFuyaSzxAXIEliTpJA5u8N/ZtphuMVy6nW5EGV/k kD2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=H5VYDBHZZfchda05Jkg0KudFOCe8syzxnr2+ltD9FqM=; b=fVvuhLgQ6SV83vQzF/Mvg+gMLKIIqwOgrY0yNram+WrJgVSst1NvUSYccdi/cLtvd6 20a4auwwwCcOvUgPEh9sAlr9y/iqfurv7s8sYFoDZ+hqDxYFFhN506HbfCMGvHH5CZ9e kInolghXmD9ARUFsvYHNrfgukhjjc9RpwgZbudiYAAvKfpAV2wb3TXFDQyRM82YzgqXI bC9ZacV5yA2lwAlAuBkMq44zvwehtIJaM8hENi7o3pzklx25DI0rI5i8oyHD33BfXUQX 4/kkEb1aAvzoHuNrsT15+ROKmdsxQ0XwHFKS/8qCv2mtwYntlTziv1ZKS9lbDNAdU7kL 6rGg== X-Gm-Message-State: ABuFfohYL3y5OkCNEVHjyjbbi+SOzo4gKNdKztV8WkJistd518PDPEd6 T4Vv797Vw6V7FTUc+GA5FPdlyli6 X-Google-Smtp-Source: ACcGV62aRmHT1lNy+XGTfMLp+1YlzuYKdt4/dX9GMPPebWMLY9E07yOsvk0PY8+WGdns1DwZC/5bpQ== X-Received: by 2002:a9d:705b:: with SMTP id x27mr4304580otj.200.1539041380697; Mon, 08 Oct 2018 16:29:40 -0700 (PDT) Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id m11-v6sm6390947otc.18.2018.10.08.16.29.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Oct 2018 16:29:39 -0700 (PDT) References: <87r2h9wxa4.fsf@gmail.com> <87a7not799.fsf@mail.linkov.net> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham In-reply-to: <87a7not799.fsf@mail.linkov.net> Date: Mon, 08 Oct 2018 18:29:36 -0500 Message-ID: <87ftxgf25b.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon 08 Oct 2018 at 17:15, Juri Linkov wrote: > Fortunately, Emacs already has such a command named =E2=80=98delete-pair= =E2=80=99: > it deletes the parens around the let function as in your first > example as well as the quotes in your second example. It makes > sense to bind this command to e.g. =E2=80=98C-x M-(=E2=80=99 to be the in= verse of > =E2=80=98M-(=E2=80=99 (insert-pair) Yay! I didn't know about that command (and I really did search before reporting this bug, no idea how I missed it!). It doesn't work backward though as far as I can tell: (let (message "%s" "foobar")|) M-x delete-pair there does nothing. I was hopeful about `electric-pair-delete-pair' but it only works if the pair is adjacent. I guess this is closer to what I wanted: (defun my/delete-pair () "Call `delete-pair', perhaps also calling `backward-up-list'." (interactive) (condition-case nil (delete-pair) (t (progn (backward-up-list) (delete-pair))))) Anyway, thanks for the response! Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlu76GEACgkQHkInolPp msciUwf8Dl5wv3PC9LFv+NfipLTNFDEQm28eKGYbcHNrbYyN/kGaTNHunOThGu0T 9Y9sHqFaAs0bDne62SRp1HWok28x9gyLJkcfcTD6rul3yObIEipePJYL70pI+yJQ UAf9eWjkrI1yov3E9OZNctFIYqfUv7H4HSLZMlFOYFcSna/BCorw5Ky0XVbNRl7A iZHZqTrPkf9h3oDsZd2Is/vjycN51ECgyiAXqiiaPY1CXWQQRnWLoTruv4oyHuBa Ka2yHl1yfx0xr76nchHHTEBnuUnYxReGRB1vRLpjVWoxhp6oRyU4UTGTrfF1YFpj NBlLYY7I9NSF2Q0Ro6pC4hahjUWN+Q== =Tu2b -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Jun 23 13:15:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32896: 27.0.50; wishlist: Delete matching pairs Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Oct 2018 23:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32896 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alex Branham Cc: 32896@debbugs.gnu.org Received: via spool by 32896-submit@debbugs.gnu.org id=B32896.153973090327200 (code B ref 32896); Tue, 16 Oct 2018 23:02:01 +0000 Received: (at 32896) by debbugs.gnu.org; 16 Oct 2018 23:01:43 +0000 Received: from localhost ([127.0.0.1]:54098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCYLP-00074e-8H for submit@debbugs.gnu.org; Tue, 16 Oct 2018 19:01:43 -0400 Received: from pop.dreamhost.com ([64.90.62.162]:45228 helo=pdx1-sub0-mail-a7.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gCYLO-00074W-Ae for 32896@debbugs.gnu.org; Tue, 16 Oct 2018 19:01:42 -0400 Received: from pdx1-sub0-mail-a7.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a7.g.dreamhost.com (Postfix) with ESMTP id 9E9837F668; Tue, 16 Oct 2018 16:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=vADhGHUTvYBuzeDkNR9pxlgGF10=; b= N6wjuyuxDRp2TznUBHOoQEsjdXw+jWax3sWYxK1kHejmB/r64UkwXofe+tQOsLkX 2FzJS2tH32WaSXEj1RiQCJUIbehERMhowcp94/rnFC6UlZMrRtttNOHkHaKFhaEP V09rcVei65vj+fwwv+/u6DGZVwAx1LmjmDa+MDjcyuo= Received: from localhost.linkov.net (m91-129-96-249.cust.tele2.ee [91.129.96.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a7.g.dreamhost.com (Postfix) with ESMTPSA id 8986F7F688; Tue, 16 Oct 2018 16:01:40 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a7 From: Juri Linkov Organization: LINKOV.NET References: <87r2h9wxa4.fsf@gmail.com> <87a7not799.fsf@mail.linkov.net> <87ftxgf25b.fsf@gmail.com> Date: Wed, 17 Oct 2018 02:00:14 +0300 In-Reply-To: <87ftxgf25b.fsf@gmail.com> (Alex Branham's message of "Mon, 08 Oct 2018 18:29:36 -0500") Message-ID: <87murdlcox.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrfedugdduiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvgeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtrdhlihhnkhhovhdrnhgvthdpihhnvghtpeeluddruddvledrleeirddvgeelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprghlvgigrdgsrhgrnhhhrghmsehgmhgrihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> Fortunately, Emacs already has such a command named =E2=80=98delete-pa= ir=E2=80=99: >> it deletes the parens around the let function as in your first >> example as well as the quotes in your second example. It makes >> sense to bind this command to e.g. =E2=80=98C-x M-(=E2=80=99 to be the= inverse of >> =E2=80=98M-(=E2=80=99 (insert-pair) > > Yay! I didn't know about that command (and I really did search before > reporting this bug, no idea how I missed it!). It doesn't work backward > though as far as I can tell: > > (let (message "%s" "foobar")|) With a simple twist in the patch attached, it will be able to work backwa= rd with M-- M-x delete-pair, i.e. with a negative prefix argument. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=delete-pair.patch diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 5a89923f8f..fd6018988e 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -723,11 +723,12 @@ insert-parentheses (interactive "P") (insert-pair arg ?\( ?\))) -(defun delete-pair () +(defun delete-pair (&optional arg) "Delete a pair of characters enclosing the sexp that follows point." - (interactive) - (save-excursion (forward-sexp 1) (delete-char -1)) - (delete-char 1)) + (interactive "p") + (unless arg (setq arg 1)) + (save-excursion (forward-sexp arg) (delete-char (if (> arg 0) -1 1))) + (delete-char (if (> arg 0) 1 -1))) (defun raise-sexp (&optional arg) "Raise ARG sexps higher up the tree." --=-=-=--