GNU bug report logs - #20904
If global-set-key is used to rebind <tab>, searching for a TAB character inserts a TAB

Previous Next

Package: emacs;

Reported by: Fran Litterio <flitterio <at> gmail.com>

Date: Fri, 26 Jun 2015 16:50:03 UTC

Severity: normal

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #13 received at control <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Fran Litterio <flitterio <at> gmail.com>
Cc: 20904 <at> debbugs.gnu.org
Subject: Re: bug#20904: If global-set-key is used to rebind <tab>,
 searching for a TAB character inserts a TAB
Date: Fri, 26 Jun 2015 15:42:24 -0400
tags 20904 notabug
thanks

>> (global-set-key (kbd "<tab>") 'tab-to-tab-stop)
> I have found that changing the above form to:
>   (global-set-key (kbd "TAB") 'tab-to-tab-stop)
> avoids the problem (i.e., it allows the global binding of TAB to be
> changed to tab-to-tab-stop and allows searching for a TAB character).

That's right.
Most of Emacs (including Isearch) gives no special meaning to `tab', and
instead this key is typically remapped to TAB.
So unless you care about the difference between the two, you should
always bind the TAB and not `tab'.


        Stefan




This bug report was last modified 9 years and 327 days ago.

Previous Next


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