From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#31584: 27.0.50; Document again what match re-search-backward finds Date: Thu, 24 May 2018 17:28:54 -0700 (PDT) Message-ID: <876a63cb-5e6d-4203-9284-b17e870c484c@default> References: <87in7cg2qw.fsf@web.de> <87wovsg27f.fsf@ericabrahamsen.net> <87wovsg0q3.fsf@gmail.com> 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 1527208086 14105 195.159.176.226 (25 May 2018 00:28:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 25 May 2018 00:28:06 +0000 (UTC) Cc: 31584@debbugs.gnu.org To: Noam Postavsky , Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 25 02:28:02 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 1fM0aP-0003X7-QW for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 May 2018 02:28:01 +0200 Original-Received: from localhost ([::1]:41222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM0cW-0000oI-LX for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 May 2018 20:30:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM0cQ-0000mc-Co for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 20:30:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fM0cM-00085Y-D8 for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 20:30:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39198) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fM0cM-00085L-A7 for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 20:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fM0cM-0001si-2L for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 20:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 May 2018 00:30:01 +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.15272081497147 (code B ref 31584); Fri, 25 May 2018 00:30:01 +0000 Original-Received: (at 31584) by debbugs.gnu.org; 25 May 2018 00:29:09 +0000 Original-Received: from localhost ([127.0.0.1]:47095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fM0bU-0001rC-Tx for submit@debbugs.gnu.org; Thu, 24 May 2018 20:29:09 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:47098) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fM0bT-0001qp-0G for 31584@debbugs.gnu.org; Thu, 24 May 2018 20:29:07 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4P0Q5XQ051514; Fri, 25 May 2018 00:29:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=6UPhwIdLsh1RuT+ZshcQgRaN/zwehtg9sbmPJxg9MJY=; b=OxNybOJ36NrBLSYrTMpLvt9+031yauZsC3rjeFokW1cNiw2QzTGMldnfKPhD5djJGGXC pYCoEEB3ur/Y1Ppp6WYgnxK7D4L6Oyyf1cISUIvB/B/qU2SEOYvisK8lWzVTXmqxN9qn ByEnAPOLFQ+/kGy8ea2dIA2PeqEqzGHOwiiuqUceajMP5jb1vEdiYZ9F7Yyl/JLc1BqP WJLIkXLRwm4+6qlznGcnn2Kkq1bETMDTEyfvW12h3azB392BhuB081yWOlzWAb+OImTe bBbxTX/dqNQNU6+GByhkKp7i+CN+a4ap9efu4hPjS9Tff6i+nrBNGiK83RISM84I8Jji lQ== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2j62sw955c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 May 2018 00:29:00 +0000 Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4P0SxEi015205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 May 2018 00:28:59 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w4P0SxVR000593; Fri, 25 May 2018 00:28:59 GMT In-Reply-To: <87wovsg0q3.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4690.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8903 signatures=668700 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=989 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805250003 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:146514 Archived-At: > It is greedy: > (with-temp-buffer > (insert "xxxxyyyy") > (and (re-search-backward "x+y*" nil t) (match-string 0))) ;=3D> "xyyyy" >=20 > Non-greedy wouldn't match any "y"s. It's a bit tricky to explain both > correctly and clearly... Maybe it would help to say that the pattern is always matched in a forward = direction, even when it matches text that is before point. The pattern itself is not read backward (you don't write +x*y for the reverse search of x+y*), and it doesn't match backward.