From unknown Thu Aug 14 17:28:17 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#45952 <45952@debbugs.gnu.org> To: bug#45952 <45952@debbugs.gnu.org> Subject: Status: Correction to: Re: 27.1; Certain regexps can cause comint-redirect-results-list-from-process to loop. Reply-To: bug#45952 <45952@debbugs.gnu.org> Date: Fri, 15 Aug 2025 00:28:17 +0000 retitle 45952 Correction to: Re: 27.1; Certain regexps can cause comint-re= direct-results-list-from-process to loop. reassign 45952 emacs submitter 45952 Richard Sharman severity 45952 normal tag 45952 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 02:31:00 2021 Received: (at submit) by debbugs.gnu.org; 18 Jan 2021 07:31:00 +0000 Received: from localhost ([127.0.0.1]:46196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1P05-0005Uq-TE for submit@debbugs.gnu.org; Mon, 18 Jan 2021 02:31:00 -0500 Received: from lists.gnu.org ([209.51.188.17]:37572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1NOp-0002pJ-6i for submit@debbugs.gnu.org; Mon, 18 Jan 2021 00:48:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1NOo-0000Lj-Ut for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2021 00:48:22 -0500 Received: from mx4.ncf.ca ([172.83.172.18]:50632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1NOm-0000kv-Js for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2021 00:48:22 -0500 Received: from localhost (localhost [127.0.0.1]) by mx4.ncf.ca (Postfix) with ESMTP id 9ECBE16EBB for ; Mon, 18 Jan 2021 00:48:19 -0500 (EST) X-Virus-Scanned: Ubuntu amavisd-new at Received: from mx4.ncf.ca ([127.0.0.1]) by localhost (mx4.ncf.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fUTdH1EDMB0D for ; Mon, 18 Jan 2021 00:48:17 -0500 (EST) Received: from mail.ncf.ca (mail.ncf.ca [172.83.172.45]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx4.ncf.ca (Postfix) with ESMTPS id D56C716EBA for ; Mon, 18 Jan 2021 00:48:17 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 mx4.ncf.ca D56C716EBA Received: from [192.168.0.103] (unknown [172.103.218.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: fo019@ncf.ca) by mail.ncf.ca (Postfix) with ESMTPSA id 6E58A26B61 for ; Mon, 18 Jan 2021 00:48:17 -0500 (EST) From: Richard Sharman Content-Type: multipart/alternative; boundary="Apple-Mail=_7759E5D7-8BE4-4411-842B-D002650DC151" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: Correction to: Re: 27.1; Certain regexps can cause comint-redirect-results-list-from-process to loop. Date: Sun, 17 Jan 2021 21:48:16 -0800 References: <1BD39C98-94C1-4814-A25B-A236AAF84027@pobox.com> To: bug-gnu-emacs@gnu.org In-Reply-To: <1BD39C98-94C1-4814-A25B-A236AAF84027@pobox.com> Message-Id: X-Mailer: Apple Mail (2.3445.9.7) Received-SPF: neutral client-ip=172.83.172.18; envelope-from=rsharman@pobox.com; helo=mx4.ncf.ca X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 18 Jan 2021 02:30:56 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) --Apple-Mail=_7759E5D7-8BE4-4411-842B-D002650DC151 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Sorry, there was a mistake on the patch on my previous message;=20 the (re-search-forward regexp nil t)) was inadvertently changed to = (re-search-forward regexp nil). Sorry. Here=E2=80=99s the corrected version: --- comint.el.orig 2021-01-17 21:35:02.000000000 -0800 +++ comint.el 2021-01-17 21:36:23.000000000 -0800 @@ -3822,7 +3822,7 @@ Return a list of expressions in the output which match REGEXP. REGEXP-GROUP is the regular expression group in REGEXP to use." (let ((output-buffer " *Comint Redirect Work Buffer*") - results) + results last-point) (with-current-buffer (get-buffer-create output-buffer) (erase-buffer) (comint-redirect-send-command-to-process command @@ -3837,13 +3837,18 @@ ;; Skip past the command, if it was echoed (and (looking-at command) (forward-line)) + (setq last-point (point)) (while (and (not (eobp)) (re-search-forward regexp nil t)) - (push (buffer-substring-no-properties - (match-beginning regexp-group) - (match-end regexp-group)) - results)) + (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)))) + =0C ;; Converting process modes to use comint mode ;; = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > On Jan 17, 2021, at 5:24 PM, Richard Sharman = wrote: >=20 > Certain regexps can cause comint-redirect-results-list-from-process to = loop. >=20 > For example, when attempting to match whole lines with the regexp > "^.*$" if the output buffer contains an empty line, then the > re-search-forward expression returns (point) but does not advance = point, > and since (eobp) is false the loop never terminates.=20 >=20 > This could avoided by testing if point advances. If it doesn't, one > could either exit the loop or, preferably, advance a line which would > allow for further matches.=20 >=20 > Function loop.el demonstrates the problem. It sends to a shell buffer = a > command that outputs 4 lines, the 3rd of which is empty. Trying to > match all lines with "^.*$" causes it to loop.=20 >=20 > (defun loop () > (interactive) > ;; create shell if not done > (save-window-excursion > (shell)) > ;; send a command that outputs 4 lines, the 3rd of which is empty > (let ((p (get-process "shell")) > (command "(echo a; echo b ; echo ; echo d)\n") > reply) > (setq reply (comint-redirect-results-list-from-process p command = "^.*$" 0)) > ;; we never get to here! > (message (car reply)) > reply > )) >=20 > Note: Starting from emacs -Q it is necessary to run M-x shell before > invoking loop, otherwise the error "No prompt found or > =E2=80=98comint-prompt-regexp=E2=80=99 not set properly" is produced. >=20 > With this patch correct results are obtained: > --- comint.el.orig 2021-01-17 14:22:17.000000000 -0800 > +++ comint.el 2021-01-17 14:23:54.000000000 -0800 > @@ -3822,7 +3822,7 @@ > Return a list of expressions in the output which match REGEXP. > REGEXP-GROUP is the regular expression group in REGEXP to use." > (let ((output-buffer " *Comint Redirect Work Buffer*") > - results) > + results last-point) > (with-current-buffer (get-buffer-create output-buffer) > (erase-buffer) > (comint-redirect-send-command-to-process command > @@ -3837,13 +3837,18 @@ > ;; Skip past the command, if it was echoed > (and (looking-at command) > (forward-line)) > + (setq last-point (point)) > (while (and (not (eobp)) > - (re-search-forward regexp nil t)) > - (push (buffer-substring-no-properties > - (match-beginning regexp-group) > - (match-end regexp-group)) > - results)) > + (re-search-forward regexp nil)) > + (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)))) > + >=20 > ;; Converting process modes to use comint mode > ;; = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= >=20 >=20 >=20 > In GNU Emacs 27.1 (build 2, x86_64-apple-darwin17.7.0, NS = appkit-1561.61 Version 10.13.6 (Build 17G14033)) > of 2020-12-13 built on henry.local > Windowing system distributor 'Apple', version 10.3.1561 > System Description: Mac OS X 10.13.6 >=20 > Recent messages: > For information about GNU Emacs and the GNU system, type C-h C-a. > loop > Quit > Quit > Configured features: > NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES > THREADS JSON PDUMPER GMP >=20 > Important settings: > value of $LANG: en_CA.UTF-8 > locale-coding-system: utf-8-unix >=20 > Major mode: Emacs-Lisp >=20 > Minor modes in effect: > shell-dirtrack-mode: t > tooltip-mode: t > global-eldoc-mode: t > eldoc-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t >=20 > Load-path shadows: > None found. >=20 > Features: > (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs > format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg > epg-config gnus-util rmail rmail-loaddefs text-property-search = time-date > subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies > mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader = cl-loaddefs > cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr = mail-utils > shell pcomplete comint ansi-color ring tooltip eldoc electric uniquify > ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win > ucs-normalize mule-util term/common-win tool-bar dnd fontset image > regexp-opt fringe tabulated-list replace newcomment text-mode = elisp-mode > lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch > timer select scroll-bar mouse jit-lock font-lock syntax facemenu > font-core term/tty-colors frame minibuffer cl-generic cham georgian > utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean > japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european > ethiopic indian cyrillic chinese composite charscript charprop > case-table epa-hook jka-cmpr-hook help simple abbrev obarray > cl-preloaded nadvice loaddefs button faces cus-face macroexp files > text-properties overlay sha1 md5 base64 format env code-pages mule > custom widget hashtable-print-readable backquote threads kqueue cocoa = ns > multi-tty make-network-process emacs) >=20 > Memory information: > ((conses 16 49326 43672) > (symbols 48 6380 11) > (strings 32 17163 4847) > (string-bytes 1 570096) > (vectors 16 10970) > (vector-slots 8 134400 67778) > (floats 8 19 151) > (intervals 56 211 86) > (buffers 1000 14)) --Apple-Mail=_7759E5D7-8BE4-4411-842B-D002650DC151 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 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=E2=80=99s the = corrected version:

