GNU bug report logs - #8679
24.0.50; wrong isearch highlighting for mismatch

Previous Next

Package: emacs;

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

Date: Mon, 16 May 2011 20:38:02 UTC

Severity: minor

Found in version 24.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8679 in the body.
You can then email your comments to 8679 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8679; Package emacs. (Mon, 16 May 2011 20:38:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 16 May 2011 20:38:03 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; wrong isearch highlighting for mismatch
Date: Mon, 16 May 2011 13:36:50 -0700
In this case the mismatch highlighting is inaccurate:
 
emacs -Q
 
C-x b *scratch*
 
C-s ZZZZ
 
The entire search string is highlighted as a mismatch, which is correct.
 
M-e M-a e
 
So the edited search string is eZZZZ.
 
C-s
 
The entire search string, `eZZZZ' is highlighted, even though there are
matches for the `e'.
 
Not sure there is an easy fix for this one.  And it's not very
important.  But worth logging for future reference, at least.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-05-10 on 3249CTO
 Windowing system distributor `Microsoft Corp.', version 5.1.2600
 configured using `configure --with-gcc (4.5) --no-opt --cflags
 -Ic:/build/include'
 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8679; Package emacs. (Mon, 16 May 2011 22:00:03 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8679 <at> debbugs.gnu.org
Subject: Re: bug#8679: 24.0.50; wrong isearch highlighting for mismatch
Date: Tue, 17 May 2011 01:57:45 +0400
> Not sure there is an easy fix for this one.  And it's not very
> important.  But worth logging for future reference, at least.

Currently it has exactly the same behavior as you asked in
http://thread.gmane.org/gmane.emacs.devel/74539/focus=74614




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8679; Package emacs. (Mon, 16 May 2011 22:14:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Juri Linkov'" <juri <at> jurta.org>
Cc: 8679 <at> debbugs.gnu.org
Subject: RE: bug#8679: 24.0.50; wrong isearch highlighting for mismatch
Date: Mon, 16 May 2011 15:13:16 -0700
> > Not sure there is an easy fix for this one.  And it's not very
> > important.  But worth logging for future reference, at least.
> 
> Currently it has exactly the same behavior as you asked in
> http://thread.gmane.org/gmane.emacs.devel/74539/focus=74614

Not as I _asked_, but as I _stated_ was probably "as good as it gets".  To which
I added, "but I'm open, if someone has a better idea".  I said "I don't know how
to fix that."

Actually, I forgot about that bug thread.  ;-)

This time I'm saying something similar, but the use case is different.  What I
said before is still true, but this report is about the behavior after `M-e', so
the consideration about a buffer change doesn't really apply.

IOW, both observations are relevant, I think.  For this use case (same buffer
where `M-e' was used), it might be good if after editing the matching part were
not highlighted as a mismatch.  Again, dunno whether that would be an easy fix -
I doubt it, but maybe you have an idea.

I have no good idea about this.  Do you?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8679; Package emacs. (Sun, 09 Feb 2014 06:46:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8679 <at> debbugs.gnu.org
Subject: Re: bug#8679: 24.0.50; wrong isearch highlighting for mismatch
Date: Sat, 08 Feb 2014 22:43:44 -0800
"Drew Adams" <drew.adams <at> oracle.com> writes:

> In this case the mismatch highlighting is inaccurate:
>
> emacs -Q
>
> C-x b *scratch*
>
> C-s ZZZZ
>
> The entire search string is highlighted as a mismatch, which is correct.
>
> M-e M-a e
>
> So the edited search string is eZZZZ.
>
> C-s
>
> The entire search string, `eZZZZ' is highlighted, even though there are
> matches for the `e'.

Seems to work for me.  Closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug closed, send any further explanations to 8679 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 09 Feb 2014 06:46:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8679; Package emacs. (Tue, 11 Feb 2014 15:24:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 8679 <at> debbugs.gnu.org
Subject: RE: bug#8679: 24.0.50; wrong isearch highlighting for mismatch
Date: Tue, 11 Feb 2014 07:23:26 -0800 (PST)
> > In this case the mismatch highlighting is inaccurate:
> >
> > emacs -Q
> > C-x b *scratch*
> > C-s ZZZZ
> >
> > The entire search string is highlighted as a mismatch, which is
> > correct.
> >
> > M-e M-a e
> >
> > So the edited search string is eZZZZ.
> >
> > C-s
> >
> > The entire search string, `eZZZZ' is highlighted, even though
> > there are matches for the `e'.
> 
> Seems to work for me.  Closing.

Seems to work for you apparently means little, I'm afraid.

Still a bug on Windows, at least.  The only difference in the
recipe now is that you need not use M-a.  The point is that
after inserting `e' at the front of the search string, `C-s'
still highlights the whole search string, `eZZZZ', instead of
highlighting only the mismatch portion, `ZZZZ'.

Should be reopened and fixed.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8679; Package emacs. (Tue, 11 Feb 2014 16:24:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 8679 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: Re: bug#8679: 24.0.50; wrong isearch highlighting for mismatch
Date: Tue, 11 Feb 2014 18:23:34 +0200
> Date: Tue, 11 Feb 2014 07:23:26 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> Cc: 8679 <at> debbugs.gnu.org
> 
> > > In this case the mismatch highlighting is inaccurate:
> > >
> > > emacs -Q
> > > C-x b *scratch*
> > > C-s ZZZZ
> > >
> > > The entire search string is highlighted as a mismatch, which is
> > > correct.
> > >
> > > M-e M-a e
> > >
> > > So the edited search string is eZZZZ.
> > >
> > > C-s
> > >
> > > The entire search string, `eZZZZ' is highlighted, even though
> > > there are matches for the `e'.
> > 
> > Seems to work for me.  Closing.
> 
> Seems to work for you apparently means little, I'm afraid.
> 
> Still a bug on Windows, at least.  The only difference in the
> recipe now is that you need not use M-a.  The point is that
> after inserting `e' at the front of the search string, `C-s'
> still highlights the whole search string, `eZZZZ', instead of
> highlighting only the mismatch portion, `ZZZZ'.

Why is that a bug?  What do you get with this simplified recipe?

  emacs -Q
  C-s eZZZZ

When you type 'e', all the 'e's in the buffer are highlighted, but the
'e' in the echo area is highlighted in pink.  As soon as you type the
first 'Z', the highlight in the buffer goes away, and the whole "eZ"
in the echo area is colored in pink.  And that is what I would expect.

What you seem to expect happens when the search wraps around, but no
such wrap-around happens in your recipe.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8679; Package emacs. (Tue, 11 Feb 2014 16:59:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 8679 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: RE: bug#8679: 24.0.50; wrong isearch highlighting for mismatch
Date: Tue, 11 Feb 2014 08:58:12 -0800 (PST)
> Why is that a bug?  What do you get with this simplified recipe?
> 
>   emacs -Q
>   C-s eZZZZ
> 
> When you type 'e', all the 'e's in the buffer are highlighted, but
> the 'e' in the echo area is highlighted in pink.

It depends where you start the search.  If you start with point
at eob then what you say is true.

If you start the search at bob then the `e' is not pink when you
just type `e'.  When you then type `ZZZZ', so your search string is
now `eZZZZ', the buffer highlighting disappears (there are no
matches).

The mismatched portion of your search string, which is the `ZZZZ'
portion, is highlighted pink, to show that it is a mismatch.
This is the correct (intended) behavior.

> As soon as you type the first 'Z', the highlight in the buffer goes
> away, and the whole "eZ" in the echo area is colored in pink.

See above.

> And that is what I would expect.

It might be all we can reasonably expect; I don't know.  Probably
Juri can answer that.  And yes, in that case this is probably
also the answer to the bug fix request: it might not be easy to
fix.

But the intended behavior of the pink highlighting is to highlight
the mismatch portion of the search string.  What this means is that
there is a bug - the intention is not to highlight also the matched
portion.  It may not be a bug that we can fix, but it is a bug.

> What you seem to expect happens when the search wraps around, but no
> such wrap-around happens in your recipe.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#8679; Package emacs. (Tue, 11 Feb 2014 20:13:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 8679 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, larsi <at> gnus.org
Subject: Re: bug#8679: 24.0.50; wrong isearch highlighting for mismatch
Date: Tue, 11 Feb 2014 22:11:03 +0200
> It might be all we can reasonably expect; I don't know.  Probably
> Juri can answer that.  And yes, in that case this is probably
> also the answer to the bug fix request: it might not be easy to
> fix.

No one proposed a better idea since this was discussed last time
in bug#14729.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 12 Mar 2014 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 106 days ago.

Previous Next


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