From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#23937: 25.0.95; Search functions doc fixes/improvements Date: Tue, 12 Jul 2016 17:14:19 +0200 Message-ID: <877fcqanxw.fsf@rub.de> References: <87d1ml8ic1.fsf@gmx.net> <83lh18cib0.fsf@gnu.org> <871t2z262g.fsf@gmx.net> <834m7vcusi.fsf@gnu.org> <87bn239h5n.fsf@rub.de> <83mvlnatob.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468336536 12951 80.91.229.3 (12 Jul 2016 15:15:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Jul 2016 15:15:36 +0000 (UTC) Cc: 23937@debbugs.gnu.org, Stephen Berman To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 12 17:15:25 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 1bMzPA-00085S-Ak for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Jul 2016 17:15:24 +0200 Original-Received: from localhost ([::1]:41191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMzP9-0000rN-CN for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Jul 2016 11:15:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMzOt-0000h9-NR for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 11:15:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMzOo-0002ML-R2 for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 11:15:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMzOo-0002MG-N8 for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 11:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMzOo-00068c-H7 for bug-gnu-emacs@gnu.org; Tue, 12 Jul 2016 11:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jul 2016 15:15: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.146833646923533 (code B ref 23937); Tue, 12 Jul 2016 15:15:02 +0000 Original-Received: (at 23937) by debbugs.gnu.org; 12 Jul 2016 15:14:29 +0000 Original-Received: from localhost ([127.0.0.1]:48491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMzOH-00067V-BO for submit@debbugs.gnu.org; Tue, 12 Jul 2016 11:14:29 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:64903) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMzOF-00067I-PA for 23937@debbugs.gnu.org; Tue, 12 Jul 2016 11:14:28 -0400 Original-Received: from rosalinde ([89.245.68.108]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LdYdG-1axJcc3dju-00io77; Tue, 12 Jul 2016 17:14:21 +0200 In-Reply-To: <83mvlnatob.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 12 Jul 2016 16:10:28 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) X-Provags-ID: V03:K0:hqkboHPxicm7L8UjqgrasAjMc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u.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:120918 Archived-At: On Tue, 12 Jul 2016 16:10:28 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> Cc: 23937@debbugs.gnu.org >> Date: Tue, 12 Jul 2016 14:26:12 +0200 >> >> Set point to the beginning of the occurrence found, and return point. >> An optional second argument bounds the search; it is a buffer position. >> The match found must start at or after that position. A value of nil >> means search to the beginning of the accessible portion of the buffer. >> Optional third argument, if t, means if fail just return nil (no error). >> If not nil and not t, move to limit of search and return nil. >> Optional fourth argument COUNT, if a positive number, means to search >> for COUNT successive occurrences. If COUNT is negative, search >> forward, instead of backward, for -COUNT occurrences. A value of >> nil means the same as 1. >> The match found is the COUNTth to last one (or last, if COUNT is 1 or >> nil) in the buffer located entirely before the origin of the search. > > LGTM, thanks. > >> If you are ok with this, should I add these two lines to all >> *search-backward and (suitably adapted) *search-forward functions? (The >> two lines are currently only in {re,posix}-search-backward.) > > It's better for all those doc strings to be consistent, yes. Oh, dear. I made all the changes and was ready to commit them, when I realized that those final two lines are only valid for positive COUNT. Spelling it out for negative COUNT seems like overkill; how about this: With COUNT positive, the match found is the COUNTth to last one (or last, if COUNT is 1 or nil) in the buffer located entirely before the origin of the search; correspondingly with COUNT negative. I hope this is the last point of this issue that needs clarifying. Steve Berman