From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23937: 25.0.95; Search functions doc fixes/improvements Date: Mon, 11 Jul 2016 18:20:51 +0300 Message-ID: <83lh18cib0.fsf@gnu.org> References: <87d1ml8ic1.fsf@gmx.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468250565 7387 80.91.229.3 (11 Jul 2016 15:22:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2016 15:22:45 +0000 (UTC) Cc: 23937@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 11 17:22:34 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bMd2X-0007XP-Q5 for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jul 2016 17:22:34 +0200 Original-Received: from localhost ([::1]:34278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMd2X-0000Em-6A for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jul 2016 11:22:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMd28-0008TG-1a for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2016 11:22:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMd22-0000UX-Eb for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2016 11:22:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMd22-0000UN-BS for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2016 11:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMd22-0004mK-5R for bug-gnu-emacs@gnu.org; Mon, 11 Jul 2016 11:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jul 2016 15:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23937 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23937-submit@debbugs.gnu.org id=B23937.146825048418314 (code B ref 23937); Mon, 11 Jul 2016 15:22:02 +0000 Original-Received: (at 23937) by debbugs.gnu.org; 11 Jul 2016 15:21:24 +0000 Original-Received: from localhost ([127.0.0.1]:46998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMd1P-0004lK-Mi for submit@debbugs.gnu.org; Mon, 11 Jul 2016 11:21:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMd1O-0004l8-E6 for 23937@debbugs.gnu.org; Mon, 11 Jul 2016 11:21:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMd1F-0000K9-Az for 23937@debbugs.gnu.org; Mon, 11 Jul 2016 11:21:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMd1F-0000Jr-6x; Mon, 11 Jul 2016 11:21:13 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3924 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bMd1D-00065j-JC; Mon, 11 Jul 2016 11:21:12 -0400 In-reply-to: <87d1ml8ic1.fsf@gmx.net> (message from Stephen Berman on Sun, 10 Jul 2016 20:21:34 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:120854 Archived-At: > From: Stephen Berman > Date: Sun, 10 Jul 2016 20:21:34 +0200 > > In GNU Emacs 25.0.95.9 (x86_64-suse-linux-gnu, GTK+ Version 3.14.15) > of 2016-07-10 built on rosalinde > Repository revision: 4069b716ad3422f2d7f595699220c39297427387 > > Bug#10507 was about missing documentation for the fact that the fourth > argument of search-{for,back}ward can be a negative number, reversing > the search direction. This lack was fixed in commit acc28cb, but that > commit didn't correspondingly augment the doc of the other search > functions (word-search-*, re-search-*, posix-search-*), which have the > same behavior. (But no one has documented what happens if COUNT is zero... ;-) > The patch below does this. In addition, the > documentation in the Lisp reference uses the word "repeat" instead of > "count" for that argument, and says the search is repeated N times, > where N is the argument's value; but strictly speaking, it's repeated > N-1 times. It may be clear what's intended, but there's no need for the > manual to differ from (and be strictly less accurate than) the doc > strings on this point, so the patch changes the manual accordingly. > Finally, the patch also adds the information about the nil value of the > bound/limit argument to those doc strings/manual entries where it's > missing. In short the patch makes the doc of all these functions more > uniform. Thanks. I have some minor comments. > +If @var{count} is a positive number @var{n}, the search is done > +@var{n} times; each repetition starts at the end of the previous ^^^^^^^^^^ With the change in the name of the argument, there's no more "repetitions". Suggest to use "successive search" instead. > +If @var{count} is a positive number @var{n}, the search is done > +@var{n} times; each repetition starts at the end of the previous ^^^^^^^^^^ Likewise. > +The match found must not extend before that position. A value of nil is > + equivalent to (point-min). I find references to point-min and point-max in doc strings not the best style. I think saying "the search is unlimited" or "defaults to the beginning of the buffer's accessible region" is more user-friendly. Btw, since this is search backwards, the "extend" part might be confusing; perhaps it is better to say "match must not begin before that position" instead? > @@ -2247,14 +2252,15 @@ DEFUN ("posix-search-backward", Fposix_search_backward, Sposix_search_backward, > "sPosix search backward: ", > doc: /* Search backward from point for match for regular expression REGEXP. > Find the longest match in accord with Posix regular expression rules. > -Set point to the beginning of the match, and return point. > -The match found is the one starting last in the buffer > -and yet ending before the origin of the search. > +Set point to the beginning of the occurrence found, and return point. The 2nd and 3rd lines you removed seem to provide valuable information which is now gone, no? With those taken care of, LGTM, thanks.