--- = comint.el.orig = 2021-01-17 21:35:02.000000000 -0800
+++ comint.el = 2021-01-17 21:36:23.000000000 -0800
@@ -3822,7 +3822,7 = @@
 Return a list of expressions in the output which match = REGEXP.
 REGEXP-GROUP is the regular expression group in REGEXP = to use."
   (let ((output-buffer " *Comint Redirect Work = Buffer*")
- = results)
+ = results last-point)
     (with-current-buffer = (get-buffer-create output-buffer)
      =  (erase-buffer)
      =  (comint-redirect-send-command-to-process command
@@ -3837,13 +3837,18 = @@
  =      ;; Skip past the command, if it was = echoed
       (and (looking-at = command)
 =   (forward-line))
+      (setq last-point = (point))
       (while (and (not = (eobp))
 =  (re-search-forward regexp nil = t))
- (push = (buffer-substring-no-properties
-             =   (match-beginning regexp-group)
-             =   (match-end regexp-group))
-             =  results))
+ = (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))))
+
 =0C
 ;; Converting process modes to use comint = mode
 ;; = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=



On Jan 17, 2021, at 5:24 PM, Richard Sharman <rsharman@pobox.com> = wrote:

Certain regexps can cause = comint-redirect-results-list-from-process to loop.

