[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45950: 27.1; Certain regexps can cause comint-redirect-results-list-
From: |
Lars Ingebrigtsen |
Subject: |
bug#45950: 27.1; Certain regexps can cause comint-redirect-results-list-from-process to loop. |
Date: |
Tue, 19 Jan 2021 05:16:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Richard Sharman <rsharman@pobox.com> writes:
> Sorry, there was a mistake on the patch on my previous message;
> the (re-search-forward regexp nil t)) was inadvertently changed to
> (re-search-forward regexp nil).
>
> Sorry.
>
> Here’s the corrected version:
[...]
> + (if (equal (point) last-point)
> + (forward-line 1)
> + (push (buffer-substring-no-properties
> + (match-beginning regexp-group)
> + (match-end regexp-group))
> + results))
> + (setq last-point (point)))
> (nreverse results))))
I can reproduce the infloop in Emacs 28, but I don't think this is quite
the correct fix -- if you've asked for "^.*$", then you should get an
empty string in the result set, and not just "a" "b" "d". So I've
installed a variant of what you suggest in Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no