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 15:10:26 -0700 Message-ID: <87sh6gg0x9.fsf@ericabrahamsen.net> References: <87in7cg2qw.fsf@web.de> <87wovsg27f.fsf@ericabrahamsen.net> <87wovsemvn.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1527199925 11086 195.159.176.226 (24 May 2018 22:12:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 24 May 2018 22:12:05 +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 Fri May 25 00:12:01 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 1fLySm-0002m4-Qn for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 May 2018 00:12:00 +0200 Original-Received: from localhost ([::1]:40868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLyUt-0000JY-V4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 May 2018 18:14:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLyUo-0000JG-06 for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 18:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLyUj-0004nQ-Tb for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 18:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39116) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLyUj-0004mt-Qj for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 18:14:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fLyUj-0007FV-M3 for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 18:14:01 -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 22:14: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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152720002327832 (code B ref -1); Thu, 24 May 2018 22:14:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 May 2018 22:13:43 +0000 Original-Received: from localhost ([127.0.0.1]:47013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLyUR-0007Eq-5q for submit@debbugs.gnu.org; Thu, 24 May 2018 18:13:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fLyUP-0007Ec-HA for submit@debbugs.gnu.org; Thu, 24 May 2018 18:13:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLyUJ-0004Wr-6n for submit@debbugs.gnu.org; Thu, 24 May 2018 18:13:36 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34715) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fLyUJ-0004Wh-3L for submit@debbugs.gnu.org; Thu, 24 May 2018 18:13:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fLyUI-0000Ig-11 for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 18:13:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fLyUE-0004Sx-18 for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 18:13:33 -0400 Original-Received: from [195.159.176.226] (port=46870 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fLyUD-0004SG-Pj for bug-gnu-emacs@gnu.org; Thu, 24 May 2018 18:13:29 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fLyS0-0001xE-Gg for bug-gnu-emacs@gnu.org; Fri, 25 May 2018 00:11:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 39 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:otohRnm2brrpHz9btJ9b6wdpnrA= 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:146506 Archived-At: Michael Heerdegen writes: > Eric Abrahamsen writes: > >> Michael Heidegger writes: > > FWIW, my last name is "Heerdegen" AFAIK. It's not too late to change! I blame `flyspell-auto-correct-previous-word' for this stuff the same way that other people blame autocorrect on iOS. Apparently I randomly hit "C-;" a lot. >> > The match found is the one starting last in the buffer >> > and yet ending before the origin of the search. > >> 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. > > Without thinking long about it, I guess the above definition, and greedy > operators behaving non-greedy for backwards search, could be equivalent, > more or less. I agree they're equivalent, but it would take me longer to think about it, particularly when I'm trying to make a regexp match and am already annoyed. But it was just a suggestion -- so long as something gets in there, I don't mind. Eric