For example, when attempting to match whole lines with the = regexp
"^.*$" if the output buffer contains an empty line, = then the
re-search-forward expression returns (point) but = does not advance point,
and since (eobp) is false the loop = never terminates.

This could avoided by = testing if point advances.  If it doesn't, one
could = either exit the loop or, preferably, advance a line which would
allow for further matches.

Function loop.el demonstrates the problem.  It sends to = a shell buffer a
command that outputs 4 lines, the 3rd of = which is empty.  Trying to
match all lines with = "^.*$" causes it to loop.

(defun loop = ()
 (interactive)
 ;; create = shell if not done
 (save-window-excursion
   (shell))
 ;; send a = command that outputs 4 lines, the 3rd of which is empty
=  (let ((p (get-process "shell"))
(command = "(echo a; echo b ; echo ; echo d)\n")
reply)
   (setq reply = (comint-redirect-results-list-from-process p command "^.*$" 0))
   ;; we never get to here!
=    (message (car reply))
=    reply
   ))

Note:  Starting from emacs -Q it is = necessary to run M-x shell before
invoking loop, =  otherwise the error "No prompt found or
=E2=80=98comint-prompt-regexp=E2=80=99 not set properly" is = produced.

With this patch correct results = are obtained:
--- comint.el.orig = 2021-01-17 14:22:17.000000000 -0800
+++ = comint.el = 2021-01-17 14:23:54.000000000 -0800
@@ -3822,7 = +3822,7 @@
Return a list of expressions in the output = which match REGEXP.
REGEXP-GROUP is the regular expression = group in REGEXP to use."
  (let ((output-buffer = " *Comint Redirect Work Buffer*")
- = results)
+ results last-point)
=     (with-current-buffer (get-buffer-create = output-buffer)
=       (erase-buffer)
=       (comint-redirect-send-command-to-proce= ss command
@@ -3837,13 +3837,18 @@
=       ;; Skip past the command, if it was = echoed
      (and = (looking-at command)
  (forward-line))
+      (setq last-point (point))
      (while (and (not = (eobp))
-  (re-search-forward regexp = nil t))
- (push = (buffer-substring-no-properties
- =             &n= bsp; (match-beginning regexp-group)
- =             &n= bsp; (match-end regexp-group))
- =             &n= bsp;results))
+  (re-search-forward regexp = nil))
+ (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))))
+

;; Converting process modes to = use comint mode
;; = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=



In GNU Emacs = 27.1 (build 2, x86_64-apple-darwin17.7.0, NS appkit-1561.61 Version = 10.13.6 (Build 17G14033))
of 2020-12-13 built on = henry.local
Windowing system distributor 'Apple', version = 10.3.1561
System Description:  Mac OS X 10.13.6

