unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: 45944@debbugs.gnu.org
Subject: bug#45944: 28.0.50; Mailabbrev sometimes hangs
Date: Tue, 19 Jan 2021 05:47:20 +0100	[thread overview]
Message-ID: <87o8hlpm7b.fsf@gnus.org> (raw)
In-Reply-To: <b4mlfcpzugb.fsf@jpl.org> (Katsumi Yamaoka's message of "Tue, 19 Jan 2021 08:39:00 +0900")

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> As far as I can observe, the more "____" line is long, the more
> it takes a long time.

Curious.  I can reproduce this with the example code, but the function
that's hanging is apparently just doing:

(re-search-forward (concat "^" mail-citation-prefix-regexp ".*$") nil t)

When I try this manually, then it doesn't hang, which is the curious
thing?  So why is it hanging from a syntax-propertize perspective but
not when called directly?

Debugger entered--Lisp error: (quit)
  search-forward-regexp("^\\([ \11]*\\(\\w\\|[_.]\\)+>+\\|[ \11]*[>|]\\)+.*$" 100 noerror)
  (while (search-forward-regexp citation-regexp end 'noerror) (let ((
  (let ((citation-regexp (concat "^" message-cite-prefix-regexp ".*$"
  message--syntax-propertize(1 100)
  syntax-propertize(100)
  internal--syntax-propertize(7)
  abbrev--before-point()

Anyway, this is the regexp in question:

(defcustom mail-citation-prefix-regexp
  (purecopy "\\([ \t]*\\(\\w\\|[_.]\\)+>+\\|[ \t]*[>|]\\)+")

And I guess there's some extreme backtracking going on with the

  \\(\\w\\|[_.]\\)+>

part?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-01-19  4:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  0:10 bug#45944: 28.0.50; Mailabbrev sometimes hangs Katsumi Yamaoka
2021-01-18 23:39 ` Katsumi Yamaoka
2021-01-19  4:47   ` Lars Ingebrigtsen [this message]
2021-01-19  8:30     ` Andreas Schwab
2021-01-19 11:07       ` Katsumi Yamaoka
2021-01-19 15:09         ` Lars Ingebrigtsen
2021-01-19 21:50           ` Katsumi Yamaoka

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=87o8hlpm7b.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=45944@debbugs.gnu.org \
    --cc=yamaoka@jpl.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 public inbox

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

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).