From unknown Mon Jun 23 14:58:53 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#1299 <1299@debbugs.gnu.org> To: bug#1299 <1299@debbugs.gnu.org> Subject: Status: lispref - searching.texi: Updating of looking-back arguments and return values in the example Reply-To: bug#1299 <1299@debbugs.gnu.org> Date: Mon, 23 Jun 2025 21:58:53 +0000 retitle 1299 lispref - searching.texi: Updating of looking-back arguments a= nd return values in the example reassign 1299 emacs submitter 1299 Seweryn Kokot severity 1299 normal thanks From sewkokot@gmail.com Sun Nov 2 11:03:17 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Nov 2008 19:03:17 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA2J3EOj030591 for ; Sun, 2 Nov 2008 11:03:15 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwiED-0000V7-Nl for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2008 14:03:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwiEB-0000Uf-5X for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2008 14:03:13 -0500 Received: from [199.232.76.173] (port=46952 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwiEB-0000Ub-2g for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2008 14:03:11 -0500 Received: from fg-out-1718.google.com ([72.14.220.158]:32197) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KwiEA-0005L4-DX for bug-gnu-emacs@gnu.org; Sun, 02 Nov 2008 14:03:10 -0500 Received: by fg-out-1718.google.com with SMTP id l26so2057177fgb.30 for ; Sun, 02 Nov 2008 11:03:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:to:subject:from :x-operating-system:date:message-id:user-agent:mime-version :content-type; bh=x+EDbMjw8csf3fUn4y4XmMGRdVimpgd/92T+NUZjzRg=; b=w8H7JK6f6oByOtoAoNXSjqXlcGunNxjYk2qCcxzi6twbyKItmBpwaFM2AMp5jvuWei kITNPBBLuCRCdXIxWEVCNuHqKb9+2UliILx1sfV8T7TiZ8eWaxsPfg6skHolAUjEa1Ua uQzZ5iezM2RNBqUdWV27zqpDn93kTKK9NfOTA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=to:subject:from:x-operating-system:date:message-id:user-agent :mime-version:content-type; b=WaFNHlyLEAz4ArA1RUIGlno33ifX2qdMKnBPvYwD1vvbdG1wwMCF26UaJnYJckYs3/ Ast2nAV+RBEwbnRjlBf27NBCyW8SRSYbZZaPbUKRmCH9mRWUTqMYWxCF0nXhNLFydCM4 VIsvcnPucs/nysRArSn/ZW7MSYmgrYEDZlIJw= Received: by 10.86.89.1 with SMTP id m1mr204976fgb.35.1225652588285; Sun, 02 Nov 2008 11:03:08 -0800 (PST) Received: from localhost.localdomain (nat-warynskiego.po.opole.pl [217.173.199.132]) by mx.google.com with ESMTPS id e11sm4152810fga.9.2008.11.02.11.03.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 02 Nov 2008 11:03:07 -0800 (PST) To: bug-gnu-emacs@gnu.org Subject: lispref - searching.texi: Updating of looking-back arguments and return values in the example From: Seweryn Kokot X-Operating-System: Debian GNU/Linux Date: Sun, 02 Nov 2008 20:06:29 +0100 Message-ID: <87iqr6hrre.fsf@poczta.po.opole.pl> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) --=-=-= Please describe exactly what actions triggered the bug and the precise symptoms of the bug: See the diff attached. Note that I copied the explanation for greedy argument of `looking-back' function. Because I'm not a native speaker so probably this paragraph requires some rephrasing. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=searching.diff diff -ud /home/sewi/emacs_cvs/emacs/doc/lispref/searching.texi /home/sewi/emacs_cvs/emacs/doc/lispref/searching_cor.texi --- /home/sewi/zrodla/elisp_files/emacs_cvs/emacs/doc/lispref/searching.texi 2008-11-02 19:39:21.000000000 +0100 +++ /home/sewi/zrodla/elisp_files/emacs_cvs/emacs/doc/lispref/searching_cor.texi 2008-11-02 19:54:10.000000000 +0100 @@ -1094,7 +1094,7 @@ @end example @end defun -@defun looking-back regexp &optional limit +@defun looking-back regexp &optional limit greedy This function returns @code{t} if @var{regexp} matches text before point, ending at point, and @code{nil} otherwise. @@ -1105,6 +1105,10 @@ not to search before @var{limit}. In this case, the match that is found must begin at or after @var{limit}. +If greedy is non-nil, extend the match backwards as far as possible, +stopping when a single additional previous character cannot be part +of a match for regexp. + @example @group ---------- Buffer: foo ---------- @@ -1408,7 +1412,7 @@ (re-search-forward "The \\(cat \\)") (match-beginning 0) (match-beginning 1)) - @result{} (9 9 13) + @result{} (17 9 13) @end group @group Diff finished. Sun Nov 2 19:54:17 2008 --=-=-= -- regards, Seweryn Kokot --=-=-=-- From rudalics@gmx.at Sun Nov 2 23:43:10 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1299) by emacsbugs.donarmstrong.com; 3 Nov 2008 07:43:10 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mA37h6Rd027009 for <1299@emacsbugs.donarmstrong.com>; Sun, 2 Nov 2008 23:43:08 -0800 Received: (qmail invoked by alias); 03 Nov 2008 07:43:01 -0000 Received: from 62-47-45-144.adsl.highway.telekom.at (EHLO [62.47.45.144]) [62.47.45.144] by mail.gmx.net (mp042) with SMTP; 03 Nov 2008 08:43:01 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19K4PgV6BhKVLtervak2DgTN89AQd/KFLcDIunniv 8KaTWmKZbVc1UA Message-ID: <490EAB3A.10309@gmx.at> Date: Mon, 03 Nov 2008 08:41:46 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 1299@debbugs.gnu.org CC: Seweryn Kokot Subject: Re: bug#1299: lispref - searching.texi: Updating of looking-back arguments and return values in the example References: <87iqr6hrre.fsf@poczta.po.opole.pl> In-Reply-To: <87iqr6hrre.fsf@poczta.po.opole.pl> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73 > See the diff attached. Note that I copied the explanation for greedy > argument of `looking-back' function. Because I'm not a native speaker > so probably this paragraph requires some rephrasing. FWIW, it might not harm to also resolve the contradiction that REGEXP can match _before_ LIMIT when GREEDY is non-nil (in the manual _and_ the doc-string). martin From cyd@stupidchicken.com Mon Nov 3 11:21:25 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-4.9 required=4.0 tests=AWL,BAYES_00,FOURLA,GMAIL, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1299-done) by emacsbugs.donarmstrong.com; 3 Nov 2008 19:21:25 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA3JLMKs007802 for <1299-done@emacsbugs.donarmstrong.com>; Mon, 3 Nov 2008 11:21:23 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id 291DF57E1D1; Mon, 3 Nov 2008 14:21:31 -0500 (EST) From: Chong Yidong To: Seweryn Kokot Cc: 1299-done@debbugs.gnu.org, martin rudalics Subject: Re: bug#1299: lispref - searching.texi: Updating of looking-back arguments and return values in the example Date: Mon, 03 Nov 2008 14:21:31 -0500 Message-ID: <87abcgk43o.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Seweryn Kokot wrote: > See the diff attached. Note that I copied the explanation for greedy > argument of `looking-back' function. Thanks. I've checked in your patch with some minor modifications. martin rudalics wrote: > FWIW, it might not harm to also resolve the contradiction that REGEXP > can match _before_ LIMIT when GREEDY is non-nil (in the manual _and_ > the doc-string). I noted this in the manual and the doc-string. Thanks. From unknown Mon Jun 23 14:58:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Tue, 02 Dec 2008 15:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator