Subject: Re: bug#12826: 24.2.50; M-x term, delete-backward-char doesn't delete input when rebound to non-backspace key doesn't

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 15 Jul 2021 19:19:45 +0200

Stefan Monnier <[email-masked]> writes:

>> I binded delete-backward-char to other key than backspace and deleting
>> text in M-x term doesn't work as it should.  when I write e.g.
>> "aoeui" and then remove "aoeui" and type "ls" terminal tries to launch
>> command "aoeuils".  This is an issue also with emacs -q and running
>> command (global-set-key (kbd "C-.") 'delete-backward-char)
>
> That's because the way to perform a "backspace" in such a terminal is to
> send the DEL char to the application (e.g. `backspace' is bound to
> term-send-backspace in term.el).
>
> Not sure how term.el could better handle your situation.  I guess it
> could try to prevent you from running the delete-backward-char command
> (so at least you get to learn about the problem more directly).
> or maybe it could remap delete-backward-char to term-send-backspace.

I think this sounds like there isn't really an error here, and that this
is up to the user, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no