Subject: bug#20466: closed (Re: bug#20466: 25.0.50; REGRESSION in `isearch-mode-map': <backspace> is not translated to DEL)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 01 May 2015 21:13:03 +0000

Your bug report

#20466: 25.0.50; REGRESSION in `isearch-mode-map': <backspace> is not translated to DEL

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
20466: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20466
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#20466: 25.0.50; REGRESSION in `isearch-mode-map': <backspace> is not translated to DEL
From: Stefan Monnier <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Fri, 01 May 2015 17:12:28 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

I installed the proposed patch, which should fix this bug, without
re-introducing the other bug.

        Stefan

> You lost me.  What do you mean by "active at the same time"?

Both appear in `current-active-maps' in some buffer at some point.
(e.g. one binding in a minor mode, another in a major-mode)

>> so whoever follows your advice will force other people to follow it
>> as well.

> Good advice is like that, yes.

>> The end result is that <backspace> will always be bound and the
>> function-key-map binding will be useless.
> Not if these keys are left at their default bindings, no.

That's only if noone bound anything, in which case noone followed
neither's advice anyway.  Not a very enlightening case.

>> The purpose of the function-key-map binding is to make sure that if
>> you want the same behavior for both, then you only need one binding
>> (the one on DEL).
> Which doesn't work if the mode binds Backspace.

Which mode?  And presumably if a keymap binds Backspace it's
specifically because it wants backspace to behave differently from DEL,
in which case it's fine if function-key-map is not used.

>> > Whatever you do, my rule will always yield more reliable results.
>> And will break more other cases where people have followed the path
>> usually recommended (i.e. "only bind the DEL or TAB event unless you
>> want to distinguish the two").
> But this is exactly what the OP did, and look where it got him.

That's because the binding we used in isearch.el followed your advice
rather than mine ;-)

Subject: 25.0.50; REGRESSION in `isearch-mode-map': <backspace> is not translated to DEL
From: Drew Adams <[email-masked]>
To: [email-masked]
Date: Wed, 29 Apr 2015 22:19:48 -0700 (PDT)
List-Id: <debbugs-submit.debbugs.gnu.org>

This regression was apparently introduced in Emacs 24.4.

(define-key isearch-mode-map (kbd "DEL") 
            (lambda () (interactive) (message "@@@@@@@@@@@@@@@@")))

During Isearch, hit the Backspace key.  `DEL' is not used, so the
message is not seen.  `isearch-mode-map' shows that `DEL' is correctly
bound to the above command, but `<backspace>' is bound to
`isearch-delete-char'.  It is not translated to `DEL', as is the case in
Emacs generally (still), but it instead now has its own explicit binding
in `isearch-mode-map'.

Why?  This is an unexpected (and unnecessary?) obstacle for users.
It is an incompatible change, and I see nothing in NEWS about it.
Was it an oversight or intentional?

In Emacs prior to 24.4, the message is shown, and `isearch-mode-map'
shows that `DEL' is bound to the above command and there is no binding
for `<backspace>'.  Because there is no binding for it, it gets
translated to `DEL' (as is true in Emacs generally, even in 24.4+).

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-20 on LEG570
Bzr revision: 118168 [email-masked]
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'