GNU bug report logs -
#53203
Comment with lots of color codes crashes or hangs emacs in scss-mode
Previous Next
Reported by: Colin <my.old.email.sucked <at> gmail.com>
Date: Wed, 12 Jan 2022 08:03:02 UTC
Severity: normal
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> But then we get:
>
> "\\(?:([^)]+)\\)?"
> (if (not sassy)
> "[^:{}()\n]*"
> (concat "[^:{}()\n#]*\\(?:" scss--hash-re "[^:{}()\n#]*\\)*"))
> "\\)*"
>
> Which is a whole lot of backtracking, presumably exacerbated by the
> previous ids bit of the regexp.
By the ancient scientific method of commenting out code, it seems to me
that the culprit is rather the last group of the regexp starting on
line 955:
(concat "\\(?:" scss--hash-re
"\\|[^@/:{}() \t\n#]\\)"
"[^:{}()#]*\\(?:" scss--hash-re "[^:{}()#]*\\)*"))
That is, this part:
\\(?:" scss--hash-re "[^:{}()#]*\\)*
Though I'm rather clueless on how proceed debugging/optimizing it. 😕
> But I've repressed all I once knew about the scss language -- what is
> it really trying to match here? Anybody?
It's supposed to match selectors like the one on line 39 in
test/manual/indent/scss-mode.scss:
p.#{$name} var
This bug report was last modified 3 years and 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.