From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#31584: 27.0.50; Document again what match re-search-backward finds Date: Thu, 24 May 2018 14:42:44 -0700 Message-ID: <87wovsg27f.fsf@ericabrahamsen.net> References: <87in7cg2qw.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1527198246 24850 195.159.176.226 (24 May 2018 21:44:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 May 2018 21:44:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 31584@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 24 23:44: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 1fLy1h-0006ME-Jg for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 May 2018 23:44:01 +0200 Original-Received: from localhost ([::1]:40773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLy3o-00025X-K8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 May 2018 17:46:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLy3h-00025F-Rg for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:46:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLy3e-0008Ac-Pw for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:46:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39069) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLy3e-0008AX-MQ for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fLy3e-0004dn-Fz for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:46:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87in7cg2qw.fsf@web.de> Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 May 2018 21:46: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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152719835517826 (code B ref -1); Thu, 24 May 2018 21:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 May 2018 21:45:55 +0000 Original-Received: from localhost ([127.0.0.1]:46966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLy3X-0004dR-2l for submit@debbugs.gnu.org; Thu, 24 May 2018 17:45:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLy3V-0004dE-DW for submit@debbugs.gnu.org; Thu, 24 May 2018 17:45:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLy3P-000872-CJ for submit@debbugs.gnu.org; Thu, 24 May 2018 17:45:48 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:47992) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fLy3P-00086x-94 for submit@debbugs.gnu.org; Thu, 24 May 2018 17:45:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48727) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLy3O-00024w-1A for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:45:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLy3L-000867-1J for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:45:46 -0400 Original-Received: from [195.159.176.226] (port=35626 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLy3K-00085d-PQ for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 17:45:42 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fLy19-0005nD-Mt for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 23:43:27 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 32 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:k6JT9wMEF1diyr+6jUx0tqfXRf0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:146499 Archived-At: Michael Heidegger writes: > Hello, > > a user asked in emacs-help why > > (re-search-backward "a*") > > at the end of a line consisting only "a"s didn't move point. With > today's documentation, that question can't be answered. > > Some time ago, we had this sentence in the docstring: > > The match found is the one starting last in the buffer > and yet ending before the origin of the search. > > but it has been removed. I think we need to say something like that, > otherwise the semantics of backward re search is unclear. I've been bitten by this before. I'm sure the sentence you cite is correct, but I would suggest something more explicit about backwards searches. The most useful thing I could have read when I was wondering why this didn't work would be something like: "re-search-backward always behaves "non-greedily", i.e., it will find the shortest match before point". That might not be technically correct, but those are the terms that would have made sense to me: in particular, the "*" token is supposed to be "greedy", so why isn't it greedy backwards? This doesn't explain why it isn't, but it would have explicitly told me that it wouldn't be. Eric