From: Joost Kremers <joostkremers@fastmail.fm>
To: thibaut.verron@gmail.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: Regex to match lines with a specific number of words
Date: Sun, 24 Apr 2022 00:21:35 +0200 [thread overview]
Message-ID: <87fsm3qvv6.fsf@fastmail.fm> (raw)
In-Reply-To: <CAFsi02RvREnjuSz8XWrFk=5Kky_WLVKkNqMbj6YftDo2QchFPg@mail.gmail.com>
On Sat, Apr 23 2022, Thibaut Verron wrote:
> No problem! The information is in the manual, but hidden behind several
> layers of redirection.
> I find the emacswiki page on regular expressions both more synthetic and
> more informative.
Thanks, I'll check it out.
> Regarding performances, that's a bit strange.
> Is it better if you add ^ and $ around the expression? Or if you add only ^
> and search for exactly 30 repetitions (not 30 or more)?
Well, either version still runs up one CPU core to 100%. The only difference
seems to be that they are more easily interruptable with C-g: Emacs responds
immediately, whereas before it would take seconds to respond to C-g and in one
case it did not respond at all. (I ended up killing Emacs when GNOME popped up a
a suggestion to do so...)
> Le sam. 23 avr. 2022 à 23:34, Joost Kremers <joostkremers@fastmail.fm> a
> écrit :
>> Lemme see if a function that goes through the buffer, splits every line on
>> white space and deletes those that are too long works better.
That actually worked well. It still takes a few seconds to run, but really just
a few seconds. And that's including dumping all the extracted lines into a
separate buffer.
--
Joost Kremers
Life has its moments
next prev parent reply other threads:[~2022-04-23 22:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-23 19:44 Regex to match lines with a specific number of words Joost Kremers
2022-04-23 20:58 ` Thibaut Verron
2022-04-23 21:20 ` Joost Kremers
2022-04-23 21:46 ` Thibaut Verron
2022-04-23 22:11 ` [External] : " Drew Adams
2022-04-23 22:32 ` Thibaut Verron
2022-04-23 22:21 ` Joost Kremers [this message]
2022-04-23 22:46 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-04-24 14:31 ` Joost Kremers
2022-04-26 23:55 ` Nick Dokos
2022-04-27 7:23 ` Jean Louis
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fsm3qvv6.fsf@fastmail.fm \
--to=joostkremers@fastmail.fm \
--cc=help-gnu-emacs@gnu.org \
--cc=thibaut.verron@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).