Subject: bug#46469: 27.1; `isearch-del-char' should move point further back

From: Eli Zaretskii <[email-masked]>
Date: Sat, 13 Feb 2021 09:04:47 +0200

> From: Augusto Stoffel <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 12 Feb 2021 21:20:36 +0100
> 
> On Fri, 12 Feb 2021 at 22:00, Eli Zaretskii <[email-masked]> wrote:
> 
> > I cannot reproduce this.  Do you see this in "emacs -Q"?
> 
> Could you try hitting ‘C-x C-e’ with the point at the beginning of the
> fourth line of the following text?
> 
> (progn
>   (define-key isearch-mode-map (kbd "DEL") 'isearch-del-char)
>   (execute-kbd-macro [?\C-s ?y backspace ?x ?1]))
> x1yx2
> 
> In "emacs -Q" I get the error message "Keyboard macro terminated by a
> command ringing the bell".
> 
> With my patch, there's no error and the point ends on "y", as expected.

I think I understand the issue now: you meant isearch-del-char,
whereas I thought you meant isearch-delete-char (which is bound to DEL
by default).  Sorry, I was reading the body of your report and didn't
pay attention to the Subject.

For isearch-del-char, I think what you see is the intended behavior:
that command doesn't undo the effect of the last character you type at
the I-search prompt, it just removes the last character of the search
string.  So it isn't supposed to move point back to where the search
started.  What you wanted to happen is what isearch-delete-char does.

OK?