unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Dani Moncayo'" <dmoncayo@gmail.com>, <8861@debbugs.gnu.org>
Subject: bug#8861: 24.0.50; Isearch: Repeating the last search
Date: Tue, 14 Jun 2011 06:11:37 -0700	[thread overview]
Message-ID: <19F65DC210FE45AC84732F8E76A374AA@us.oracle.com> (raw)
In-Reply-To: <BANLkTikW39kVrDtFQUmE3H9TF9DzJo8Erg@mail.gmail.com>

Juri or someone else might give a better or different explanation, but here's
mine, FWIW.

This behavior is not very clear or intuitive, but (a) there is not much that can
be done about it, and (b) it can be argued that it is not really a bug.

The highlighting could perhaps be turned off completely in this case, since in
does not (cannot) correctly indicate only the part of the search string that is
incorrect.  (But turning it off completely gives the opposite message that there
is no search failure.)

The highlighting as it appears is at least consistent with the rest of Isearch
behavior in this context.  The search string was not sought incrementally; that
is, no incremental search built it up.  So there is no notion of the increment
of it that failed.  If you hit `DEL' (Backspace) at that point, it is not just
the final `e' that is removed, but all of the search string.

IOW, you cannot return to a successful search prefix and return in the buffer to
a successful search hit position.  In this context, the entire search string
_is_ the increment: it is sought as a whole.  There is no previous successful
state to return to, and that principle extends to the success/failure match
highlighting.

I know and agree that this might not be what a user expects, especially since
this highlighting is something new, but it is consistent.  The highlighting
here, like all the rest of the searching, is not incremental at that point.  The
search string as a whole is tested and either succeeds (as a whole) or fails (as
a whole).  The highlighting reflects that.

And it can only reflect that.  Perhaps we could remove it, but I'm not sure that
would be better.  In that case the "bug" or unituitive behavior would be that
search fails but the search string is not highlighted at all to show failure.






  reply	other threads:[~2011-06-14 13:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 12:32 bug#8861: 24.0.50; Isearch: Repeating the last search Dani Moncayo
2011-06-14 13:11 ` Drew Adams [this message]
2011-06-14 13:52   ` Dani Moncayo
2011-06-14 15:20     ` Drew Adams
2011-06-14 17:33     ` Juri Linkov
2011-06-14 18:41       ` Dani Moncayo
2011-06-15  3:11         ` Stefan Monnier
2022-01-27 18:02       ` Lars Ingebrigtsen
2022-01-27 18:15         ` Juri Linkov
2022-01-27 18:58           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19F65DC210FE45AC84732F8E76A374AA@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=8861@debbugs.gnu.org \
    --cc=dmoncayo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).