From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: bug#31636: 27.0.50; lockfile syntax searchable from info manual Date: Wed, 6 Jun 2018 10:41:14 -0400 Message-ID: References: <20180529073311.EEA09102DA@mailuser.nyi.internal> <876036hn2e.fsf@gmail.com> <87tvqqd7rp.fsf@gmail.com> <87r2lufvo9.fsf@gmail.com> <83r2luv28h.fsf@gnu.org> <87a7sib7ty.fsf@gmail.com> <83in75vp8l.fsf@gnu.org> <87wovkyv6l.fsf@gmail.com> <83tvqmga79.fsf@gnu.org> <87h8mmu6jp.fsf@gmail.com> <83k1rifyqo.fsf@gnu.org> <87y3fyskns.fsf@gmail.com> <87tvqmsjww.fsf@gmail.com> <87bmcqlwhn.fsf@gmail.com> <8336y2czrp.fsf@gnu.org> <87zi0a5v4z.fsf@gmail.com> <83tvqh9sqp.fsf@gnu.org> <87lgbtm2q2.fsf@gmail.com> <87fu20mkbm.fsf@gmail.com> <87602wm3ax.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1528295964 4153 195.159.176.226 (6 Jun 2018 14:39:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 6 Jun 2018 14:39:24 +0000 (UTC) Cc: Eli Zaretskii To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 06 16:39:19 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fQZap-0000y7-Nr for ged-emacs-devel@m.gmane.org; Wed, 06 Jun 2018 16:39:19 +0200 Original-Received: from localhost ([::1]:52841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQZcw-0008Rp-O6 for ged-emacs-devel@m.gmane.org; Wed, 06 Jun 2018 10:41:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fQZck-0008OF-6V for emacs-devel@gnu.org; Wed, 06 Jun 2018 10:41:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fQZci-0006Q2-AD for emacs-devel@gnu.org; Wed, 06 Jun 2018 10:41:18 -0400 Original-Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]:33783) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fQZci-0006Pq-52; Wed, 06 Jun 2018 10:41:16 -0400 Original-Received: by mail-it0-x232.google.com with SMTP id k17-v6so17690247ita.0; Wed, 06 Jun 2018 07:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=iydWdZyX/WTqT6/mHcM4BmE5pdMYgo6MuFnkhWTuthA=; b=qkH0FiF1Jy84Nu154ikMeYYJJebDfKa/jQMUKysxCxfILEarZglCf/6EM4YaKM/7rR 9ewNhqwTxjpGN872vWJV4eMBQEKDrOdPtDk2FVimaX8FEi311b18Iyjkwd2jh6KezHPj /Oc7IOl2hjOTDREg7oYprACOYRBGh53lxFmT47vaHHLGpGuxb4B8IJm47faFKbvDDcyQ batpJYQZLldGLdgGtKE1WEArh2DhaRrNKYqo+PdmF4/REUXBDXPmlljUs0B+MUTMzXf9 BaUSqqrFv41a8xOs19kyYfEPdACeLskZ9WTmPLkmzFTKhc3glS52WvJhCssByQY/eVfH BehA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=iydWdZyX/WTqT6/mHcM4BmE5pdMYgo6MuFnkhWTuthA=; b=Jipiitl7BktYa2P3h8Xcx0vQ6FweOy/lup2bBK8bZ7PSzL42cXGqVEGhf1TG/4g9II yhAcGuvqG0UPeaqu2zWp0FHcbHRAOc534uHomcza8O5YCj9RAC+QdlODStddCeqJmHGy ZOYte23MxXMauYMe5nYVqYkoXnz/nZtB2l/BQvRmDJp2ATLn/MJwE2fv0eOpfQJBFx7D FnxngQ2GS/+j0Wge3hdzOotaA8ge1K8d2HTTB8+D1CsJsd/dMRXc193sFlejmHBmgAOI 4cv2rlsW+WYOj10EiIyDomH25XGJb/g0vszrE1N8imrlFuDAbSsCxWWwzzcvxwxA/sNE OA7Q== X-Gm-Message-State: APt69E0EdOmnP3GdaYA4axXh1XU3qrR2+ka4mFuoAXOJcLo7mu6bqJYD 0N7iQR+ECYOhJNcZYhIlTTOr0qklu5L/1ICu8Eo6uEKB X-Google-Smtp-Source: ADUXVKJfYBL3qHFL7UapSDOS0eTTrbnUfrP5m7qmMNcSnmfZl45iOQ+8NUEoBrAZiSPcCK0P0DMCpcl8mF3umCn1I58= X-Received: by 2002:a24:552:: with SMTP id 79-v6mr3037364itl.109.1528296075314; Wed, 06 Jun 2018 07:41:15 -0700 (PDT) Original-Received: by 2002:ad5:428c:0:0:0:0:0 with HTTP; Wed, 6 Jun 2018 07:41:14 -0700 (PDT) In-Reply-To: <87602wm3ax.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226065 Archived-At: On 6 June 2018 at 09:51, Robert Pluim wrote: >>> I could always do (eq (char-before) ?() I suppose. >> >> That's probably better. But wait! This time you *should* have a backslas= h: ?\( > > That=CA=BCs a matter of style, no? ?( works equally well, but emacs > convention appears to be ?\( Mostly yes, but see also Bug#20852. >>> The regexp produced by (sentence-end) looks like it=CA=BCs fairly well >>> anchored. Besides, I=CA=BCm not searching for an end-of-sentence, I=CA= =BCm >>> asking "Am I at end-of-sentence". >> >> Which is exactly why you should put a limit. > > I don=CA=BCt understand that conclusion. If I have > > some words. some other words > ^ > > with point at '^', (looking-back (sentence-end)) will match. If point is > not at an end of sentence, looking-back won't go backwards through the > buffer attempting to find one. Even worse, it will go backwards through the buffer attempting to find a sentence that ends at point. (with-temp-buffer (dotimes (i 7) (dotimes (_ (expt 10 i)) (insert "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")) (insert " Sentence doesn't end here") (benchmark 1 '(looking-back (sentence-end))))) Elapsed time: 0.000000s [3 times] Elapsed time: 0.023000s Elapsed time: 0.101000s Elapsed time: 0.902000s Elapsed time: 8.872000s