[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: How to backspace in isearch-forward-regexp
From: |
KARR, DAVID (ATTCINW) |
Subject: |
RE: How to backspace in isearch-forward-regexp |
Date: |
Wed, 15 Jul 2009 10:20:20 -0700 |
> -----Original Message-----
> From: help-gnu-emacs-bounces+dk068x=att.com@gnu.org [mailto:help-gnu-
> emacs-bounces+dk068x=att.com@gnu.org] On Behalf Of Bernardo
> Sent: Wednesday, July 15, 2009 3:26 AM
> To: help-gnu-emacs@gnu.org
> Subject: Re: How to backspace in isearch-forward-regexp
>
>
>
> > (I apologize if this is a duplicate post. I tried using the email
> > gateway, but it didn't seem to work, or it takes too long.)
> >
> > After installing GNU Emacs on some new boxes recently, I finally
> > realized one thing that is behaving differently than what I'm used
> to.
> >
> > When I'm using isearch-forward-regexp, I can type letter by letter,
> > and it will update the first match found. I used to be able to hit
> > backspace while typing to remove the last character entered in the
> > search string, in case I made a mistake entering the string.
> >
> > Now, when I hit backspace, it exits isearch-forward-regexp and sends
> > the backspace directly to the buffer I was searching in, usually
> > deleting the previous character at the end of the last match.
> >
> > I have a feeling this must have something to do with the binding of
> > the backspace key in Cygwin.
> >
> > I'm using Emacs 23.0.92.1 on Cygwin 1.5.
> >
>
> does it happen when you start Emacs with -Q command line option?
> (it's not happening here but i'm not running the Cygwin version)
>
> in the meantime something like this:
> (define-key isearch-mode-map [backspace] 'isearch-delete-char)
>
> in your init file (.emacs) could provide a relief
Yes, it works when I start with "-Q", and the "define-key" also fixes
it. From that information, I would conclude that the following line,
which I added to get backspace to work normally in text to delete the
previous char, is likely what is causing this:
(global-set-key [backspace] 'delete-backward-char)
I've now added that "define-key" line after this one, and now backspace
works properly in both normal editing, and in isearch.