GNU bug report logs - #45944
28.0.50; Mailabbrev sometimes hangs

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Mon, 18 Jan 2021 00:12:01 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 45944 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 45944 <at> debbugs.gnu.org
Subject: Re: bug#45944: 28.0.50; Mailabbrev sometimes hangs
Date: Tue, 19 Jan 2021 05:47:20 +0100
Katsumi Yamaoka <yamaoka <at> 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




This bug report was last modified 4 years and 186 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.