From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 02:03:37 2021 Received: (at submit) by debbugs.gnu.org; 18 Jan 2021 07:03:37 +0000 Received: from localhost ([127.0.0.1]:46173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1OZd-0004qC-2R for submit@debbugs.gnu.org; Mon, 18 Jan 2021 02:03:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:35922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1Kdk-000732-Dr for submit@debbugs.gnu.org; Sun, 17 Jan 2021 21:51:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1Kdk-0006NY-1H for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2021 21:51:36 -0500 Received: from mx4.ncf.ca ([172.83.172.18]:54912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1Kdh-00066y-Qi for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2021 21:51:35 -0500 Received: from localhost (localhost [127.0.0.1]) by mx4.ncf.ca (Postfix) with ESMTP id CFD8316B83 for ; Sun, 17 Jan 2021 21:51:32 -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 PDnxZMItpR6F for ; Sun, 17 Jan 2021 21:51:31 -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 440FA16B1A for ; Sun, 17 Jan 2021 21:51:31 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 mx4.ncf.ca 440FA16B1A 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 C988125D19 for ; Sun, 17 Jan 2021 21:51:30 -0500 (EST) From: Richard Sharman Content-Type: multipart/alternative; boundary="Apple-Mail=_1A510B1A-C5EB-4900-8A5D-0C8BA8656847" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: 27.1; comint-redirect-results-list-from-process sometimes fails to skip over command if echoed Message-Id: <8CD405D0-5936-4D36-A700-F753B428A5C3@pobox.com> Date: Sun, 17 Jan 2021 18:51:28 -0800 To: bug-gnu-emacs@gnu.org 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:03:35 -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=_1A510B1A-C5EB-4900-8A5D-0C8BA8656847 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 When function comint-redirect-results-list-from-process is examining the output buffer of the command it attempts to skip past the command if it was echoed. However, this test uses looking-at and so will fail if the command contains characters with special meansing to regexps. It can also fail if the command contains a trailing newline character but the buffer may have a control-M character. The latter problem can be fixed by calling comint-carriage-motion before the test is done; the former by looking-at (regexp-quote command) instead of just at command. Note that bug 42662 (27.1; `comint-redirect-results-list-from-process=E2=80= =99=20 treats COMMAND as a regexp) is another symptom of the former problem. Example code to reproduce the problem: (defun example () (interactive) ;; create shell if not already created (save-window-excursion (shell)) (let ((p (get-process "shell")) command reply) (process-send-string p "irb\n") (setq command "puts File.atime(\"example.el\") if = File.exist?(\"example.el\")\n") (setq reply (comint-redirect-results-list-from-process p command = "^.*$" 0)) (process-send-string p "quit\n") ;; cleanup! (message (car reply)) ;; this should be the a time of the file reply )) File example.el creates a shell process then runs =E2=80=9Cirb=E2=80=9D, = the ruby interactive shell, then sends it a command with question-marks in it. The first line returned should be the atime of the file. Patch: --- comint.el.orig 2021-01-17 14:22:17.000000000 -0800 +++ comint.el 2021-01-17 16:49:47.000000000 -0800 @@ -3833,9 +3833,11 @@ (accept-process-output process))) ;; Collect the output (set-buffer output-buffer) + (unless comint-inhibit-carriage-motion + (comint-carriage-motion (point-min)(point-max))) (goto-char (point-min)) ;; Skip past the command, if it was echoed - (and (looking-at command) + (and (looking-at (regexp-quote command)) (forward-line)) (while (and (not (eobp)) (re-search-forward regexp nil t)) Example output in *scratch* buffer before the patch: (example) ("irb " "puts File.atime(\"example.el\") if File.exist?(\"example.el\") " " " "") and after patch applied: (example) ("2021-01-17 18:33:45 -0800" "nil" "") 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: 2021-01-17 18:33:45 -0800 Result: "2021-01-17 18:33:45 -0800" ("2021-01-17 18:33:45 -0800" "nil" "") Result: ("2021-01-17 18:33:45 -0800" "nil" "") Result: ("2021-01-17 18:33:45 -0800" "nil" "") Quit Type C-x 4 C-o RET to restore the other window. =20 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: Shell Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-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 sendmail org-timer org-colview org-clock org-attach org-id org-archive org-agenda ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnir gnus-sum url url-proxy url-privacy url-expand url-methods url-history mailcap shr url-cookie url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs json map url-vars svg xml dom browse-url gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message rmc puny rfc822 mml mml-sec password-cache epa epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search seq byte-opt bytecomp byte-compile cconv mail-utils mm-util mail-prsvr wid-edit ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs ol-bibtex bibtex ol-bbdb ol-w3m reporter org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities noutline outline easy-mmode org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat advice org-macs org-loaddefs format-spec cal-menu calendar cal-loaddefs apropos edebug gv derived time-date subr-x help-fns radix-tree cl-print debug backtrace help-mode easymenu find-func cl-loaddefs cl-lib 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 179913 11829) (symbols 48 19738 1) (strings 32 63869 1510) (string-bytes 1 2209108) (vectors 16 29528) (vector-slots 8 338974 19272) (floats 8 213 69) (intervals 56 717 0) (buffers 1000 19)) --Apple-Mail=_1A510B1A-C5EB-4900-8A5D-0C8BA8656847 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
When function = comint-redirect-results-list-from-process is examining the
output buffer of the command it attempts to skip past the = command if it
was echoed.

However, this test uses looking-at and = so will fail if the command
contains characters = with special meansing to regexps. It can also fail
if= the command contains a trailing newline character but the
buffer may have a control-M character.
The latter problem can be fixed by = calling comint-carriage-motion before
the test is = done; the former by looking-at (regexp-quote command)
instead of just at command.

Note that bug 42662 (27.1; = `comint-redirect-results-list-from-process=E2=80=99 
treats COMMAND as a regexp) is another symptom of the former = problem.


Example code to reproduce the = problem:

(defun example ()
  = (interactive)
  ;; create shell if not already = created
  (save-window-excursion
    (shell))
  (let ((p = (get-process "shell"))
command
= reply)
    (process-send-string p = "irb\n")
    (setq command "puts = File.atime(\"example.el\") if File.exist?(\"example.el\")\n")
    (setq reply = (comint-redirect-results-list-from-process p command "^.*$" = 0))
    (process-send-string p = "quit\n") = ;; cleanup!
    (message (car = reply)) = ;; this should be the a time of the file
    reply
    = ))

File = example.el creates a shell process then runs =E2=80=9Cirb=E2=80=9D, the = ruby
interactive shell, then sends it a command = with question-marks in it.
The first line returned = should be the atime of the file.


Patch:

--- comint.el.orig 2021-01-17 14:22:17.000000000 = -0800
+++ comint.el 2021-01-17 16:49:47.000000000 = -0800
@@ -3833,9 +3833,11 @@
 =  (accept-process-output = process)))
       ;; Collect = the output
       (set-buffer = output-buffer)
