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

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 30 Apr 2015 05:21:04 UTC

Severity: minor

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Drew Adams <drew.adams <at> oracle.com>
Subject: bug#20466: closed (Re: bug#20466: 25.0.50; REGRESSION in
 `isearch-mode-map': <backspace> is not translated to DEL)
Date: Fri, 01 May 2015 21:13:03 +0000
[Message part 1 (text/plain, inline)]
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 20466 <at> debbugs.gnu.org.

-- 
20466: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20466
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: drew.adams <at> oracle.com, 20466-done <at> debbugs.gnu.org
Subject: Re: bug#20466: 25.0.50;
 REGRESSION in `isearch-mode-map': <backspace> is not translated to DEL
Date: Fri, 01 May 2015 17:12:28 -0400
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 ;-)

[Message part 3 (message/rfc822, inline)]
From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; REGRESSION in `isearch-mode-map': <backspace> is not
 translated to DEL
Date: Wed, 29 Apr 2015 22:19:48 -0700 (PDT)
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 rgm <at> gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'



This bug report was last modified 10 years and 84 days ago.

Previous Next


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