all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: bug#31636: 27.0.50; lockfile syntax searchable from info manual
Date: Wed, 6 Jun 2018 10:41:14 -0400	[thread overview]
Message-ID: <CAM-tV-_eiANVDsc0bY8WAv9y1SDubJXDx_dxvRN=xWby-tM8dw@mail.gmail.com> (raw)
In-Reply-To: <87602wm3ax.fsf@gmail.com>

On 6 June 2018 at 09:51, Robert Pluim <rpluim@gmail.com> wrote:

>>> I could always do (eq (char-before) ?() I suppose.
>>
>> That's probably better. But wait! This time you *should* have a backslash: ?\(
>
> Thatʼs 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ʼs fairly well
>>> anchored. Besides, Iʼm not searching for an end-of-sentence, Iʼm
>>> asking "Am I at end-of-sentence".
>>
>> Which is exactly why you should put a limit.
>
> I donʼt 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



  reply	other threads:[~2018-06-06 14:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29  7:33 bug#31636: 27.0.50; lockfile syntax searchable from info manual Brady Trainor
2018-05-29  8:40 ` Robert Pluim
2018-05-29 11:24   ` Noam Postavsky
2018-05-29 13:17     ` Robert Pluim
2018-05-29 16:46       ` Eli Zaretskii
2018-05-29 19:06         ` Robert Pluim
2018-05-30  2:42           ` Eli Zaretskii
2018-05-31 10:29             ` Robert Pluim
2018-06-01  8:52               ` Eli Zaretskii
2018-06-01 10:47                 ` Robert Pluim
2018-06-01 13:00                   ` Eli Zaretskii
2018-06-01 13:24                     ` Robert Pluim
2018-06-01 13:25                     ` Robert Pluim
2018-06-01 13:42                       ` Robert Pluim
2018-06-04  9:41                         ` Robert Pluim
2018-06-04 10:39                           ` Andreas Schwab
2018-06-04 14:02                             ` Robert Pluim
2018-06-04 16:06                               ` Eli Zaretskii
2018-06-04 15:55                           ` Eli Zaretskii
2018-06-04 17:17                             ` Robert Pluim
2018-06-05 15:07                               ` Eli Zaretskii
2018-06-05 19:51                                 ` Robert Pluim
2018-06-05 20:08                                   ` Noam Postavsky
2018-06-06  7:43                                     ` Robert Pluim
2018-06-06 13:13                                       ` Noam Postavsky
2018-06-06 13:51                                         ` Robert Pluim
2018-06-06 14:41                                           ` Noam Postavsky [this message]
2018-06-06 14:51                                             ` Robert Pluim
2018-05-29 19:20         ` Paul Eggert
2018-05-30  2:42           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM-tV-_eiANVDsc0bY8WAv9y1SDubJXDx_dxvRN=xWby-tM8dw@mail.gmail.com' \
    --to=npostavs@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.