GNU bug report logs - #32896
27.0.50; wishlist: Delete matching pairs

Previous Next

Package: emacs;

Reported by: Alex Branham <alex.branham <at> gmail.com>

Date: Mon, 1 Oct 2018 14:35:02 UTC

Severity: wishlist

Found in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Juri Linkov <juri <at> linkov.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#32896: closed (27.0.50; wishlist: Delete matching pairs)
Date: Mon, 08 Oct 2018 23:09:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 09 Oct 2018 01:15:30 +0300
with message-id <87a7not799.fsf <at> mail.linkov.net>
and subject line Re: bug#32896: 27.0.50; wishlist: Delete matching pairs
has caused the debbugs.gnu.org bug report #32896,
regarding 27.0.50; wishlist: Delete matching pairs
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
32896: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32896
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alex Branham <alex.branham <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; wishlist: Delete matching pairs
Date: Mon, 01 Oct 2018 09:34:43 -0500
[Message part 3 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Juri Linkov <juri <at> linkov.net>
To: Alex Branham <alex.branham <at> gmail.com>
Cc: 32896-done <at> debbugs.gnu.org
Subject: Re: bug#32896: 27.0.50; wishlist: Delete matching pairs
Date: Tue, 09 Oct 2018 01:15:30 +0300
> 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.

Fortunately, Emacs already has such a command named ‘delete-pair’:
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. ‘C-x M-(’ to be the inverse of
‘M-(’ (insert-pair)


This bug report was last modified 6 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.