Recent messages:
For information = about GNU Emacs and the GNU system, type C-h C-a.
loop
Quit
Quit
Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS = MODULES
THREADS JSON PDUMPER GMP

Important settings:
 value of $LANG: = en_CA.UTF-8
 locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
=  shell-dirtrack-mode: t
 tooltip-mode: t
 global-eldoc-mode: t
 eldoc-mode: = t
 electric-indent-mode: t
=  mouse-wheel-mode: t
 tool-bar-mode: t
 menu-bar-mode: t
=  file-name-shadow-mode: t
=  global-font-lock-mode: t
 font-lock-mode: t
 blink-cursor-mode: t
=  auto-composition-mode: t
=  auto-encryption-mode: t
=  auto-compression-mode: t
 line-number-mode: = t
 transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug = message rmc puny dired dired-loaddefs
format-spec rfc822 = mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs = text-property-search time-date
subr-x seq byte-opt gv = bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode = mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr = mail-utils
shell pcomplete comint ansi-color ring tooltip = eldoc electric uniquify
ediff-hook vc-hooks = lisp-float-type mwheel term/ns-win ns-win
ucs-normalize = mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode = elisp-mode
lisp-mode prog-mode register page tab-bar = menu-bar rfn-eshadow isearch
timer select scroll-bar mouse = jit-lock font-lock syntax facemenu
font-core = term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao = korean
japanese eucjp-ms cp51932 hebrew greek romanian = slovak czech european
ethiopic indian cyrillic chinese = composite charscript charprop
case-table epa-hook = jka-cmpr-hook help simple abbrev obarray
cl-preloaded = nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages = mule
custom widget hashtable-print-readable backquote = threads kqueue cocoa ns
multi-tty make-network-process = emacs)

Memory information:
((conses 16 49326 43672)
(symbols 48 6380 = 11)
(strings 32 17163 4847)
(string-bytes 1 = 570096)
(vectors 16 10970)
(vector-slots 8 = 134400 67778)
(floats 8 19 151)
(intervals = 56 211 86)
(buffers 1000 14))

