GNU bug report logs -
#24801
25.1; Reverse regexp search highlighting
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Wed, 26 Oct 2016 16:25:02 UTC
Severity: minor
Tags: notabug
Merged with 9681,
11025
Found in versions 23.1, 25.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #20 received at 24801 <at> debbugs.gnu.org (full text, mbox):
> From: npostavs <at> users.sourceforge.net
> Date: Wed, 26 Oct 2016 18:42:20 -0400
> Cc: 24801 <at> debbugs.gnu.org
>
> > I see this behavior in Emacs 23 and later, but not in Emacs 22 and
> > before, so I'm guessing this change is maybe intentional. But it's not
> > clear to me why it would be.
>
> `(elisp) Regexp Search', under `re-search-backward' says:
>
> This function is analogous to `re-search-forward', but they are not
> simple mirror images. `re-search-forward' finds the match whose
> beginning is as close as possible to the starting point. If
> `re-search-backward' were a perfect mirror image, it would find the
> match whose end is as close as possible. However, in fact it
> finds the match whose beginning is as close as possible (and yet
> ends before the starting point). The reason for this is that
> matching a regular expression at a given spot always works from
> beginning to end, and starts at a specified beginning position.
>
> A true mirror-image of `re-search-forward' would require a special
> feature for matching regular expressions from end to beginning.
> It's not worth the trouble of implementing that.
>
> And the texi source says the same at tag emacs-22.1; I've only built
> Emacs back to 23.4 though, so I can't test it.
I see the same behavior in all versions, including 22.x and 21.4.
This bug report was last modified 8 years and 208 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.