Subject: bug#222: closed (Re: bug#222: isearch-repeat-forward: wrong overlay after failure)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 09 Jul 2011 17:40:03 +0000

Your bug report

#222: isearch-repeat-forward: wrong overlay after failure

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].

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

Subject: Re: bug#222: isearch-repeat-forward: wrong overlay after failure
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Sat, 09 Jul 2011 13:39:21 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

I don't see a need to keep open this particular report, which was marked
"wontfix" some time ago.

Stefan Monnier wrote:

> It's a very general problem: many keybindings used in major-mode or
> minor modes only work properly if the corresponding mode is
> currently active.
>
> Of course, many work perfectly in other contexts too, and yet many more
> work 98% OK as well.
>
> I don't think it makes sense to document each and every function
> describing whether it's expected to work in other modes or not.

>From [email-masked] Sun May 11 08:53:45 2008
From: David Reitter <[email-masked]>
To: [email-masked]
Date: Sun, 11 May 2008 16:52:54 +0100
Cc: 
Subject: isearch-repeat-forward: wrong overlay after failure
Sender: emacs-devel-bounces+monnier=[email-masked]

isearch wrongly highlights a part of a buffer when `isearch-forward'  
fails.

To reproduce, create buffer A, containing just the following:

123456

Also, create buffer B, containing

12346

Now switch to buffer A, move point to the beginning, and do C-s 5.   
The `5' will be highlighted.
Then switch to buffer B and move point to the beginning.  (You can  
show the buffers in two windows, or just switch between them: it  
doesn't matter.)
Then do M-x isearch-repeat-forward.  (Do NOT do C-s C-s.)

You will find that `6' is highlighted, and a (correct) message is  
displayed that the search failed.  (It appears that the text at a  
position equivalent to where the last match was in the previous buffer  
is highlighted.)

The overlay in buffer B shouldn't be there.

This issue has been around for a long time, and I suspect it was never  
noticed because many people just do C-s C-s rather than binding a key  
to `isearch-repeat-forward'.

In GNU Emacs 22.2.50.2 (i386-apple-darwin9.2.2, Carbon Version 1.6.0)
  of 2008-04-26 on plume.sr.unh.edu
Windowing system distributor `Apple Inc.', version 10.5.2
configured using `configure  '--without-x' '--prefix=/usr/local''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: nil
   locale-coding-system: iso-8859-1
   default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
   tooltip-mode: t
   tool-bar-mode: t
   mouse-wheel-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   unify-8859-on-encoding-mode: t
   utf-translate-cjk-mode: t
   auto-compression-mode: t
   line-number-mode: t

Recent input:
C-x b <return> <up> <up> <up> <up> <up> C-k C-k C-k
C-k C-k C-k 1 <return> 2 <return> 3 <return> 4 <return>
5 <return> 6 5 <return> <backspace> <backspace> <return>
<escape> x v i s i t - n e <tab> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> c r e a t e - b <tab> u <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> v i s i <tab> C-x
C-f T e m p SPC t 1 <backspace> <backspace> <backspace>
/ t 2 <return> 1 <return> 2 <return> 3 <return> 4 <return>
6 <return> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> C-x b <return> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> C-s 5 C-x b <return>
<escape> x i s e a r c h - r e <tab> <tab> p e <tab>
f o r <tab> <return> <menu-bar> <help-menu> <send-
emacs-bug-report>

Recent messages:
Making completion list...
Loading help-mode...done
Quit
(New file)
Mark saved where search started
Making completion list...
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
byte-code: Text is read-only [2 times]