From unknown Fri Jun 20 07:20:09 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#42662 <42662@debbugs.gnu.org> To: bug#42662 <42662@debbugs.gnu.org> Subject: Status: 27.1; `comint-redirect-results-list-from-process' treats COMMAND as a regexp Reply-To: bug#42662 <42662@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:20:09 +0000 retitle 42662 27.1; `comint-redirect-results-list-from-process' treats COMM= AND as a regexp reassign 42662 emacs submitter 42662 Phil Sainty severity 42662 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 01 23:27:26 2020 Received: (at submit) by debbugs.gnu.org; 2 Aug 2020 03:27:26 +0000 Received: from localhost ([127.0.0.1]:41338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k24ej-0004XX-Rc for submit@debbugs.gnu.org; Sat, 01 Aug 2020 23:27:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:57538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k24eh-0004XN-QN for submit@debbugs.gnu.org; Sat, 01 Aug 2020 23:27:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k24eh-0001KA-JS for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2020 23:27:23 -0400 Received: from smtp-1.orcon.net.nz ([60.234.4.34]:45105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k24ef-0001fZ-GX for bug-gnu-emacs@gnu.org; Sat, 01 Aug 2020 23:27:23 -0400 Received: from [101.53.216.96] (port=26472 helo=[192.168.20.103]) by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1k24eX-0001mm-JZ for bug-gnu-emacs@gnu.org; Sun, 02 Aug 2020 15:27:13 +1200 From: Phil Sainty Subject: 27.1; `comint-redirect-results-list-from-process' treats COMMAND as a regexp To: bug-gnu-emacs@gnu.org Message-ID: Date: Sun, 2 Aug 2020 15:27:17 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------374067941600B9861E6F1F67" Content-Language: en-GB X-GeoIP: NZ Received-SPF: pass client-ip=60.234.4.34; envelope-from=psainty@orcon.net.nz; helo=smtp-1.orcon.net.nz X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/01 23:27:14 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: submit 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.6 (--) This is a multi-part message in MIME format. --------------374067941600B9861E6F1F67 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit I encountered this when sending a COMMAND ending in a backslash to the inferior comint process, and getting Debugger entered--Lisp error: (invalid-regexp "Trailing backslash"). E.g. M-x comint-run RET cat RET M-: (comint-redirect-results-list "\\" ".+" 0) Debugger entered--Lisp error: (invalid-regexp "Trailing backslash") (looking-at "\\") (comint-redirect-results-list-from-process # "\\" ".*" 0) (comint-redirect-results-list "\\" ".*" 0) (eval (comint-redirect-results-list "\\" ".*" 0) nil) (eval-expression (comint-redirect-results-list "\\" ".*" 0) nil nil 127) (funcall-interactively eval-expression (comint-redirect-results-list "\\" ".*" 0) nil nil 127) (call-interactively eval-expression nil nil) (command-execute eval-expression) Patch attached. Shall I commit this to emacs-27? -Phil In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2020-08-02 built on shodan Repository revision: f54ddb0198640e38c1d34bf6031ff5117c117c85 Repository branch: emacs-27 Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: Ubuntu 18.04.4 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --prefix=/home/phil/emacs/27.0/usr/local --with-x-toolkit=lucid --without-sound' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG DBUS GSETTINGS GLIB NOTIFY INOTIFY GNUTLS LIBXML2 FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS JSON PDUMPER LCMS2 GMP Important settings: value of $LANG: en_NZ.UTF-8 locale-coding-system: utf-8 Major mode: Dired by name Minor modes in effect: show-paren-mode: t minibuffer-depth-indicate-mode: t winner-mode: t global-hl-line-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny format-spec rfc822 mml 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 dired-x easymenu paren mb-depth winner ring hl-line dired dired-loaddefs advice tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd 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 dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 49706 7202) (symbols 48 6423 1) (strings 32 17502 1501) (string-bytes 1 554965) (vectors 16 9973) (vector-slots 8 130782 9032) (floats 8 29 25) (intervals 56 250 0) (buffers 1000 13)) --------------374067941600B9861E6F1F67 Content-Type: text/x-patch; charset=UTF-8; name="0001-Fix-usage-of-literal-text-as-regexp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Fix-usage-of-literal-text-as-regexp.patch" >From be456b8592429f0542113e0a433a6b977135d094 Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Sun, 2 Aug 2020 13:03:27 +1200 Subject: [PATCH] Fix usage of literal text as regexp * lisp/comint.el (comint-redirect-results-list-from-process): Use 'regexp-quote' when checking whether literal string COMMAND was inserted into the buffer. --- lisp/comint.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/comint.el b/lisp/comint.el index bf376a0..3e76c5d 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -3835,7 +3835,7 @@ comint-redirect-results-list-from-process (set-buffer output-buffer) (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)) -- 2.8.3 --------------374067941600B9861E6F1F67-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 02 10:09:36 2020 Received: (at 42662) by debbugs.gnu.org; 2 Aug 2020 14:09:36 +0000 Received: from localhost ([127.0.0.1]:43042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2EgC-0007BM-29 for submit@debbugs.gnu.org; Sun, 02 Aug 2020 10:09:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k2Eg9-0007B6-O3 for 42662@debbugs.gnu.org; Sun, 02 Aug 2020 10:09:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50778) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2Eg4-0002jD-9e; Sun, 02 Aug 2020 10:09:28 -0400 Received: from [176.228.60.248] (port=4558 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k2Eg3-0007U7-NL; Sun, 02 Aug 2020 10:09:28 -0400 Date: Sun, 02 Aug 2020 17:09:12 +0300 Message-Id: <83a6zdcf7b.fsf@gnu.org> From: Eli Zaretskii To: Phil Sainty In-Reply-To: (message from Phil Sainty on Sun, 2 Aug 2020 15:27:17 +1200) Subject: Re: bug#42662: 27.1; `comint-redirect-results-list-from-process' treats COMMAND as a regexp References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 42662 Cc: 42662@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 (---) > From: Phil Sainty > Date: Sun, 2 Aug 2020 15:27:17 +1200 > > Patch attached. Shall I commit this to emacs-27? Please wait until after 27.1 is released. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 12 09:36:00 2020 Received: (at 42662-done) by debbugs.gnu.org; 12 Aug 2020 13:36:00 +0000 Received: from localhost ([127.0.0.1]:43350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5qvA-0007KF-5b for submit@debbugs.gnu.org; Wed, 12 Aug 2020 09:36:00 -0400 Received: from smtp-1.orcon.net.nz ([60.234.4.34]:44119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5qv8-0007K6-25 for 42662-done@debbugs.gnu.org; Wed, 12 Aug 2020 09:35:58 -0400 Received: from [101.53.216.96] (port=23372 helo=[192.168.20.103]) by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1k5qv6-0005vS-5q; Thu, 13 Aug 2020 01:35:56 +1200 Subject: Re: bug#42662: 27.1; `comint-redirect-results-list-from-process' treats COMMAND as a regexp To: 42662-done@debbugs.gnu.org References: <83a6zdcf7b.fsf@gnu.org> From: Phil Sainty Message-ID: Date: Thu, 13 Aug 2020 01:35:55 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <83a6zdcf7b.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42662-done Cc: Eli Zaretskii 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.7 (-) On 3/08/20 2:09 am, Eli Zaretskii wrote: >> Patch attached. Shall I commit this to emacs-27? > > Please wait until after 27.1 is released. Pushed to emacs-27; closing this bug. -Phil From unknown Fri Jun 20 07:20:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 10 Sep 2020 11:24:11 +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