GNU bug report logs - #78262
30.1; comint-delchar-or-maybe-eof doesn't respect delete-active-region

Previous Next

Package: emacs;

Reported by: Sebastián Monía <sebastian <at> sebasmonia.com>

Date: Mon, 5 May 2025 14:45:02 UTC

Severity: normal

Merged with 73527

Found in versions 30.1, 30.0.90

Fixed in version 31.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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> linkov.net>
Cc: sebastian <at> sebasmonia.com, Eli Zaretskii <eliz <at> gnu.org>, 78262 <at> debbugs.gnu.org
Subject: bug#78262: 30.1; comint-delchar-or-maybe-eof doesn't respect delete-active-region
Date: Mon, 12 May 2025 15:34:47 -0400
>> Ah.  I consider this part of delsel.el to be obsolete (made obsolete
>> back in Emacs-24 by the `delete-active-region` variable).
> It seems the primary reason people are rebinding `C-d` from `delete-char`
> to `delete-forward-char` is to be able to delete the region with it.

Yeah, I can't see what other reason there would be.

>> If `delsel.el` wants to make `C-d` delete the active region, it should
>> preferably do it by remapping `delete-char` to `delete-forward-char`, IMO.
> Not sure if `delsel.el` should rebind the global keybindings.

That would be to preserve its historical behavior w.r.t `C-d` while
making use of the "new" infrastructure.
I'm also not sure if that's important to do.
[ Also, I really meant "remap", not "rebind": it can be done easily and
  non-destructively in a minor mode map, contrary to rebinding.  ]

The way I see it, the only reason why we still want/need `delsel.el` is
to implement the "delete active region upon insertion", i.e. things
like:

    (put 'self-insert-command 'delete-selection #'delete-selection-uses-region-p)
    (put 'yank 'delete-selection 'yank)

> Anyway, your latest patch is sufficient for closing this bug report.

Indeed, the delsel part is orthogonal.  I pushed it (fixed to obey
command remapping), thanks.


        Stefan





This bug report was last modified 6 days ago.

Previous Next


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