+      (unless = comint-inhibit-carriage-motion
+ = (comint-carriage-motion (point-min)(point-max)))
       (goto-char (point-min))
       ;; Skip past the command, if it = was echoed
-      (and (looking-at = command)
+      (and (looking-at = (regexp-quote command))
    = (forward-line))
       (while = (and (not (eobp))
  =  (re-search-forward regexp nil t))



Example output in *scratch* = buffer before the patch:

(example)
("irb
" "puts File.atime(\"example.el\") if = File.exist?(\"example.el\")
" "
" "")

and after patch = applied:

(example)
("2021-01-17 = 18:33:45 -0800" "nil" "")


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:
2021-01-17 = 18:33:45 -0800
Result: "2021-01-17 18:33:45 -0800"
("2021-01-17 18:33:45 -0800" "nil" "")

Result: ("2021-01-17 18:33:45 -0800" "nil" "")

Result: ("2021-01-17 18:33:45 -0800" "nil" = "")

Quit
Type C-x 4 C-o RET = to restore the other window. 
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: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  = tooltip-mode: t
  global-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 = sendmail org-timer org-colview org-clock
org-attach org-id = org-archive org-agenda ol-eww ol-rmail ol-mhe ol-irc
ol-info= ol-gnus nnir gnus-sum url url-proxy url-privacy url-expand
url-methods url-history mailcap shr url-cookie url-domsuf = url-util
url-parse auth-source cl-seq eieio eieio-core = cl-macs eieio-loaddefs
json map url-vars svg xml dom = browse-url gnus-group gnus-undo gnus-start
gnus-cloud = nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601
gnus-spec gnus-int gnus-range message rmc puny rfc822 mml = mml-sec
password-cache epa epg epg-config mm-decode = mm-bodies mm-encode
mail-parse rfc2231 mailabbrev = gmm-utils mailheader gnus-win gnus
nnheader gnus-util = rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
text-property-search seq byte-opt bytecomp byte-compile cconv = mail-utils
mm-util mail-prsvr wid-edit ol-docview doc-view = jka-compr image-mode
exif dired dired-loaddefs ol-bibtex = bibtex ol-bbdb ol-w3m reporter org
ob ob-tangle ob-ref = ob-lob ob-table ob-exp org-macro org-footnote
org-src = ob-comint org-pcomplete org-list org-faces org-entities noutline
outline easy-mmode org-version ob-emacs-lisp ob-core ob-eval = org-table
ol org-keys org-compat advice org-macs = org-loaddefs format-spec cal-menu
calendar cal-loaddefs = apropos edebug gv derived time-date subr-x
help-fns = radix-tree cl-print debug backtrace help-mode easymenu
find-func cl-loaddefs cl-lib 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 179913 11829)
(symbols 48 19738 = 1)
(strings 32 63869 1510)
(string-bytes 1 = 2209108)
(vectors 16 29528)
(vector-slots = 8 338974 19272)
(floats 8 213 69)
= (intervals 56 717 0)
(buffers 1000 19))

= --Apple-Mail=_1A510B1A-C5EB-4900-8A5D-0C8BA8656847-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 23:04:17 2021 Received: (at 45951) by debbugs.gnu.org; 19 Jan 2021 04:04:17 +0000 Received: from localhost ([127.0.0.1]:48998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1iFd-0006Rc-7x for submit@debbugs.gnu.org; Mon, 18 Jan 2021 23:04:17 -0500 Received: from quimby.gnus.org ([95.216.78.240]:53856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1iFb-0006RK-87 for 45951@debbugs.gnu.org; Mon, 18 Jan 2021 23:04:15 -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=Ilth3z2OC3TXtxKJ2eNQjN+MWWgkyGd1z2bsyV1N9WI=; b=hSvNTs1pgbpG+ueTF90IFd0Hsz IXLJ7neK10WUZepaRxumMSWClLTr/2oy79DwtALyxtHVH+uXhuSYp0CNOorcElx+SCl9dTQFNiBWP ZWPO3CFNIcBJzKv4UiFEFqbvs4LymemugLUnWBIsFi72zHn0AvALW99EuIXb6wlSu3G0=; 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 1l1iFI-000351-UP; Tue, 19 Jan 2021 05:04:08 +0100 From: Lars Ingebrigtsen To: Richard Sharman Subject: Re: bug#45951: 27.1; comint-redirect-results-list-from-process sometimes fails to skip over command if echoed References: <8CD405D0-5936-4D36-A700-F753B428A5C3@pobox.com> X-Now-Playing: The Durutti Column's _Without Mercy (4)_: "Dream of a Child" Date: Tue, 19 Jan 2021 05:03:54 +0100 In-Reply-To: <8CD405D0-5936-4D36-A700-F753B428A5C3@pobox.com> (Richard Sharman's message of "Sun, 17 Jan 2021 18:51:28 -0800") Message-ID: <877do9r2s5.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: > The latter problem can be fixed by calling comint-carriage-motion before > the test is done; the former by looking-at (regexp-quote command) > instead of just at command. 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: 45951 Cc: 45951@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: > The latter problem can be fixed by calling comint-carriage-motion before > the test is done; the former by looking-at (regexp-quote command) > instead of just at command. This bit seems to have been fixed in Emacs 28. > Example code to reproduce the problem: When testing your example code in Emacs 27, I just get the following error: comint-redirect-send-command-to-process: No prompt found or =E2=80=98comint= -prompt-regexp=E2=80=99 not set properly Do you have a recipe, starting from "emacs -Q"? --=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:24:52 2021 Received: (at 45951) by debbugs.gnu.org; 19 Jan 2021 04:24:52 +0000 Received: from localhost ([127.0.0.1]:49023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1iZY-0006yX-2S for submit@debbugs.gnu.org; Mon, 18 Jan 2021 23:24:52 -0500 Received: from quimby.gnus.org ([95.216.78.240]:54044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1iZV-0006yG-U2 for 45951@debbugs.gnu.org; Mon, 18 Jan 2021 23:24:50 -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=vwMcGx9iZ87i9HUJVdCScX6qvJKpQFgLa02vVsMDCXM=; b=o4CN+ku4CuhV4tmnyoC5p1gL3+ JgQOWu3t3DUeWFhgeU4711ss1/oDghRvxz/upssS71v9PGLjcfCYFI4N2KAzd4E4do2hi7WcSHPGn etR5527gmd3ARcIdUnorVIObgmpk9CxLEma1DS1Q95bQV5aVMlbmCpoj/ECd4xGDLp4k=; 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 1l1iZM-0003Ex-2g; Tue, 19 Jan 2021 05:24:42 +0100 From: Lars Ingebrigtsen To: Richard Sharman Subject: Re: bug#45951: 27.1; comint-redirect-results-list-from-process sometimes fails to skip over command if echoed References: <8CD405D0-5936-4D36-A700-F753B428A5C3@pobox.com> <877do9r2s5.fsf@gnus.org> X-Now-Playing: David Allred's _The Horizon_: "The Telescope" Date: Tue, 19 Jan 2021 05:24:39 +0100 In-Reply-To: <877do9r2s5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 19 Jan 2021 05:03:54 +0100") Message-ID: <87v9btpn94.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: Lars Ingebrigtsen writes: > comint-redirect-send-command-to-process: No prompt found or > ‘comint-prompt-regexp’ not set properly > > Do you have a recipe, starting from "emacs -Q"? 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: 45951 Cc: 45951@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 (-) Lars Ingebrigtsen writes: > comint-redirect-send-command-to-process: No prompt found or > =E2=80=98comint-prompt-regexp=E2=80=99 not set properly > > Do you have a recipe, starting from "emacs -Q"? Oh, we have to `M-x shell' manually first, and then we don't get that error. But the `M-x example' just infloops for me -- this bit never completes: (while (and (null comint-redirect-completed) (accept-process-output process))) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 19 01:12:19 2021 Received: (at 45951) by debbugs.gnu.org; 19 Jan 2021 06:12:19 +0000 Received: from localhost ([127.0.0.1]:49164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1kFW-0001G1-Ul for submit@debbugs.gnu.org; Tue, 19 Jan 2021 01:12:19 -0500 Received: from quimby.gnus.org ([95.216.78.240]:55140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1kFV-0001Fp-R3 for 45951@debbugs.gnu.org; Tue, 19 Jan 2021 01:12:18 -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=9EFH1b72TdsGVUyJSkVlFS+Tltx55lx+IKeUF9rswUQ=; b=tYy3NuC+y1+GOqnWxnx3+egG4M LW7R4GoMYSQUU2plDhVKXV97IERruevtM2sVtu5DYMyn4zvyW+AIDTSAgoHyhqXUW/3s2Qkrjb52T OfichFDwrtcMt0a7LFcCxi0MfymhwXffriSTuSMYGu4GB4ccUvEaDu4qRXsKmCi8skSQ=; 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 1l1kFN-0004H8-8c; Tue, 19 Jan 2021 07:12:11 +0100 From: Lars Ingebrigtsen To: Richard Sharman Subject: Re: bug#45951: 27.1; comint-redirect-results-list-from-process sometimes fails to skip over command if echoed References: <8CD405D0-5936-4D36-A700-F753B428A5C3@pobox.com> <877do9r2s5.fsf@gnus.org> <2E84331E-C133-4324-9C76-B3CEB0904319@pobox.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEX28/LKr57EhkRG MS7///+IzENCAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UBEwYLGXaD/OkAAAGOSURBVDjLjZQLbsQw CETj7QUMvkCMLxDM/e/WAfLxbquqrLSxeB6YECfb9s8g7tRm/ZkXs2Gmvi50B1OziJCwLGFGWyOz 4wOMLEJxWUH/A9QAtvoRlL/BZbiMMNNsct/c2nHmPRtM4ctugDwKcbhquhGUCZAnNus07Che/QQN +bzjvI96gmLT8zNZ3epeskez7nnvgICpnQMUd7kCTDPA1yVIoqSWinEJRNpsTWvTdjiAgC+Ftpfs XhzAW3utBIb6lCPx1tXOUKWSDzFBuQFM8gVQh3KAZnvOfP4E5GfDhLHFQZcTTEEHhsN9S9DE/0yl yxsQzFvpBUAfoA9MGEdT+QMM9KAS97+CGcDP7MQSA3oUjytXPGA8AJobCID9DtZYwVjSb8BNzTwn /rzegbeBJQnAXBPwGD5fHRKKmcezd0woDM+BrPACuPvrh92dqT+AO7ZJ9KCON/cGJP7z0x4LWnv4 PuyHwEvpCT6/DpdiFno+DqVSlVS0+eIXI8hdUO379f5pQeDUFOzGolaO/Df9f4gWmsdRPgAAACV0 RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wMS0xOVQwNjoxMToyNSswMDowMAg/BA4AAAAldEVYdGRhdGU6 bW9kaWZ5ADIwMjEtMDEtMTlUMDY6MTE6MjUrMDA6MDB5YryyAAAAAElFTkSuQmCC X-Now-Playing: Slick's _For Discos Only (2)_: "Space Bass (Special 12Inch Disco Mix)" Date: Tue, 19 Jan 2021 07:12:08 +0100 In-Reply-To: <2E84331E-C133-4324-9C76-B3CEB0904319@pobox.com> (Richard Sharman's message of "Mon, 18 Jan 2021 21:07:54 -0800") Message-ID: <87eeiho3pj.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: (Please keep the debbugs address in the CC header -- otherwise the bug tracker won't receive the message. Resent to put it into the tracker.) Richard Sharman writes: >> On Jan 18, 2021, at 8:03 PM, Lars Ingebrigtsen wrote: >> >> Richard Sharman writes: >> >>> The latter problem can be fixed by calling comint-carriage-motion be [...] 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: 45951 Cc: 45951@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 (-) (Please keep the debbugs address in the CC header -- otherwise the bug tracker won't receive the message. Resent to put it into the tracker.) Richard Sharman writes: >> On Jan 18, 2021, at 8:03 PM, Lars Ingebrigtsen wrote: >>=20 >> Richard Sharman writes: >>=20 >>> The latter problem can be fixed by calling comint-carriage-motion before >>> the test is done; the former by looking-at (regexp-quote command) >>> instead of just at command. >>=20 >> This bit seems to have been fixed in Emacs 28. > > Ok, thanks. > >> On Jan 18, 2021, at 8:24 PM, Lars Ingebrigtsen wrote: >>=20 >> Lars Ingebrigtsen writes: >>=20 >>> comint-redirect-send-command-to-process: No prompt found or >>> =E2=80=98comint-prompt-regexp=E2=80=99 not set properly >>>=20 >>> Do you have a recipe, starting from "emacs -Q"? >>=20 >> Oh, we have to `M-x shell' manually first, and then we don't get that >> error. >>=20 > > Yes, I think that=E2=80=99s another bug I was going to look into but didn= =E2=80=99t. > After the M-x shell it works. > >> But the `M-x example' just infloops for me -- this bit never completes: >>=20 >> (while (and (null comint-redirect-completed) >> (accept-process-output process))) >>=20 > > I saw that once but couldn=E2=80=99t reproduce it. I *think* it happened = when > there was a comint process that had terminated (abnormally perhaps?) I > tried to see why accept-process-output didn=E2=80=99t return but it was in > C-code and I didn=E2=80=99t feel up to chasing it. I think I manually de= leted > the process but I may have restarted emacs; after that I didn=E2=80=99t s= ee it > happen again. > =E2=80=A6 > I tried running example.el just now from an emacs -Q and apart from > the =E2=80=9Cno prompt found=E2=80=9D it works fine; I haven=E2=80=99t be= en able to reproduce > the problem of accept-process-output not returning. > > Richard From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 30 08:29:28 2021 Received: (at 45951) by debbugs.gnu.org; 30 Jul 2021 12:29:28 +0000 Received: from localhost ([127.0.0.1]:59313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Rdo-0004Tq-B1 for submit@debbugs.gnu.org; Fri, 30 Jul 2021 08:29:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Rdm-0004TU-Dy for 45951@debbugs.gnu.org; Fri, 30 Jul 2021 08:29:27 -0400 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=7yL/Elj6HVfwZ0vJh0ZPol5UsTQ1dxOWk+tw4JRStGk=; b=Aqt0Ac5eScCPPW0UO7Fi2xQgTC K93qWwq4XIqSNuvqOxPMz3JUZ44uGayMDVMk33mcSYCLffsK9p5lYg2bwxk1wJGjF3eVPcdSYsJiM iHUkCCAD3Fyl02heGcGkXF90b1or7xEcQHAaRxFSJmM2pHe5ko9ZofHJbZA4gjvNaFdY=; Received: from 2.149.45.105.tmi.telenormobil.no ([2.149.45.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9Rdc-0007Nw-2F; Fri, 30 Jul 2021 14:29:18 +0200 From: Lars Ingebrigtsen To: Richard Sharman Subject: Re: bug#45951: 27.1; comint-redirect-results-list-from-process sometimes fails to skip over command if echoed References: <8CD405D0-5936-4D36-A700-F753B428A5C3@pobox.com> <877do9r2s5.fsf@gnus.org> <2E84331E-C133-4324-9C76-B3CEB0904319@pobox.com> <87eeiho3pj.fsf@gnus.org> Date: Fri, 30 Jul 2021 14:29:14 +0200 In-Reply-To: <87eeiho3pj.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 19 Jan 2021 07:12:08 +0100") Message-ID: <87sfzwm1d1.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: Lars Ingebrigtsen writes: >> I tried running example.el just now from an emacs -Q and apart from >> the “no prompt found” it works fine; I haven’t been able to reproduce >> the problem of accept-process-output not return [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45951 Cc: 45951@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: -3.3 (---) Lars Ingebrigtsen writes: >> I tried running example.el just now from an emacs -Q and apart from >> the =E2=80=9Cno prompt found=E2=80=9D it works fine; I haven=E2=80=99t b= een able to reproduce >> the problem of accept-process-output not returning. This was half a year ago, so I'm guessing this now works as it should (I haven't re-tried the test case), so I'm closing this bug report. If this is still a problem in Emacs 28, please respond to the debbugs address and we'll reopen. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 30 08:29:36 2021 Received: (at control) by debbugs.gnu.org; 30 Jul 2021 12:29:36 +0000 Received: from localhost ([127.0.0.1]:59316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Rdv-0004UF-LQ for submit@debbugs.gnu.org; Fri, 30 Jul 2021 08:29:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Rdr-0004Tb-Lw for control@debbugs.gnu.org; Fri, 30 Jul 2021 08:29:31 -0400 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=x8BS1EeyNFg12xYMvIdelBv+YjIii5P7pLnA3fqBP/s=; b=vIRDBaNpggQCJII9uE0O/x0OlJ bZnhusj+RYXGKT83IfDT4mNYl91sY2xAPZSD3RylvkFFCzOrGsszEOlJpik8mWHcC0aCJYq8clFwh nz72c0gSnzX+OAGV5f8EnA/p/affBLNwZ3Yp+dHfzwWb/b8UbS3BicW7Nb3596rtxLwU=; Received: from 2.149.45.105.tmi.telenormobil.no ([2.149.45.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9Rdj-0007O5-S4 for control@debbugs.gnu.org; Fri, 30 Jul 2021 14:29:26 +0200 Date: Fri, 30 Jul 2021 14:29:22 +0200 Message-Id: <87r1fgm1ct.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #45951 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: close 45951 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 0.0 TVD_RCVD_IP Message was received from an IP address -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 (---) close 45951 quit From unknown Sat Jun 21 03:20:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 28 Aug 2021 11:24:05 +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