unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: npostavs@users.sourceforge.net
Cc: 24801@debbugs.gnu.org
Subject: bug#24801: 25.1; Reverse regexp search highlighting
Date: Wed, 26 Oct 2016 16:23:26 -0700 (PDT)	[thread overview]
Message-ID: <5537d36d-a365-4a3f-97a3-78c32e86e7ea@default> (raw)
In-Reply-To: <8737jispf7.fsf@users.sourceforge.net>

> `(elisp) Regexp Search', under `re-search-backward' says:...

That has always been the case.  The same node from Emacs 20.7 says
the same thing:

 - Command: re-search-backward REGEXP &optional LIMIT NOERROR REPEAT
     This function searches backward in the current buffer for a string
     of text that is matched by the regular expression REGEXP, leaving
     point at the beginning of the first text found.

     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.  The
     reason 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.

I don't think that description is germain to this bug report, except
insofar as what it describes is _not_ the behavior reported.

This really looks like a bug to me.  But regexp search is so basic
to Emacs, and this has been like this since Emacs 23, so I can only
guess that the change in behavior must have been intentional.  But
if so, why?  What's the advantage/point of such behavior?

In Emacs 23.4, `C-h n', then `C-s search', shows that there were a
zillion changes in Isearch behavior.  But this one is not mentioned
at all.

I have to guess (so far) that this is a bug that was introduced when
implementing one or more of those zillion documented changes.  But
if so, why has no one reported it before?





  reply	other threads:[~2016-10-26 23:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 16:24 bug#24801: 25.1; Reverse regexp search highlighting Drew Adams
2016-10-26 22:42 ` npostavs
2016-10-26 23:23   ` Drew Adams [this message]
2016-10-26 23:36     ` npostavs
2016-10-27  1:51       ` Drew Adams
2016-10-27  2:33   ` Eli Zaretskii

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=5537d36d-a365-4a3f-97a3-78c32e86e7ea@default \
    --to=drew.adams@oracle.com \
    --cc=24801@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /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).