From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#31584: 27.0.50; Document again what match re-search-backward finds Date: Thu, 24 May 2018 21:27:36 -0400 Message-ID: <87fu2gfrsn.fsf@gmail.com> References: <87in7cg2qw.fsf@web.de> <87wovsg27f.fsf@ericabrahamsen.net> <87wovsg0q3.fsf@gmail.com> <87po1kekmi.fsf@web.de> <87o9h4fw2h.fsf@gmail.com> <87in7ceg7z.fsf@web.de> <87lgc8fueq.fsf@gmail.com> <87d0xkee05.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1527211568 18538 195.159.176.226 (25 May 2018 01:26:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 May 2018 01:26:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: Eric Abrahamsen , 31584@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 25 03:26:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fM1UZ-0004h6-QQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 May 2018 03:26:04 +0200 Original-Received: from localhost ([::1]:41373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM1Wf-00063m-5D for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 May 2018 21:28:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM1WX-00063V-Uo for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 21:28:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fM1WU-0007rt-Q4 for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 21:28:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39254) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fM1WU-0007rf-Kt for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 21:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fM1WU-00075i-EE for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 21:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 May 2018 01:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31584 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31584-submit@debbugs.gnu.org id=B31584.152721166527235 (code B ref 31584); Fri, 25 May 2018 01:28:02 +0000 Original-Received: (at 31584) by debbugs.gnu.org; 25 May 2018 01:27:45 +0000 Original-Received: from localhost ([127.0.0.1]:47151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fM1WC-00075C-S5 for submit@debbugs.gnu.org; Thu, 24 May 2018 21:27:45 -0400 Original-Received: from mail-it0-f42.google.com ([209.85.214.42]:33135) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fM1WB-000750-Du for 31584@debbugs.gnu.org; Thu, 24 May 2018 21:27:43 -0400 Original-Received: by mail-it0-f42.google.com with SMTP id e185-v6so18800080ita.0 for <31584@debbugs.gnu.org>; Thu, 24 May 2018 18:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=iTmI1rqS3J3UI53A3WA/bNP/eOqb7SkAL+LqpLhXl9k=; b=omy+Yy7X38Sz/tc6zFnLx6TiWZwpsQ2yVjsocX7es0Nc+B7jtW9pTlsmF8jXu96sr6 4cu4vgWdlkFE2WQL6TLiWd2W3qrJ73DXjdMKIy8SPP5CqVFCSzx0MkwqmFiOr0t7RuCw RRE2CTYFs9XPnHWxlYx6n5JVDVzqsFWCgo8D4003zvQiLJwHUwTaaYDJJ3OxqqmvdqAX gwweprQrYHW5Sbt6NggIieNSm/n6FycMn9s3FFMxl97lAFdUCi0K40KeFYjkc4JiGXxN YaS2dm0a3+cEWYj8Yh6V8fvP+qny7sFt3NcHooVQJmrbpPiCFu+kHqtoTpxi2G2Pu0EU kWeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=iTmI1rqS3J3UI53A3WA/bNP/eOqb7SkAL+LqpLhXl9k=; b=eQtYRQ0CU09pa3BXVkdLVQKthNEDgbVl4GHVqm0IS4DmDm9ZdpSfdjxmaueraISuUr /S7EyxisJ7TbDjK+TdjSLwaiGlTwcw0WF7L6ShjxyG9W9eHWlWUBr0LqcraEbC/GsI8u 8QVRdlDvNPAFifsgqQMkJKU1msbfu8M9p/4tjZ6xhcFDf6b6GLG3lygrzPDW0neyTCXp sO8ClU7nMos2nPNBD0HRNt8E6m5fCMaqJNdG6GHiYtQoZiLAdGbW+PB2wW+tC6RXEh6p 7G/o/V/gPNCPLLrnFKpGnTIVTO0hBPLeP9522KNMrSBuhjYxAKxuvXaWbIFDvTLnsl0r Q1dA== X-Gm-Message-State: ALKqPwdGVrlSVanpeUlIel39jfvLmBeiIhz8Bf9PpbnCf61MwdlzeEMj YWGayx7QTOtpqGPhgE07Z4XZMw== X-Google-Smtp-Source: ADUXVKLQb3s/DFUwjZh5y2VJrxaDCTyveGCpqthI/nlsBecq1EV0KUi5kAnELncyw9OQKCcu3nrtBQ== X-Received: by 2002:a24:14cb:: with SMTP id 194-v6mr216160itg.79.1527211657817; Thu, 24 May 2018 18:27:37 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id v21-v6sm11605758iob.11.2018.05.24.18.27.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 May 2018 18:27:37 -0700 (PDT) In-Reply-To: <87d0xkee05.fsf@web.de> (Michael Heerdegen's message of "Fri, 25 May 2018 03:10:50 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146520 Archived-At: Michael Heerdegen writes: > The anchor is in this paragraph: > > Nonincremental search for a regexp is done with the commands > =E2=80=98re-search-forward=E2=80=99 and =E2=80=98re-search-backward=E2=80= =99. [...] Ah, no, the anchor (which I added as part of the patch) is in the elisp manual, not the emacs manual. <<<<>>>>> -- Command: re-search-backward regexp &optional limit noerror count 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 (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.