GNU bug report logs - #78909
[PATCH] Add 'forward-delete-char-hungry' command

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Thu, 26 Jun 2025 23:59:05 UTC

Severity: normal

Tags: patch

Done: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78909 <at> debbugs.gnu.org
Subject: bug#78909: [PATCH] Add 'forward-delete-char-hungry' command
Date: Tue, 01 Jul 2025 21:37:53 -0600
Eli Zaretskii <eliz <at> gnu.org> writes:

>> I had originally intended to add a kind of `hungry-delete-mode`, because
>> sometimes this type of deletion is useful (e.g. for some programming
>> modes).
>> 
>> While `cc-mode` already have it, it's only "exclusive" for `cc-mode`
>> modes.
>> 
>> This new command was more of a kind of `c-hungry-delete-forward` than a
>> `backward-delete-char-untabify`.
>> 
>> I wasn't sure if it would be worth moving those cc-mode commands for
>> general use, or make/move the `hungry` feature from
>> `backward-delete-char-untabify` to be used generally.
>
> In addition to C Mode's hungry-delete, we also have M-\ and M-SPC,
> which are available globally.  Are they not enough?

M-\ and M-SPC are fine, of course, but I think it would be fine to have
other commands that combine both behaviors: delete whitespaces if there
are, otherwise delete the character forward/backward, a DWIM style.

> if not, can you explain what's missing in those commands?

Actually nothing, I'm proposing 2 DWIM-type commands (or a minor mode)
for this hungry-like deletion, similar to c-hungry commands.

`backward-delete-char-untabify` has 2 interesting hungry-like deletions,
one that only deletes both tabs and spaces, and other that deletes _all_
whitespaces.

-- 
                                          - E.G via GNU Emacs and Org.




This bug report was last modified 2 days ago.

Previous Next


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