GNU bug report logs - #73284
[PATCH] Add option to push mark after delete-pair

Previous Next

Package: emacs;

Reported by: Paul Nelson <ultrono <at> gmail.com>

Date: Sun, 15 Sep 2024 20:59:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

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: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#73284: closed ([PATCH] Add option to push mark after delete-pair)
Date: Sat, 21 Sep 2024 10:26:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 21 Sep 2024 13:25:05 +0300
with message-id <867cb5483i.fsf <at> gnu.org>
and subject line Re: bug#73284: [PATCH] Add option to push mark after delete-pair
has caused the debbugs.gnu.org bug report #73284,
regarding [PATCH] Add option to push mark after delete-pair
to be marked as done.

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


-- 
73284: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73284
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Nelson <ultrono <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add option to push mark after delete-pair
Date: Sun, 15 Sep 2024 22:58:09 +0200
[Message part 3 (text/plain, inline)]
The delete-pair command from lisp.el deletes a matched pair of
delimiters.  After using this command, I often want to operate on the
region enclosed by the deleted delimiters.  As far as I know, there's
currently no quick way to access the end of that region.

This patch introduces a custom option, delete-pair-push-mark.  When
enabled, it causes delete-pair to push a mark at the end of the
enclosed region.

This opens up various workflows.  For instance, after deleting a pair,
we can use C-x C-x to highlight the region and act on it further.
Alternatively, we can use C-M-k to delete the first sexp inside the
delimiters, then act on the remainder.

To err on the side of caution, I hid the new behavior behind a user
option, disabled by default.  I could just as well see it being turned
on by default (or getting rid of the user option, making the new
behavior "mandatory"), and am open to suggestions/feedback.

Thanks, best,

Paul
[0001-Add-option-for-delete-pair-to-mark-end-of-region.patch (application/octet-stream, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Nelson <ultrono <at> gmail.com>
Cc: 73284-done <at> debbugs.gnu.org
Subject: Re: bug#73284: [PATCH] Add option to push mark after delete-pair
Date: Sat, 21 Sep 2024 13:25:05 +0300
> From: Paul Nelson <ultrono <at> gmail.com>
> Date: Sun, 15 Sep 2024 22:58:09 +0200
> 
> The delete-pair command from lisp.el deletes a matched pair of
> delimiters.  After using this command, I often want to operate on the
> region enclosed by the deleted delimiters.  As far as I know, there's
> currently no quick way to access the end of that region.
> 
> This patch introduces a custom option, delete-pair-push-mark.  When
> enabled, it causes delete-pair to push a mark at the end of the
> enclosed region.
> 
> This opens up various workflows.  For instance, after deleting a pair,
> we can use C-x C-x to highlight the region and act on it further.
> Alternatively, we can use C-M-k to delete the first sexp inside the
> delimiters, then act on the remainder.
> 
> To err on the side of caution, I hid the new behavior behind a user
> option, disabled by default.  I could just as well see it being turned
> on by default (or getting rid of the user option, making the new
> behavior "mandatory"), and am open to suggestions/feedback.

Thanks, installed on master, and closing the bug.

Please in the future make sure any new user options always have the
:version tag.


This bug report was last modified 244 days ago.

Previous Next


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