= --Apple-Mail=_7759E5D7-8BE4-4411-842B-D002650DC151-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 02:46:45 2021 Received: (at control) by debbugs.gnu.org; 18 Jan 2021 07:46:45 +0000 Received: from localhost ([127.0.0.1]:46202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1PFN-0005rm-JW for submit@debbugs.gnu.org; Mon, 18 Jan 2021 02:46:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1PFI-0005rU-7i for control@debbugs.gnu.org; Mon, 18 Jan 2021 02:46:44 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50535) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1PFD-0002sA-06 for control@debbugs.gnu.org; Mon, 18 Jan 2021 02:46:35 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1l1PFC-0006Qg-J2 for control@debbugs.gnu.org; Mon, 18 Jan 2021 02:46:34 -0500 Subject: control message for bug 45952 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Mon, 18 Jan 2021 02:46:34 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) merge 45950 45952 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 12:17:55 2021 Received: (at 45952) by debbugs.gnu.org; 18 Jan 2021 17:17:55 +0000 Received: from localhost ([127.0.0.1]:48254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1YA6-0001VM-US for submit@debbugs.gnu.org; Mon, 18 Jan 2021 12:17:55 -0500 Received: from mx4.ncf.ca ([172.83.172.18]:42136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1YA5-0001V2-F4 for 45952@debbugs.gnu.org; Mon, 18 Jan 2021 12:17:53 -0500 Received: from localhost (localhost [127.0.0.1]) by mx4.ncf.ca (Postfix) with ESMTP id 5640318DDC for <45952@debbugs.gnu.org>; Mon, 18 Jan 2021 12:17:48 -0500 (EST) X-Virus-Scanned: Ubuntu amavisd-new at Received: from mx4.ncf.ca ([IPv6:::1]) by localhost (mx4.ncf.ca [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id WUGJc9ce9zx9 for <45952@debbugs.gnu.org>; Mon, 18 Jan 2021 12:17:47 -0500 (EST) Received: from mail.ncf.ca (mail.ncf.ca [172.83.172.45]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx4.ncf.ca (Postfix) with ESMTPS id E3A3118F04 for <45952@debbugs.gnu.org>; Mon, 18 Jan 2021 12:17:47 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 mx4.ncf.ca E3A3118F04 Received: from [192.168.0.103] (unknown [172.103.218.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: fo019@ncf.ca) by mail.ncf.ca (Postfix) with ESMTPSA id B200E2CF46 for <45952@debbugs.gnu.org>; Mon, 18 Jan 2021 12:17:47 -0500 (EST) From: Richard Sharman Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: bug#45952 was really a correction to 45950 Message-Id: Date: Mon, 18 Jan 2021 09:17:47 -0800 To: 45952@debbugs.gnu.org X-Mailer: Apple Mail (2.3445.9.7) X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 45952 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) Sorry, I when I found a problem with 45950 I hadn=E2=80=99t received the = acknowledgement message (and didn=E2=80=99t know it was coming) and so = submitted this one (45952) to fix the path. Richard From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 23:16:22 2021 Received: (at 45952) by debbugs.gnu.org; 19 Jan 2021 04:16:22 +0000 Received: from localhost ([127.0.0.1]:49011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1iRJ-0006kW-Qz for submit@debbugs.gnu.org; Mon, 18 Jan 2021 23:16:22 -0500 Received: from quimby.gnus.org ([95.216.78.240]:53982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1iRH-0006kB-Dw; Mon, 18 Jan 2021 23:16:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=mQLnYBwXkPPvp4vmwpnTLbG+ujDYlOUajFiYN82a4RI=; b=D/pJOgS7hkbtqRTZPaA40N7+lR lZAW0PzC2HWPDuUeLcqQ5rKCVEJV8RSFyuCAI0fITCQHaGvloqitAb4UmGGFsprvhgfzVJLccqrQI cLdxQwEtD8L6Ni3RP3R2RvfTRbDmIfO24F3Jmji/1AcNVnRnJ4p0ECYPohXOS6NmZIzM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1iR1-0003Cc-SL; Tue, 19 Jan 2021 05:16:12 +0100 From: Lars Ingebrigtsen To: Richard Sharman Subject: Re: bug#45950: 27.1; Certain regexps can cause comint-redirect-results-list-from-process to loop. References: <1BD39C98-94C1-4814-A25B-A236AAF84027@pobox.com> X-Now-Playing: The Durutti Column's _Without Mercy (4)_: "Blind Elevator Girl" Date: Tue, 19 Jan 2021 05:16:02 +0100 In-Reply-To: (Richard Sharman's message of "Sun, 17 Jan 2021 21:48:16 -0800") Message-ID: <871rehr27x.fsf_-_@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Richard Sharman 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 cor [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45952 Cc: 45952@debbugs.gnu.org, 45950@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Richard Sharman writes: > Sorry, there was a mistake on the patch on my previous message;=20 > the (re-search-forward regexp nil t)) was inadvertently changed to > (re-search-forward regexp nil). > > Sorry. > > Here=E2=80=99s 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. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 23:16:27 2021 Received: (at control) by debbugs.gnu.org; 19 Jan 2021 04:16:27 +0000 Received: from localhost ([127.0.0.1]:49014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1iRP-0006ku-5X for submit@debbugs.gnu.org; Mon, 18 Jan 2021 23:16:27 -0500 Received: from quimby.gnus.org ([95.216.78.240]:53996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1iRN-0006kR-ID for control@debbugs.gnu.org; Mon, 18 Jan 2021 23:16:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=stJNtwSxnuC3cHBhYH4Y3w9bOKpNHW6T6WX3Oh7Xbxs=; b=hes9kNbrfcUmuHfvzS2ni/KwIq v7V8acmELkB+rGQ38YoB4oiH9UZ73in6hx1xD42bDsDKF17hN/RhrhAK/ZCKa9G/BdLg5v9qOdVhQ dcvmRLsyE8warG9+QHcAIcYZXBXDGcQNavmN4PFi6WBTEVrSoNTEhurzSAKLMItVGUp8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1iRG-0003Ck-3i for control@debbugs.gnu.org; Tue, 19 Jan 2021 05:16:20 +0100 Date: Tue, 19 Jan 2021 05:16:17 +0100 Message-Id: <87zh15pnn2.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #45950 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 45950 fixed close 45950 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 45950 fixed close 45950 28.1 quit From unknown Thu Aug 14 17:28:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 16 Feb 2021 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator