From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 27 22:21:36 2022 Received: (at submit) by debbugs.gnu.org; 28 Mar 2022 02:21:36 +0000 Received: from localhost ([127.0.0.1]:56885 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYf0i-0002yv-5X for submit@debbugs.gnu.org; Sun, 27 Mar 2022 22:21:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:41326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYf0g-0002ym-43 for submit@debbugs.gnu.org; Sun, 27 Mar 2022 22:21:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYf0f-0006z3-89 for bug-gnu-emacs@gnu.org; Sun, 27 Mar 2022 22:21:33 -0400 Received: from [2607:f8b0:4864:20::102e] (port=41853 helo=mail-pj1-x102e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYf0Z-00043r-HW for bug-gnu-emacs@gnu.org; Sun, 27 Mar 2022 22:21:30 -0400 Received: by mail-pj1-x102e.google.com with SMTP id l4-20020a17090a49c400b001c6840df4a3so14107674pjm.0 for ; Sun, 27 Mar 2022 19:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:subject:to:message-id:date:mime-version:content-language; bh=UzZWQu4EkKsUjc6+EVOH/qFScvSF6FqRPzOVFSuJjRE=; b=FstrzTolYW/bqeiHgiuE4jOOpHHXCG1L0fB48XtYSfxKGq5rDXQ8IpNq+SH0NAT6C4 2GiRmXNNYzLhrFac7ITVTmUSKO4lN6BiaNQzy8hKwC2Iq8YMAJTVLTkfZfmRhAuCZiHa NyFlELj+SHYs7AbckQ5Uqr2yid8XD20Czn4ZadGfDwfdKSN+aYwU5h8TyNxsxUjwwqhZ Zq6MVwwECVARH8MsHOMyWQL97rUA8zRnEhB6OOf+WOxHknNe2ZKYQtBOa7ZDzNu9SbZ4 j9QrBBSyzSJJV8pv0Pe/OivyDIyGKOCFDMfQ9EPew3MKE4ZsOw0co5yv/bJwf7dNqjNH LXuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:subject:to:message-id:date:mime-version :content-language; bh=UzZWQu4EkKsUjc6+EVOH/qFScvSF6FqRPzOVFSuJjRE=; b=J20BLcWoPMRHisHpOaUa50gmPLkxgZrGmu6v8+fjg5tkTfsWhzkY7NVWenAecFc9pE ovxfMJ01s1rghV886Qu0RQyZ6C73Gfu1mtE8ju3ahuOrwJNltTlmJOSDLUnFYKuCd5od qeAdQ3gJDzAD1xcSPKY8NOGdh6W+chRV7pndlzJTQpB7nTdrBpp3G45qogEB6VZdLRDW y5SwqaBJTFdTQ74GayAeDwE6ez/zoC0/7gkqrpRUPXPJVBv1uZoEdGBEKnPkQQ9rpFKY beVEJlo4DlKD3xyCZ949HwUg+Mpvu2zoEL2Iw/KfDCoh9UecpZxbOgdG1QlB7GIQgofI wi2g== X-Gm-Message-State: AOAM533HPntT4ixW+z1L2DyANJB2P3QptCiWQVfrRX7BWU0sQ6PkADbD S6+WeIs3rVQc5xpXylp6VpffwldnqrI= X-Google-Smtp-Source: ABdhPJzqcHYQ2ONS6UGqGU/ec4fwQJ2Yca5tooAlw7E7mVFravqXojuIV07xyJUA9usROFgftPq/IA== X-Received: by 2002:a17:90b:1c07:b0:1c7:5324:c68e with SMTP id oc7-20020a17090b1c0700b001c75324c68emr26517329pjb.202.1648434078398; Sun, 27 Mar 2022 19:21:18 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id j18-20020a633c12000000b0038204629cc9sm11477714pga.10.2022.03.27.19.21.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Mar 2022 19:21:17 -0700 (PDT) X-Mozilla-News-Host: news://news.gmane.org:119 From: Jim Porter Subject: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks To: bug-gnu-emacs@gnu.org Message-ID: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> Date: Sun, 27 Mar 2022 19:21:17 -0700 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------65E6C01A67BB579D5821A1F0" Content-Language: en-US X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102e (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=jporterbugs@gmail.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) This is a multi-part message in MIME format. --------------65E6C01A67BB579D5821A1F0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit From "emacs -Q --eval '(eshell)': ~ $ (eq 'foo nil) Expecting completion of delimiter ' ... M-: (unload-feature 'em-extpipe) ~ $ (eq 'foo nil) ;; No output, since it returns nil. This is correct. (As an ironic twist, you'd normally be able to run "(unload-feature 'em-extpipe)" as a command in Eshell, but this bug prevents that from working.) I don't fully understand all the details of the code in lisp/eshell/em-extpipe.el yet, but I think this is the culprit: (while (or (eshell-parse-lisp-argument) (eshell-parse-backslash) (eshell-parse-double-quote) (eshell-parse-literal-quote))) In particular, since there are 3 single-quotes, `eshell-parse-literal-quote' throws an `eshell-incomplete' error, which gums up the works. The attached patch resolves the issue for me, but I'm not sure if it's the best strategy. If possible, I think it would be better for `eshell-parse-external-pipeline' to solely focus on finding the external pipe operators ("*|", "*<", and "*>")[1] and then for `eshell-rewrite-external-pipeline' to prepare the command string to pass to sh. This would also have the advantage[2] of making it possible to support a richer set of Eshell features with external pipes, such as the following: ~ $ echo $(message "[%s]" "hi") *| cat zsh:1: command not found: message (If you remove the "*", this outputs "[hi]", and it should be technically possible to make this work with external pipes too, provided it executes the Lisp code before generating the command string for sh.) [1] See `eshell-parse-delimiter' for an example of how that might be implemented. [2] Well, maybe there's room for debate on what the right behavior here is. --------------65E6C01A67BB579D5821A1F0 Content-Type: text/plain; charset=UTF-8; name="0001-Make-Eshell-s-extpipe-more-lenient-when-looking-for-.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-Make-Eshell-s-extpipe-more-lenient-when-looking-for-.pa"; filename*1="tch" RnJvbSBmYWI0OGEyOGZmODBmMWM3NGYyZDUwZDRmNjllZGIwNTZmODhkMTE5IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gUG9ydGVyIDxqcG9ydGVyYnVnc0BnbWFpbC5j b20+CkRhdGU6IFN1biwgMjcgTWFyIDIwMjIgMTk6MDQ6NDIgLTA3MDAKU3ViamVjdDogW1BB VENIXSBNYWtlIEVzaGVsbCdzIGV4dHBpcGUgbW9yZSBsZW5pZW50IHdoZW4gbG9va2luZyBm b3IgaXRzCiBvcGVyYXRvcnMKClRoaXMgY291bGQgY2F1c2Ugc29tZSBlcnJvcnMgd2hlbiBl eGVjdXRpbmcgRXNoZWxsIGNvbW1hbmRzIHdpdGggYW4Kb2RkIG51bWJlciBvZiBxdW90YXRp b24gbWFya3MsIHN1Y2ggYXMgIihlcSAnZm9vIG5pbCkiLgoKKiBsaXNwL2VzaGVsbC9lbS1l eHRwaXBlLmVsIChlc2hlbGwtcGFyc2UtZXh0ZXJuYWwtcGlwZWxpbmUpOiBDYXRjaAonZXNo ZWxsLWluY29tcGxldGUnIGVycm9ycy4KCiogdGVzdC9saXNwL2VzaGVsbC9lc2hlbGwtdGVz dHMuZWwKKGVzaGVsbC10ZXN0L2xpc3AtY29tbWFuZC13aXRoLXF1b3RlKTogTmV3IHRlc3Qu Ci0tLQogbGlzcC9lc2hlbGwvZW0tZXh0cGlwZS5lbCAgICAgICAgfCA5ICsrKysrLS0tLQog dGVzdC9saXNwL2VzaGVsbC9lc2hlbGwtdGVzdHMuZWwgfCA0ICsrKysKIDIgZmlsZXMgY2hh bmdlZCwgOSBpbnNlcnRpb25zKCspLCA0IGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL2xp c3AvZXNoZWxsL2VtLWV4dHBpcGUuZWwgYi9saXNwL2VzaGVsbC9lbS1leHRwaXBlLmVsCmlu ZGV4IGViNWIzYmZlMWQuLmU3YjQyMTk4MmEgMTAwNjQ0Ci0tLSBhL2xpc3AvZXNoZWxsL2Vt LWV4dHBpcGUuZWwKKysrIGIvbGlzcC9lc2hlbGwvZW0tZXh0cGlwZS5lbApAQCAtMTA1LDEw ICsxMDUsMTEgQEAgZXNoZWxsLXBhcnNlLWV4dGVybmFsLXBpcGVsaW5lCiAgICAgICAgICAg ICAgICAgICAgICAgIChpZiAocmUtc2VhcmNoLWZvcndhcmQgcGF0IG5leHQgdCkKICAgICAg ICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAnZm91bmQgKG1hdGNoLWJlZ2lubmluZyAx KSkKICAgICAgICAgICAgICAgICAgICAgICAgICAoZ290by1jaGFyIG5leHQpCi0gICAgICAg ICAgICAgICAgICAgICAgICAgKHdoaWxlIChvciAoZXNoZWxsLXBhcnNlLWxpc3AtYXJndW1l bnQpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZXNoZWxsLXBhcnNl LWJhY2tzbGFzaCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlc2hl bGwtcGFyc2UtZG91YmxlLXF1b3RlKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGVzaGVsbC1wYXJzZS1saXRlcmFsLXF1b3RlKSkpCisgICAgICAgICAgICAgICAg ICAgICAgICAgKGNhdGNoICdlc2hlbGwtaW5jb21wbGV0ZQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgKHdoaWxlIChvciAoZXNoZWxsLXBhcnNlLWxpc3AtYXJndW1lbnQpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlc2hlbGwtcGFyc2UtYmFja3Ns YXNoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZXNoZWxsLXBh cnNlLWRvdWJsZS1xdW90ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGVzaGVsbC1wYXJzZS1saXRlcmFsLXF1b3RlKSkpKQogICAgICAgICAgICAgICAgICAg ICAgICAgIDs7IEd1YXJkIGFnYWluc3QgYW4gaW5maW5pdGUgbG9vcCBpZiBub25lIG9mCiAg ICAgICAgICAgICAgICAgICAgICAgICAgOzsgdGhlIHBhcnNlcnMgbW92ZWQgdXMgZm9yd2Fy ZC4KICAgICAgICAgICAgICAgICAgICAgICAgICAodW5sZXNzIChvciAoPiAocG9pbnQpIG5l eHQpIChlb2JwKSkKZGlmZiAtLWdpdCBhL3Rlc3QvbGlzcC9lc2hlbGwvZXNoZWxsLXRlc3Rz LmVsIGIvdGVzdC9saXNwL2VzaGVsbC9lc2hlbGwtdGVzdHMuZWwKaW5kZXggZTMxZGIwN2M2 MS4uMWUzMDNmNzBlNSAxMDA2NDQKLS0tIGEvdGVzdC9saXNwL2VzaGVsbC9lc2hlbGwtdGVz dHMuZWwKKysrIGIvdGVzdC9saXNwL2VzaGVsbC9lc2hlbGwtdGVzdHMuZWwKQEAgLTQ0LDYg KzQ0LDEwIEBAIGVzaGVsbC10ZXN0L2xpc3AtY29tbWFuZAogICAiVGVzdCBgZXNoZWxsLWNv bW1hbmQtcmVzdWx0JyB3aXRoIGFuIGVsaXNwIGNvbW1hbmQuIgogICAoc2hvdWxkIChlcXVh bCAoZXNoZWxsLXRlc3QtY29tbWFuZC1yZXN1bHQgIigrIDEgMikiKSAzKSkpCiAKKyhlcnQt ZGVmdGVzdCBlc2hlbGwtdGVzdC9saXNwLWNvbW1hbmQtd2l0aC1xdW90ZSAoKQorICAiVGVz dCBgZXNoZWxsLWNvbW1hbmQtcmVzdWx0JyB3aXRoIGFuIGVsaXNwIGNvbW1hbmQgY29udGFp bmluZyBhIHF1b3RlLiIKKyAgKHNob3VsZCAoZXF1YWwgKGVzaGVsbC10ZXN0LWNvbW1hbmQt cmVzdWx0ICIoZXEgJ2ZvbyBuaWwpIikgbmlsKSkpCisKIChlcnQtZGVmdGVzdCBlc2hlbGwt dGVzdC9mb3ItbG9vcCAoKQogICAiVGVzdCBgZXNoZWxsLWNvbW1hbmQtcmVzdWx0JyB3aXRo IGEgZm9yIGxvb3AuLiIKICAgKGxldCAoKHByb2Nlc3MtZW52aXJvbm1lbnQgKGNvbnMgImZv byIgcHJvY2Vzcy1lbnZpcm9ubWVudCkpKQotLSAKMi4yNS4xCgo= --------------65E6C01A67BB579D5821A1F0-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 07:46:22 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 11:46:23 +0000 Received: from localhost ([127.0.0.1]:38106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZtFu-0006ea-G5 for submit@debbugs.gnu.org; Thu, 31 Mar 2022 07:46:22 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZtFs-0006YG-QQ for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 07:46:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=rkHRnAfD670T6puldWhTn9Da1wTtk4JRaS3vxrTlYkM=; b=HxvkwNJJuLPjRGmi5IryH/9GHH zUlAEP6sYJGZjcfXuY1jEiYfm7UW2E7qZzvw/JfYaXvLTpcKwALwnuy204Wtfw+imCguUofQgeaOf Fvn+hRyoORAlj+W4aQp6avJzRETw18sAw8vmQV0A5/evOyp08qDrh7wZBScM/yjBzt3Y=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZtFk-000391-26; Thu, 31 Mar 2022 13:46:14 +0200 From: Lars Ingebrigtsen To: Jim Porter Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> Date: Thu, 31 Mar 2022 13:46:09 +0200 In-Reply-To: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> (Jim Porter's message of "Sun, 27 Mar 2022 19:21:17 -0700") Message-ID: <87ilru73b2.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: Jim Porter writes: > The attached patch resolves the issue for me, but I'm not sure if it's > the best strategy. If possible, I think it would be better for > `eshell-parse-external-pipeline' to solely focus on finding [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 54603 Cc: 54603@debbugs.gnu.org, John Wiegley 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 (---) Jim Porter writes: > The attached patch resolves the issue for me, but I'm not sure if it's > the best strategy. If possible, I think it would be better for > `eshell-parse-external-pipeline' to solely focus on finding the > external pipe operators ("*|", "*<", and "*>")[1] and then for > `eshell-rewrite-external-pipeline' to prepare the command string to > pass to sh. This would also have the advantage[2] of making it > possible to support a richer set of Eshell features with external > pipes, such as the following: I think that sounds like a good idea (but I don't use eshell regularly, so I don't really have much of an opinion here). Perhaps John does; added to the CCs. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 12:26:34 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 16:26:35 +0000 Received: from localhost ([127.0.0.1]:39622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZxd4-0002cg-MY for submit@debbugs.gnu.org; Thu, 31 Mar 2022 12:26:34 -0400 Received: from mail-pj1-f51.google.com ([209.85.216.51]:36691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZxd3-0002cU-Rt for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 12:26:34 -0400 Received: by mail-pj1-f51.google.com with SMTP id p4-20020a17090ad30400b001c7ca87c05bso2835337pju.1 for <54603@debbugs.gnu.org>; Thu, 31 Mar 2022 09:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=WejVH0VOuDzxf5zXZLzQ/uZCv1NTfU7ufwkUuPeQ6ms=; b=PPnZvSFxYQyWkovgIZW1j/VylNdE1rTA4Ey4D4ZuF8C3EMggRRX2tl0t0vh2UIBb/e xi87ebIXLi0XU/ajF0o0LMDbS009ut+nYF19wK3DScTpPkkAw/HQzCG7Dofce9WzqU3H p1daMCXrc+NuAw3jainVDqJ313m3v14pf2cAui+d/vhZlGcXC2xX89mHvqI4FwIVql13 52swCIWwjaF/YI2jQccFTZektXNdrYrb8DW+MHKycUTqrjtrDTDFhJUu+XysJ06dzVNz uynuX8ddF6NvBHaVij/Y/n/NUcn9pkK3j3Rlz0gWB0N+TtWmGJ0jjwpSYG2HDoV3RhqP YP1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WejVH0VOuDzxf5zXZLzQ/uZCv1NTfU7ufwkUuPeQ6ms=; b=2A41SQlvvykzr7RUya0iOJAc4S7asYvkSVfjRZhoFwFA7Ow6VuH/anh+Ij29SD/3Jo N9ReijUTUBGKDdQn8A8rIPxX8wqvwSacjprxPiM+IXCOS1KXuXT84zJ4zQeiPbTsJUy1 SRAIVifnJe+mXDmNVdychajq3xXbDNjWpZv4XKZJKZInzW+ooMr7sdL5rdZwNJo6zbWw Irud+reCK6Xy+QLPrK2CXxZwutjLvUU36y/v1mMYUDagw855eM554SFza3B792ABGS/S 37O+KN7xMgRwi1fUuq9p6+ZtT9BZNE2kuFqwIk2egT0uA39+ANN3zTb4qBwAn6mPbfYl bAJg== X-Gm-Message-State: AOAM532oTMX1TJQ1EHsLFPuF3wGFDeRzl9yuRRFZOeCEsneWIHkf1UuG UEJrGadxIsdd7gTBWYceUT4= X-Google-Smtp-Source: ABdhPJxBwCyGqhZV8icJ0WOALWhuyWMZnV7Q/GLUDGjkT5lsGL6ejATa/Wrl/W47SW+390bDF3SKvg== X-Received: by 2002:a17:902:ac88:b0:153:a34f:5648 with SMTP id h8-20020a170902ac8800b00153a34f5648mr6221567plr.121.1648743987851; Thu, 31 Mar 2022 09:26:27 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id x7-20020a056a00188700b004fae6f0d3e5sm29803351pfh.175.2022.03.31.09.26.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 09:26:27 -0700 (PDT) Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks To: Lars Ingebrigtsen References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <87ilru73b2.fsf@gnus.org> From: Jim Porter Message-ID: <88e92487-f116-6d4f-e075-9cfb8f8edef6@gmail.com> Date: Thu, 31 Mar 2022 09:26:28 -0700 MIME-Version: 1.0 In-Reply-To: <87ilru73b2.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54603 Cc: 54603@debbugs.gnu.org, John Wiegley , Sean Whitton 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 (-) On 3/31/2022 4:46 AM, Lars Ingebrigtsen wrote: > Jim Porter writes: > >> The attached patch resolves the issue for me, but I'm not sure if it's >> the best strategy. If possible, I think it would be better for >> `eshell-parse-external-pipeline' to solely focus on finding the >> external pipe operators ("*|", "*<", and "*>")[1] and then for >> `eshell-rewrite-external-pipeline' to prepare the command string to >> pass to sh. This would also have the advantage[2] of making it >> possible to support a richer set of Eshell features with external >> pipes, such as the following: > > I think that sounds like a good idea (but I don't use eshell regularly, > so I don't really have much of an opinion here). Perhaps John does; > added to the CCs. CCing Sean as well, who implemented the extpipe module. (I probably should have done that in the initial report, but I'm not sure the right way to CC people when I'm mailing bug-gnu-emacs@; if the CCed person replies normally, wouldn't it make a new bug number? I'm sure this is in the debbugs documentation though, so I should sit down and read it sometime.) From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 12:50:54 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 16:50:54 +0000 Received: from localhost ([127.0.0.1]:39650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZy0b-0003Iz-S2 for submit@debbugs.gnu.org; Thu, 31 Mar 2022 12:50:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZy0a-0003In-Na for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 12:50:53 -0400 Received: from [2001:470:142:3::e] (port=35382 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZy0V-0007wI-7l; Thu, 31 Mar 2022 12:50:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=D6Zx5QKYdMv3vwM9ygkeX0gmwtQVmcI4RUPVtRtL+EQ=; b=ZD+jQEhLbQEE Ug/v2IrXCtTPnH+08F97gIHAPOfvleYbgLvGkHo/zJaYazhiANcBvSySPNlji4wTtYtwo1bmFdzu6 udueOyazDoUHdX+3mNVci0M5L2diRcUtsSyakB7ZxVpKZYub8E1KqNRMltx5WnBchzsEfAxCo099F z9lk4U75dKWi2LsRwF5OYInxuXzIJKQZ8souO7SVtZd1100BhnRYH8zOSOhMuwutbT/lVJyb0jauM KAZZllTutjmXHO3Paqw05kvKwIpHSp4Tjl+NaRwmkLfju41Bkm9mNmZw2bui0nE+DFvOR9IZebTum oR5MbJwem/BYX0YycgNvKg==; Received: from [87.69.77.57] (port=1385 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZy0U-0007Ng-MG; Thu, 31 Mar 2022 12:50:47 -0400 Date: Thu, 31 Mar 2022 19:50:57 +0300 Message-Id: <83v8vu5amm.fsf@gnu.org> From: Eli Zaretskii To: Jim Porter In-Reply-To: <88e92487-f116-6d4f-e075-9cfb8f8edef6@gmail.com> (message from Jim Porter on Thu, 31 Mar 2022 09:26:28 -0700) Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <87ilru73b2.fsf@gnus.org> <88e92487-f116-6d4f-e075-9cfb8f8edef6@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54603 Cc: larsi@gnus.org, 54603@debbugs.gnu.org, johnw@gnu.org, spwhitton@spwhitton.name 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: Jim Porter > Date: Thu, 31 Mar 2022 09:26:28 -0700 > Cc: 54603@debbugs.gnu.org, John Wiegley , > Sean Whitton > > (I probably should have done that in the initial report, but I'm not > sure the right way to CC people when I'm mailing bug-gnu-emacs@; if the > CCed person replies normally, wouldn't it make a new bug number? No, not as long as they respond with the same Subject. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 13:36:01 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 17:36:01 +0000 Received: from localhost ([127.0.0.1]:39689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZyiH-0004TJ-GI for submit@debbugs.gnu.org; Thu, 31 Mar 2022 13:36:01 -0400 Received: from mout.gmx.net ([212.227.15.18]:50561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZyiF-0004Sl-D7 for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 13:36:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648748150; bh=1UAZqSQCVop0nAv7kMTtnXymqpCP8DIq5H1481ky82M=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=j5GYk1sv5iAOHEwwobORnJK7HoEl0lSw7Dn0fBGOHuUrYzfoC5BOGhaYnzX3+DOvM duin7IzqH8KCxPnzHmwm6zuDqsVtPLsu0Aflh+IAsH9mlp70D2kByP6o7D26YejhoZ tnob4h6zlPCWFTQDeEe922YMD3fRoGm93crPhVFU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([213.220.151.59]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MTRR0-1nSBBq1SCS-00ToY2; Thu, 31 Mar 2022 19:35:50 +0200 From: Michael Albinus To: Jim Porter Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <87ilru73b2.fsf@gnus.org> <88e92487-f116-6d4f-e075-9cfb8f8edef6@gmail.com> Date: Thu, 31 Mar 2022 19:35:48 +0200 In-Reply-To: <88e92487-f116-6d4f-e075-9cfb8f8edef6@gmail.com> (Jim Porter's message of "Thu, 31 Mar 2022 09:26:28 -0700") Message-ID: <87czi2f2iz.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:8D5ebFSR06e+rj3XnFcr4bnu2t+/j8+bEFBm6jICQMwRmEI95u9 gBMGsV54Y3yDkhUPEYQpPwZEKfgWee0idYuIU8PzUDiBSuz6gIY/cFBYZSB/p98appGNKe4 BfHe2bsHzadyE1FWWV+4ocYgIn0aKf0W2Un/PR/3lKMntuEOIwSTlachc3984i5Me8vEsEh sWGbp+szDH7sGWVdysMPQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Ok8WpX+Q4D8=:pJtKvyKGok3M78eKnDhyA6 bimLICO10rITGrt//12l6wB22iHP7MMaY4fUQhfBWUlL33XTZyYKnib3WGrvGESe217jkyAWd oSPr/778tv05RNBINzN84I5tzYb/g5+5oRLZiyzjjHcmAavnT29dmeOLyJuz7q+OYr5z4pPtb Oetzet9ZEbxZHW0F0gdDsMpVY8MitbKB+S5zwYLf7evNnJ5Wsbqp2i87sz390INT/b/BTvKFN vp7GyzpzbMixqiNvRPXkPqnQ0/J6rnssMUmXguCOOL9Dt1sqz+9W405lPW9eZahBsNqBNrckU MF8Ju/V9TkJtMAzQRNpQmA20yeXl8xr8HO0cSkgrirU7VQccLoHe5eTuWs0wNYJZbbaPqxgQH ccXciPkqOe1VKUGhuWpWXmbVBxN0jzVwp2/AU1cWWTKPNeYmshmw8WArp6Ju+DX5VXMSTYlz4 T8H65KGjKPZtZBzM5R26Jy+hUutwnuZc6A4pfsUevxl6vLj8h8hsyxtNVnKCSw+Cg+oL0reDI xDbQ+YkFvZisx7m9OqkJQDCznN1bxoTt2LgeY/qYTnSl3wsWEOQGDbljNlZcpaE1RWOh2lSfN 1NceW5dBJl99fdbchwVdOctgCNoMtknbG0S6qHNl1MIG/El+3eenY09OEFlDyIkUInvlkBg/r pFr3KI1ehTrR1MH8UEgvTNKOqugbIz9HeGgLspK6YDfTMHpF+RE+77Z9La/AIDymSkTQ/7OI5 hDXjenN7z2bBRtvjvJf4OD1Cxl6ZfRQ2I5NAF4QwHqHl2eBZHO17e6E5sMBOZkmLZL+V/0XN8 4Md6QSlHw23oNrJ3MUPYWOMjlwrJ7Txnccl/iwrOTJ56Tf+/DCgXJrISyDnewZiu3f+kFC+hB GQWp4npdp229BdN69cUBeyopilV7c/2DC+8JvOCA9igQAeGM6zvQp94rw7O9flGkAvitrIthU t2wRJadS+cLEZp92wDj+oEAQNjEY/EN8pk3iPMb+xbdtoFIbJ3vEoEd2saeeir1FPRz37te69 Dw3Ylshh6juzKM2jYkmr5rq8gf61wpPhSIzNJ3BblpFsczbfmG9uxCrmw47vYOHa6Vs7NA6m/ fuSh9dFVSaYjMA= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54603 Cc: Lars Ingebrigtsen , 54603@debbugs.gnu.org, John Wiegley , Sean Whitton 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 (-) Jim Porter writes: Hi Jim, > (I probably should have done that in the initial report, but I'm not > sure the right way to CC people when I'm mailing bug-gnu-emacs@; if > the CCed person replies normally, wouldn't it make a new bug number? > I'm sure this is in the debbugs documentation though, so I should sit > down and read it sometime.) In the initial report, use an "X-Debbugs-Cc" header. See admin/notes/bugtracker. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 14:26:35 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 18:26:35 +0000 Received: from localhost ([127.0.0.1]:39762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZzVC-0005nM-UT for submit@debbugs.gnu.org; Thu, 31 Mar 2022 14:26:35 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:33403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZzVB-0005n4-8D for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 14:26:34 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D33065C00C9; Thu, 31 Mar 2022 14:26:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 31 Mar 2022 14:26:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=m73PLjqte/yXyX/6xiqfKd9VrXg2U+Z41xCkW/ USjjM=; b=eHqoIZ9fVFEaqK2pAqJqxrXSleulScG7x9CjZGp1+4XU6NwNmjr/7j N1TEuP311rV4c4ISCVZOtQEIM9y+8ZhHwYXyxjNc8xlyqL6xiY6L0lhNCoq76gVl hLxPgAbmvY6mJFHYDRa+n1TDNaSV/b182MmiEwOPAtLyUgpDHr5eir+/o3Lva1Uj igJGKxo73a4c9On9ePPhTxcb+OqGyKTlsKnlasHLWG9l/ZJvJLeCldvs7vn9yVa0 BLxs/Y9Ute9EiCvUkG3CHyACbb1qPMKPFlKz9mwRRBuPQT9n94Un2NDmLXcsCu9X 5+SeJc9Pr73DMcH8BUC3isoZrQGTMKyw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=m73PLjqte/yXyX/6x iqfKd9VrXg2U+Z41xCkW/USjjM=; b=buYx7XUQVUrx7aMhrMmotRgPsos9Dp9fE mjHoSAXkzEF3tjL+5vLQJ64TT8ntI43r4jdznai033GgplLIF6a70/XWYAcrOsXf z8tTNB7T1OS5M/Jt246e+/thAIw4gevjeSIAOGqavtT/+fP2SsfKRfllGrI5s4W5 bGW3/58hikchLZrEsaP333qz0HvrtYxbC1r03plgEhPtDrDrCJqsa5Q6iVUVvvp/ tgjzNSyxg6//P+8a/lG1gx8PjROYVzxlCR20gYWyb+tEM9V8x4llKC0Ms0fcy1Yd 0APfoxUm0Pl+jfJvjYA7eTS4nWST7a+PiQJHeEY3TSasoYNOEVf1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeigedguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfhgffffkgggtsehttd dttddtredtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhhhithhtohhn sehsphifhhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepleeggefgvdeije dvhfdugfegtefgkeekueeileejjeehudeggeefteeghfeuffeknecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfi hhihhtthhonhdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 31 Mar 2022 14:26:27 -0400 (EDT) Received: by melete.silentflame.com (Postfix, from userid 1000) id C303D7E0CA3; Thu, 31 Mar 2022 11:26:26 -0700 (MST) From: Sean Whitton To: Jim Porter , 54603@debbugs.gnu.org Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks In-Reply-To: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> User-Agent: Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Thu, 31 Mar 2022 11:26:26 -0700 Message-ID: <871qyij7vx.fsf@melete.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54603 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 (-) Hello Jim, On Sun 27 Mar 2022 at 07:21PM -07, Jim Porter wrote: > The attached patch resolves the issue for me, but I'm not sure if it's > the best strategy. Thank you for looking into this. I think however that the bug is not in the em-extpipe.el, and so your patch is probably not the best fix. The call to `eshell-parse-lisp-argument' is meant to handle precisely your case. It isn't doing atm, and I think it might actually be a bug over in that function. To see this, with point on the first nonblank char of each of these lines, do 'M-: (eshell-parse-lisp-argument) RET': #'foo 'foo In the first case it successfully parses it and skips point forward, but in the latter case it does not. But I think it should, right? > If possible, I think it would be better for > `eshell-parse-external-pipeline' to solely focus on finding the > external pipe operators ("*|", "*<", and "*>")[1] and then for > `eshell-rewrite-external-pipeline' to prepare the command string to > pass to sh. This would also have the advantage[2] of making it > possible to support a richer set of Eshell features with external > pipes, such as the following: > > ~ $ echo $(message "[%s]" "hi") *| cat > zsh:1: command not found: message > > (If you remove the "*", this outputs "[hi]", and it should be > technically possible to make this work with external pipes too, provided > it executes the Lisp code before generating the command string for sh.) In this case I would want the whole '$(message ..' construction to go to the external shell. Although extpipe supports some combinations of piping Eshell in and out of the external shell, fundamentally it's more about making it easier to bypass Eshell features than to make complex usage of them. It's also simpler to understand as a user. If you do want more involved combinations of Eshell and external shell commands, you can always do the 'sh -c' wrapping yourself. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 16:58:22 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 20:58:22 +0000 Received: from localhost ([127.0.0.1]:39977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na1s5-0001MO-Sq for submit@debbugs.gnu.org; Thu, 31 Mar 2022 16:58:22 -0400 Received: from mail-pg1-f170.google.com ([209.85.215.170]:39850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na1s3-0001M8-CO for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 16:58:19 -0400 Received: by mail-pg1-f170.google.com with SMTP id q19so730485pgm.6 for <54603@debbugs.gnu.org>; Thu, 31 Mar 2022 13:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=y1aGsrLtJJr3MZwlGTLh3G2uelnICkSiqnx0Zb9wcwQ=; b=BI6n1DLYDx9hyWBN9J8E7kMk9U+l5LHl5iNeaXLXinkRAJ35qYw3A4Aj5WNPYvLlZR dhlNBvRCpuX+UEWaLno3ESR23qdordUwKnb5wCL/4rrsOANP6e5noDeTiWozdSGo5jjO 6kvjaEgh/rArS8O/rYx/KQIoaISBYY0VEaCUahWE7AYHN+HpKsmUaQ2da0QNrIG3UmKm 6s5iPcWLFclDMyHJtso3yCY1wnaSPBJIy7TIAQItaWlghZA9WItjDWgufI2jx6o/PF5K kfuWcG6zf7vtyUYTDYZM/ItPXltLr0nV4hPLq146VruwGgTEfxMPSXIbCDbmPV/gkD3Q RpZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=y1aGsrLtJJr3MZwlGTLh3G2uelnICkSiqnx0Zb9wcwQ=; b=307Dllnc4wgYy99eQF0d0lOKqxIijsTnRjtvPo0bBkVGd55k7S07bwJG8TH4Cc9m97 8i7vpo8jn+0fWAV4dSj0OSIzgre+pXYRthtmllIlLm8yBhPSH19tVmvWtvPx1KQiPmXk nShAq9en3r0LCCIharmEM84xg6SjW7Z1d00OkeSx50xkWafbiOeW1MfS9dazrYzC3tlW BsEjfUXeNaRR3sOfl0NZaTZ0wEAHDCs64gc7o9w30OPEw6fAAXFO9SZtJeBe6PG7w+SU wK5G2UaZJl6sg9pHiEMnr9ygpO+9LKLq6n28/8HQsAh4H+aOwEp33JhTK5mIduqSSBuA YpLA== X-Gm-Message-State: AOAM531DWhkv2tTq26VI4GNbDJ+hpVWqqy0yTpSuPLPl3b8/ylYHJHnm o3NPc9oiRH7Vrqq4tyzzIzSgN3uwRQ0= X-Google-Smtp-Source: ABdhPJwusfulxEqwDiJ3GB+0Vi0IgLo3phwEt5/f4Tc5xWpgRDlT8t/iwW/cbl3TCPYMjH950GUPoQ== X-Received: by 2002:a63:e70f:0:b0:380:d919:beb with SMTP id b15-20020a63e70f000000b00380d9190bebmr12166864pgi.58.1648760293273; Thu, 31 Mar 2022 13:58:13 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id i6-20020a633c46000000b003817d623f72sm239267pgn.24.2022.03.31.13.58.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 13:58:12 -0700 (PDT) Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks To: Sean Whitton , 54603@debbugs.gnu.org References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <871qyij7vx.fsf@melete.silentflame.com> From: Jim Porter Message-ID: Date: Thu, 31 Mar 2022 13:58:11 -0700 MIME-Version: 1.0 In-Reply-To: <871qyij7vx.fsf@melete.silentflame.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54603 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 (-) On 3/31/2022 11:26 AM, Sean Whitton wrote: > The call to `eshell-parse-lisp-argument' is meant to handle precisely > your case. It isn't doing atm, and I think it might actually be a bug > over in that function. To see this, with point on the first nonblank > char of each of these lines, do 'M-: (eshell-parse-lisp-argument) RET': > > #'foo > > 'foo > > In the first case it successfully parses it and skips point forward, but > in the latter case it does not. But I think it should, right? I'm not so sure. That would mean "'foo" in "echo 'foo" is treated as a Lisp form, but Eshell expects you to use "#'" (or "(" or "`") to introduce a Lisp form. As I understand it, that's so that typos don't do such surprising things. There's a good chance that a user typing "echo 'foo" actually meant "echo 'foo'". Because of that, in general, once you've moved point to partway inside a Lisp form, you can't use `eshell-parse-lisp-argument'. Maybe that should be changed? It's a bit surprising that you have to sharp-quote symbols in Eshell if you're not already inside a Lisp form (especially when those symbols aren't necessarily functions). Still, the typo-protection of the current implementation seems like a good feature... That said, this isn't the only situation where "unbalanced" single quotes can occur in an Eshell command. For example, see this command: echo $(list "one" "two")(:s'o'x') This creates a list of two strings, and then performs a regexp substitution from "o" to "x", so the output is: ("xne" "twx") Under Emacs 27/28, this works correctly, but it fails in 29 for the same reason as the original issue. The extpipe module could account for this and try to parse argument predicates/modifiers so that it knows when to stay out of things, but then what about configurations where that module is disabled? (And for that matter, a third-party Eshell module could cause conflicts in a similar manner.) >> If possible, I think it would be better for >> `eshell-parse-external-pipeline' to solely focus on finding the >> external pipe operators ("*|", "*<", and "*>")[1] and then for >> `eshell-rewrite-external-pipeline' to prepare the command string to >> pass to sh. This would also have the advantage[2] of making it >> possible to support a richer set of Eshell features with external >> pipes, such as the following: >> >> ~ $ echo $(message "[%s]" "hi") *| cat >> zsh:1: command not found: message >> >> (If you remove the "*", this outputs "[hi]", and it should be >> technically possible to make this work with external pipes too, provided >> it executes the Lisp code before generating the command string for sh.) > > In this case I would want the whole '$(message ..' construction to go > to the external shell. Although extpipe supports some combinations of > piping Eshell in and out of the external shell, fundamentally it's more > about making it easier to bypass Eshell features than to make complex > usage of them. It's also simpler to understand as a user. If you do > want more involved combinations of Eshell and external shell commands, > you can always do the 'sh -c' wrapping yourself. From my point of view, since the only difference between using an "Eshell pipe" and an extpipe is that the pipe operator has a "*", I'd expect the commands to work largely the same, except that the extpipe is faster. When I see a command like 'echo $(message "[%s]" "hi") *| cat', I usually think of it as a two-phase operation: expansions/subcommands are expanded first, and then the final command is executed. In that model, the expansions would still be "in Eshell". On the other hand, maybe there's enough practical use for passing the raw command string to `sh' that there should be a very simple way of invoking it (and without having to mess around with escaping interior quotes, as you would if you used `sh -c' manually). Maybe the parsing would be more robust if it used special sigils for the start/end of the external command? I suppose that's similar to your original proposal of using !! or || to introduce an external pipeline, so maybe it's not feasible to go this route. Another possibility would be to keep the current behavior (or close to it), but to reconstruct the command to pass to `sh' during Eshell's rewrite phase. I'm not quite sure if that would actually work, but if it did, it would allow other argument parsers to run normally without extpipe needing to know what parsers to try. Perhaps if we kept around the substring that each argument parser consumed, it would be possible to reconstruct the relevant bits for extpipe's purposes? More generally though, maybe there are really two different use cases? 1) Eshell's built-in pipelines are slow because they go through Emacs buffers. 2) It would be convenient to invoke a whole command (or some large part of a command) using `sh' syntax. For (1), Eshell could opportunistically use external pipelines without any special syntax. It should be possible to tell just by looking at the parsed command form if "foo | bar" connects two external processes on the same host, and then perform the appropriate rewrite to connect the processes efficiently (e.g. using `sh -c'). This would happen after expansion of variables/subcommands, so to the user it would work just like any other Eshell command, but it would be faster. For (2), we'd need a convenient syntax for forwarding some command string to `sh'. Something like your proposed !! or || syntax, or maybe something to wrap around part of a command? (Or maybe an even something like an interactive `eshell-externalize' function that replaces the selected region with the correct `sh' invocation?) And finally, sorry for bringing up these issues months after bug#46351. At the time, I didn't really understand the internals of Eshell, so I didn't have anything of substance to say then. Since then I've delved a bit *too* deep into Eshell's internals while trying to prove to myself that my implementation of Lisp function pipelines is sufficiently-flexible. :) From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 17:55:50 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 21:55:50 +0000 Received: from localhost ([127.0.0.1]:40032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na2li-0002rQ-1B for submit@debbugs.gnu.org; Thu, 31 Mar 2022 17:55:50 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:35769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na2lg-0002r9-MT for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 17:55:49 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 411AB5C0237; Thu, 31 Mar 2022 17:55:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 31 Mar 2022 17:55:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=42LG7lnhXM4nQdaltunl/xuWUkND2BBE2vjPIJ Spz2U=; b=qKKAYsgWlsyDLPqExGgQTNjHy1WS24Gk2vqFy2sOsb13igPMPs6qFj QjlvCzxQst4cfUjgKzz34k40s378NJuvOU9RkgV5crWyQ9j3+0epE2ms6PbeXoJ8 09GEohZPzS5+JVRtD4FxREKDiKOyEbLgX1cPx6QnfT11ckxDVrpwrrWemWouIsgp HovrA3t4BWgn8OyggS7lpBRmIYYI6aqHup7ffYOnC46BiTOP1FUdu5EJDCn5krNU EdXYiyGDHqR83m8YoIlspGyUfX1Y1omUwGu0ExqMvCltQxBsLhZVE7vhN8qfGYKP pzJOTvhx3pghms+Cop1WJuqSoFIXVBJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=42LG7lnhXM4nQdalt unl/xuWUkND2BBE2vjPIJSpz2U=; b=Um8JwLCPGt09ghfJp+tMyTOYCSPinC8uY xHSL8qlHSuj/YUUP4mBKSS/+ldudU1N4tAcLJbLojdi3VDEh+Q8YwJsX0xfacx5Y VGia9p3BzIxAJZbt7zPkw2Ce+21HNjSsnwTyIHT/1AYrs8AGqUxmSIDr3+X3o+bo neaWIo+1NSxMTh1USiLSoGq9ZCFQBUXeA2L1kcWmtIX8GBj/r9FEhd9zk3vsqZqJ kksrHl35G9VNY8IWvl7inRBEOQl8XKI3kljEbujtucqZfhgjOYTZALZxbV+UO3AX hLjhPIz7WkVmjzBFhEt6wJEMm0/7J95lAdYPllZchgurYmaykaPdA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeihedgtdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffgffkfggtgesthdttd dttdertdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfihhihhtthhonhes shhpfihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeelgeeggfdvieejvd fhudfggeetgfekkeeuieeljeejhedugeegfeetgefhueffkeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhh hithhtohhnrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 31 Mar 2022 17:55:42 -0400 (EDT) Received: by melete.silentflame.com (Postfix, from userid 1000) id A43B87E1317; Thu, 31 Mar 2022 14:55:41 -0700 (MST) From: Sean Whitton To: Jim Porter , 54603@debbugs.gnu.org Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks In-Reply-To: References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <871qyij7vx.fsf@melete.silentflame.com> User-Agent: Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Thu, 31 Mar 2022 14:55:41 -0700 Message-ID: <87bkxliy76.fsf@melete.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54603 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 (-) Hello, On Thu 31 Mar 2022 at 01:58PM -07, Jim Porter wrote: > I'm not so sure. That would mean "'foo" in "echo 'foo" is treated as a > Lisp form, but Eshell expects you to use "#'" (or "(" or "`") to > introduce a Lisp form. As I understand it, that's so that typos don't do > such surprising things. There's a good chance that a user typing "echo > 'foo" actually meant "echo 'foo'". Right okay. We can just skip over entire Lisp forms when we find them. I don't think there could be a non-highly esoteric shell command for standard POSIX shells -- which is what this feature is for -- which that would break. Like this: >> diff --git a/lisp/eshell/em-extpipe.el b/lisp/eshell/em-extpipe.el >> index eb5b3bfe1d..0787ab791b 100644 >> --- a/lisp/eshell/em-extpipe.el >> +++ b/lisp/eshell/em-extpipe.el >> @@ -99,7 +99,7 @@ eshell-parse-external-pipeline >> (let* ((found >> (save-excursion >> (re-search-forward >> - "\\(?:#?'\\|\"\\|\\\\\\)" bound t))) >> + "\\(?:(\\|#?'\\|\"\\|\\\\\\)" bound t))) >> (next (or (and found (match-beginning 0)) >> bound))) >> (if (re-search-forward pat next t) >> Something in my init.el is breaking the extpipe tests atm, but I ad hoc tested one of your cases for this bug and it works. Could you confirm? > That said, this isn't the only situation where "unbalanced" single > quotes can occur in an Eshell command. For example, see this command: > > echo $(list "one" "two")(:s'o'x') > > This creates a list of two strings, and then performs a regexp > substitution from "o" to "x", so the output is: > > ("xne" "twx") > > Under Emacs 27/28, this works correctly, but it fails in 29 for the > same reason as the original issue. The extpipe module could account > for this and try to parse argument predicates/modifiers so that it > knows when to stay out of things, but then what about configurations > where that module is disabled? (And for that matter, a third-party > Eshell module could cause conflicts in a similar manner.) I think the correct thing is for extpipe to do something sensible with all the Eshell syntax that is enabled by default. We should call the relevant parsing function to skip over these predicates/modifiers too. If you're changing the list of modules then you might have to drop extpipe as part of that process -- that's just inherent in how Eshell modules work. There's always going to be a limit to how much syntax you can have enabled at once. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 18:20:07 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 22:20:07 +0000 Received: from localhost ([127.0.0.1]:40074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na39D-0003UK-EP for submit@debbugs.gnu.org; Thu, 31 Mar 2022 18:20:07 -0400 Received: from mail-pj1-f42.google.com ([209.85.216.42]:46639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na39B-0003Tj-CY for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 18:20:05 -0400 Received: by mail-pj1-f42.google.com with SMTP id bx24-20020a17090af49800b001c6872a9e4eso743232pjb.5 for <54603@debbugs.gnu.org>; Thu, 31 Mar 2022 15:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=benMVtUI82sERn3xauDeGC/XsnMJ8mHslzkW2OrJwl0=; b=ArpwbnSHYpdT6XYUZuuPDdLoxTkSYBjur6ZKDzf+vdUgBrtUPbS60xSPqW4L6uAty7 4dZZp13R/BzzbhnYNG6AJpMhSec7QrqjIStPKCIJLtU6TNxr1mP0ALVdgVjepBVa0MJO LxFT5zCSlmki8ItpB345XrhzFpiuV3yxh0ToM4N4jMrGsyK0AyIL9l00k5BNGKIdZzJv ljmoJZL4IFzTs8vd6+sF/GUW1A5r1fWZJm3PeUywdZQUrVN20KTwz22jjQO5IHcrWU36 /PJch+uqu/ussS5Jtgqtog9m05CMN27KFP9OLB1pOt/Su4JPTVWaJ7I0NE0IJ/M235X/ bo2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=benMVtUI82sERn3xauDeGC/XsnMJ8mHslzkW2OrJwl0=; b=3DzJhHZ0UToDoHnjAjSClDPvqbeoIOwRgKw1e/ZQJH6Pj6Q0xbrh2d4ol0I3XdLebz rzG1W6hJdnn9Jmlqc6kf4PTsNB/SXm4jgjlemMPp5A3k3rScnYyOoU3u+sco7BaEIvlF IExyno+vzpWMf21ikLwsmt7K3ZwiSxnywc2ZxGgsLEJFrzEfD8AYqbnDrbIBcwI+CYhS piu5ZgKAX2ZMFYx4hBmPuUpz5ntAqPfFLIz9CydQgfLeZ0nw1begz0XKbwcM1nhet/Cg H+zM3Tl4H3H7RkKUMVaQwclXlFU+jni2EMgAGJ2xIVZ84GCagq6TemXchmBQr1uGb+im cKbA== X-Gm-Message-State: AOAM532m0Qyh0aTKGK7VpNUbbaR+9TYhcYfZzFFckclMyeTQeoPRURNX SysEyzHHWE91WtRd+I55dWyoWcunjBA= X-Google-Smtp-Source: ABdhPJxZCZflZ0QiGpr68QSVKjVUZbe9xQvuBvXOGcyTGBAxX8sULIztlMUjnt1k/AvoDawgbqzpcg== X-Received: by 2002:a17:902:7e42:b0:156:47a6:c575 with SMTP id a2-20020a1709027e4200b0015647a6c575mr9470932pln.37.1648765199555; Thu, 31 Mar 2022 15:19:59 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id a11-20020a63cd4b000000b00378b9167493sm330098pgj.52.2022.03.31.15.19.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 15:19:59 -0700 (PDT) Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks To: Sean Whitton , 54603@debbugs.gnu.org References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <871qyij7vx.fsf@melete.silentflame.com> <87bkxliy76.fsf@melete.silentflame.com> From: Jim Porter Message-ID: Date: Thu, 31 Mar 2022 15:19:58 -0700 MIME-Version: 1.0 In-Reply-To: <87bkxliy76.fsf@melete.silentflame.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54603 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 (-) On 3/31/2022 2:55 PM, Sean Whitton wrote: > On Thu 31 Mar 2022 at 01:58PM -07, Jim Porter wrote: > >> I'm not so sure. That would mean "'foo" in "echo 'foo" is treated as a >> Lisp form, but Eshell expects you to use "#'" (or "(" or "`") to >> introduce a Lisp form. As I understand it, that's so that typos don't do >> such surprising things. There's a good chance that a user typing "echo >> 'foo" actually meant "echo 'foo'". > > Right okay. We can just skip over entire Lisp forms when we find them. > I don't think there could be a non-highly esoteric shell command for > standard POSIX shells -- which is what this feature is for -- which that > would break. Like this: > >>> diff --git a/lisp/eshell/em-extpipe.el b/lisp/eshell/em-extpipe.el >>> index eb5b3bfe1d..0787ab791b 100644 >>> --- a/lisp/eshell/em-extpipe.el >>> +++ b/lisp/eshell/em-extpipe.el >>> @@ -99,7 +99,7 @@ eshell-parse-external-pipeline >>> (let* ((found >>> (save-excursion >>> (re-search-forward >>> - "\\(?:#?'\\|\"\\|\\\\\\)" bound t))) >>> + "\\(?:(\\|#?'\\|\"\\|\\\\\\)" bound t))) >>> (next (or (and found (match-beginning 0)) >>> bound))) >>> (if (re-search-forward pat next t) >>> > > Something in my init.el is breaking the extpipe tests atm, but I ad hoc > tested one of your cases for this bug and it works. Could you confirm? The first test case -- "(eq 'foo nil)" -- works, but the second doesn't: ~ $ echo $(list "one" "two")(:s'o'x') Invalid read syntax: ")", 1, 33 Similarly: ~ $ echo *(:gs'o'x') Invalid read syntax: ")", 1, 16 I guess this is because it's now trying to read the argument modifier as a Lisp form. Normally, `eshell-parse-lisp-argument' would ignore that bit, since the `(' starting the modifier isn't at the beginning of an argument. This could probably be resolved with some additional logic (setting `eshell-current-argument' as appropriate?), but I hope there's a cleaner way that doesn't involve reimplementing `eshell-parse-argument' within `eshell-parse-external-pipeline'. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 18:48:44 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 22:48:44 +0000 Received: from localhost ([127.0.0.1]:40110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na3at-0004GT-W2 for submit@debbugs.gnu.org; Thu, 31 Mar 2022 18:48:44 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:54783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na3ar-0004GF-3K for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 18:48:42 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8D1B75C0213; Thu, 31 Mar 2022 18:48:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 31 Mar 2022 18:48:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=nV5a1k7PPxn62Wu9MUo0olP8A1JsyaPQMYvWhZ 8qE5A=; b=K1rK/2+yVCHWiG7iMjZckKj8NTNS03nMcSOLCWDGy3Pw/RKLRPcZB0 zYklww1aN0VJJpPwz6wwX3x14fEexipEs8+/38e2V63gS3zgwZWRUTQ0PEKu6F8X oJ8o1ykzLVaoMSM9zXdyHStPcmECDMzN4eSHlw+IG3DokZeQniQJAMUCSCazDE1m wwOyfsWFzXtd1zoZw+fmFs2MfP37+n9kpaOVvBX8PcChpA/0SvBHXv69uMqJpQfr k2paBcmNzqcdtM97o1KlXFQnWw6TiULT45oZ/EuLZOAgD6Hki877uo42RmYXxeI9 EH8tDuxBgNxtUbV5Ko8RQQwOEwZX3ZmA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=nV5a1k7PPxn62Wu9M Uo0olP8A1JsyaPQMYvWhZ8qE5A=; b=R8YVYigHg2vgO1MyI9/UoLJRH4RtHAs2F 9FrcfBYeHT0IihYEHXDF6iDzf4GXInh+cBeZcuevJK35I0UNGoY6Ug17BIvX4Yqb W+88TWFMWVaDQ6qwCrS6ZMaz/EoVk92UWEiB7/5+lBcwUH/662rc0Pt2BMjmUV6a Nt4Qpyap9Pb3ifyYis09KNIpdTTU5hmvZZKz4jmsV+6O4IVUJ+rSRXPhscondxQg jK6WmzpJroZbK7whmIWZYUBWWijaivWALjZlSqyE9jOW0dnLL9okqlZMv86Aev3k LSs992EXax+vQq8pTBV1179+YL+w/q+JwcTbIw7Mh35kdtg3kpYzQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeihedgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffgffkfggtgesthdttd dttdertdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfihhihhtthhonhes shhpfihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeelgeeggfdvieejvd fhudfggeetgfekkeeuieeljeejhedugeegfeetgefhueffkeenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhh hithhtohhnrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 31 Mar 2022 18:48:35 -0400 (EDT) Received: by athena.silentflame.com (Postfix, from userid 1000) id 7FDAF1BAA73; Thu, 31 Mar 2022 22:48:33 +0000 (UTC) From: Sean Whitton To: Jim Porter , 54603@debbugs.gnu.org Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks In-Reply-To: References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <871qyij7vx.fsf@melete.silentflame.com> <87bkxliy76.fsf@melete.silentflame.com> User-Agent: Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Thu, 31 Mar 2022 15:48:33 -0700 Message-ID: <87y20pbuwu.fsf@athena.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54603 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 (-) Hello, On Thu 31 Mar 2022 at 03:19pm -07, Jim Porter wrote: > This could probably be resolved with some additional logic (setting > `eshell-current-argument' as appropriate?), but I hope there's a > cleaner way that doesn't involve reimplementing > `eshell-parse-argument' within `eshell-parse-external-pipeline'. Well, quite. Thank you for testing. In the meantime, I've thought it all through some more, and I think that your original idea of catching the 'eshell-incomplete is the right thing, assuming all tests pass. I think the error should be caught inside the `or', though? The idea would be that if eshell-incomplete is thrown within one of the disjuncts, that disjunct should return nil. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 18:56:06 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 22:56:06 +0000 Received: from localhost ([127.0.0.1]:40116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na3i1-0004S1-Oa for submit@debbugs.gnu.org; Thu, 31 Mar 2022 18:56:05 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:38309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na3hz-0004RY-Or for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 18:56:04 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 9386E5C01EF; Thu, 31 Mar 2022 18:55:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 31 Mar 2022 18:55:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; bh=5IqSrhPyYf9RYF5XzskChIAr8ajlhY HIlSaSJwDSIGk=; b=VC94Ve95FKNaVwt534aWb8aHL5iXQmDY6xXbdD/eJjOrbq CVW/L3pfIy2loAsFRyqW/VaLrLNgaugHEq1yb1bYtPubCppNOMGt+nv+HXJ55PwH GKMPR8+L2yFeDmhbErD5Deha18+gPaSVnf8dJL+6Vx8/IVkLAhf91ZvC1/3TVXmB H8TW8Bo6mlcnSelS0GqDjQN2E5pldSP9Ny2Adq24Zj2zxRoNVN3NouSPZIofBHoF DSHQm503pp+EHBV/Sc2q/tImgXphPc7D+65mpReShKUd3P+VAnI/f916tjgBVKIW A7cxrRI52GkfkRJoTEZpinRQmy+0vfaEhVhgU3Dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=5IqSrhPyYf9RYF5Xz skChIAr8ajlhYHIlSaSJwDSIGk=; b=dDsnV9bNP9tpFTU8om+n9z6BMglKgvWqy RZU+LEm3Bi5wMIPSlKCO9VuaYe75Mz8z5nBCp20avIldjONCUPBUYknO3i6P7qVB 01jv6B3lPH6cIiXmvPxC4yDSpe0LThqlsWyHd8YWkOJKnyxBeeQpu1Xveo+T0APS evMh6ivI7jhDQqukzV0902vPIOwHU71WKgigT34E07a9coCClwqSubh0RgGfO/Rh CLlGc8Sau3/r3fafk1TBcEKt4a1Rq57JuKDAlGqCgZ9TzWOKeHzjc8XBORaUcJ+B +pMq2FU2W4ddwBFR4+48PXByaIrhfsp90YLWiOHipOP2xM46papcw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeihedgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhgffffkgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepleeggefgvdeijedvhfdugfegtefgkeekueeileejjeehudeg geefteeghfeuffeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 31 Mar 2022 18:55:57 -0400 (EDT) Received: by athena.silentflame.com (Postfix, from userid 1000) id D2F421C9F3F; Thu, 31 Mar 2022 22:55:56 +0000 (UTC) From: Sean Whitton To: Lars Ingebrigtsen , Jim Porter Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks In-Reply-To: <87ilru73b2.fsf@gnus.org> References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <87ilru73b2.fsf@gnus.org> User-Agent: Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Thu, 31 Mar 2022 15:55:56 -0700 Message-ID: <87v8vtbukj.fsf@athena.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54603 Cc: 54603@debbugs.gnu.org, John Wiegley 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 (-) Hello, On Thu 31 Mar 2022 at 01:46pm +02, Lars Ingebrigtsen wrote: > Jim Porter writes: > >> The attached patch resolves the issue for me, but I'm not sure if it's >> the best strategy. If possible, I think it would be better for >> `eshell-parse-external-pipeline' to solely focus on finding the >> external pipe operators ("*|", "*<", and "*>")[1] and then for >> `eshell-rewrite-external-pipeline' to prepare the command string to >> pass to sh. This would also have the advantage[2] of making it >> possible to support a richer set of Eshell features with external >> pipes, such as the following: > > I think that sounds like a good idea (but I don't use eshell regularly, > so I don't really have much of an opinion here). Perhaps John does; > added to the CCs. As discussed down thread, this would kind of be a different feature -- one purpose of the extpipe syntax is to make it easy to have the operating system shell interpret complex shell syntax rather than Eshell. Jim has an idea about making ordinary Eshell pipes automatically use the external shell where possible, which would satisfy this usecase better if it works out, I think. -- Sean Whitton From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 19:32:02 2022 Received: (at 54603) by debbugs.gnu.org; 31 Mar 2022 23:32:02 +0000 Received: from localhost ([127.0.0.1]:40138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na4Gn-0005Mg-Tp for submit@debbugs.gnu.org; Thu, 31 Mar 2022 19:32:02 -0400 Received: from mail-pg1-f181.google.com ([209.85.215.181]:43962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na4Gl-0005MM-T6 for 54603@debbugs.gnu.org; Thu, 31 Mar 2022 19:32:01 -0400 Received: by mail-pg1-f181.google.com with SMTP id c2so973598pga.10 for <54603@debbugs.gnu.org>; Thu, 31 Mar 2022 16:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:mime-version:in-reply-to :content-language; bh=tlrjwq2NHXFtEoYxqGiie2DcPtz0woVtYSmp1+jHS38=; b=AfjK2vJp4wsKw3WNMRVkMtdrd3tuUdTwQvW2oSuoshcy1tQFrj78V9T8JshSkqYYv0 kfBgHV2BG0u8ipWhpWtEGmh0rU6/gqkZyNG1Fuetj6d+FRG/BstNl4ml6hkYyUsEW0Zw qrTyMYeFO2aOCkkJ3q2/UlOsxYe21oTMjKEFDORzLLxgR+ImlnmL4rduV6UJtLA5YFhH 8JLIq7yr4g1W2mrzMeboGfuirpzllDFTxg5qAVZq5DV32p/6bSqsBPuVJCYHsR4VvNEk s2CZovVFnSpZyBEolkvCT8/Rqf7L8IGCkGjT+jGsNdBRFA0AW9zvd2EMJnx4F8nTuhf2 qyEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-language; bh=tlrjwq2NHXFtEoYxqGiie2DcPtz0woVtYSmp1+jHS38=; b=NqE7m6M5VOgKi/zJeoKrFtoN+XGFlnYvssqhgs52RDoyc2UY/DzoQqAH2nc+cG4EnV koy1KY0FbTjqy4HZ+Ka7xR0FNdeqcqoCJMee9xn/tvL8pV0oHaYZREbC9byGpqGRiSb8 zYBhj8ap6rcrP3I6dnr+wnRPs8V4iFMcH88o7HRUZ4StL2cmYdsPxmeBsoaY71uNTCwE 4vP/l0EvD4EL6wD34ZQm7DfKIR0IBJaJ2yKFLVQT36f3SgufXzm8R8cCVLwmfmXmf1DH TLBTW0K79OOaW9b50WhDDbQB0YHephfx1tYQrLQxCJjDCIBbLyJ2MxQ4V3A5HbozwzTk ESKQ== X-Gm-Message-State: AOAM532wltP/7gSckemN+6mzV87C5cqKf7sfOgJDXfLRy9v6R9UDKvP3 o0dwRMd4HShPCG15MeWrqF68Pd4s7ws= X-Google-Smtp-Source: ABdhPJz98pu7jFctb+UUjAX4eI+Z2PNe5lL+R6rnI7pqKtnFbrFUPAwesqy/yusMNWiRM5meNCOQIA== X-Received: by 2002:a63:2a97:0:b0:398:6e01:d565 with SMTP id q145-20020a632a97000000b003986e01d565mr12691080pgq.119.1648769513889; Thu, 31 Mar 2022 16:31:53 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id o40-20020a17090a0a2b00b001c77ebd8fa9sm411506pjo.17.2022.03.31.16.31.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 16:31:53 -0700 (PDT) Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks To: Sean Whitton , 54603@debbugs.gnu.org References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <871qyij7vx.fsf@melete.silentflame.com> <87bkxliy76.fsf@melete.silentflame.com> <87y20pbuwu.fsf@athena.silentflame.com> From: Jim Porter Message-ID: <8191b68d-975d-3f84-bb0b-501bdf2edf47@gmail.com> Date: Thu, 31 Mar 2022 16:31:53 -0700 MIME-Version: 1.0 In-Reply-To: <87y20pbuwu.fsf@athena.silentflame.com> Content-Type: multipart/mixed; boundary="------------A4F7DCF6B7B0D686AB660DE4" Content-Language: en-US X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54603 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 (-) This is a multi-part message in MIME format. --------------A4F7DCF6B7B0D686AB660DE4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 3/31/2022 3:48 PM, Sean Whitton wrote: > Thank you for testing. In the meantime, I've thought it all through > some more, and I think that your original idea of catching the > 'eshell-incomplete is the right thing, assuming all tests pass. > > I think the error should be caught inside the `or', though? The idea > would be that if eshell-incomplete is thrown within one of the > disjuncts, that disjunct should return nil. Hmm, that's an interesting thought. Maybe this code could be more particular about what parse function it calls. Since each of the function calls here: (while (or (eshell-parse-lisp-argument) (eshell-parse-backslash) (eshell-parse-double-quote) (eshell-parse-literal-quote))) correspond to a particular token here (earlier in the source): (re-search-forward "\\(?:(\\|#?'\\|\"\\|\\\\\\)" bound t))) perhaps it would be better to match the function call to the corresponding token. That is, if we see a "#?", we call `eshell-parse-lisp-argument', and so on. See the attached patch, which works in my tests (and passes all the existing Eshell unit tests). --------------A4F7DCF6B7B0D686AB660DE4 Content-Type: text/plain; charset=UTF-8; name="0001-Make-Eshell-s-extpipe-more-lenient-when-looking-for-.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-Make-Eshell-s-extpipe-more-lenient-when-looking-for-.pa"; filename*1="tch" RnJvbSBkM2ZmYzRiMTBjYzM3YThiYWJjMzA0OGVmMzUwN2Q0ZDc0YzVmYzJmIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gUG9ydGVyIDxqcG9ydGVyYnVnc0BnbWFpbC5j b20+CkRhdGU6IFN1biwgMjcgTWFyIDIwMjIgMTk6MDQ6NDIgLTA3MDAKU3ViamVjdDogW1BB VENIXSBNYWtlIEVzaGVsbCdzIGV4dHBpcGUgbW9yZSBsZW5pZW50IHdoZW4gbG9va2luZyBm b3IgaXRzCiBvcGVyYXRvcnMKClRoaXMgY291bGQgY2F1c2Ugc29tZSBlcnJvcnMgd2hlbiBl eGVjdXRpbmcgRXNoZWxsIGNvbW1hbmRzIHdpdGggYW4Kb2RkIG51bWJlciBvZiBxdW90YXRp b24gbWFya3MsIHN1Y2ggYXMgIihlcSAnZm9vIG5pbCkiLgoKKiBsaXNwL2VzaGVsbC9lbS1l eHRwaXBlLmVsIChlc2hlbGwtcGFyc2UtZXh0ZXJuYWwtcGlwZWxpbmUpOiBDYXRjaAonZXNo ZWxsLWluY29tcGxldGUnIGVycm9ycyBhbmQgb25seSBjYWxsIHRoZSBwYXJzZSBmdW5jdGlv bgpjb3JyZXNwb25kaW5nIHRvIHRoZSB0b2tlbiBhdCBwb2ludC4KCiogdGVzdC9saXNwL2Vz aGVsbC9lc2hlbGwtdGVzdHMuZWwKKGVzaGVsbC10ZXN0L2xpc3AtY29tbWFuZC13aXRoLXF1 b3RlKTogTmV3IHRlc3QuCi0tLQogbGlzcC9lc2hlbGwvZW0tZXh0cGlwZS5lbCAgICAgICAg fCAxMSArKysrKysrLS0tLQogdGVzdC9saXNwL2VzaGVsbC9lc2hlbGwtdGVzdHMuZWwgfCAg NCArKysrCiAyIGZpbGVzIGNoYW5nZWQsIDExIGluc2VydGlvbnMoKyksIDQgZGVsZXRpb25z KC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9lc2hlbGwvZW0tZXh0cGlwZS5lbCBiL2xpc3AvZXNo ZWxsL2VtLWV4dHBpcGUuZWwKaW5kZXggZWI1YjNiZmUxZC4uYzU4N2YzMThiZiAxMDA2NDQK LS0tIGEvbGlzcC9lc2hlbGwvZW0tZXh0cGlwZS5lbAorKysgYi9saXNwL2VzaGVsbC9lbS1l eHRwaXBlLmVsCkBAIC0xMDAsMTUgKzEwMCwxOCBAQCBlc2hlbGwtcGFyc2UtZXh0ZXJuYWwt cGlwZWxpbmUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNhdmUtZXhjdXJzaW9u CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHJlLXNlYXJjaC1mb3J3YXJkCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJcXCg/OiM/J1xcfFwiXFx8XFxcXFxc KSIgYm91bmQgdCkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0b2tlbiAoYW5k IGZvdW5kIChtYXRjaC1zdHJpbmcgMCkpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAg IChuZXh0IChvciAoYW5kIGZvdW5kIChtYXRjaC1iZWdpbm5pbmcgMCkpCiAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvdW5kKSkpCiAgICAgICAgICAgICAgICAg ICAgICAgIChpZiAocmUtc2VhcmNoLWZvcndhcmQgcGF0IG5leHQgdCkKICAgICAgICAgICAg ICAgICAgICAgICAgICAgICh0aHJvdyAnZm91bmQgKG1hdGNoLWJlZ2lubmluZyAxKSkKICAg ICAgICAgICAgICAgICAgICAgICAgICAoZ290by1jaGFyIG5leHQpCi0gICAgICAgICAgICAg ICAgICAgICAgICAgKHdoaWxlIChvciAoZXNoZWxsLXBhcnNlLWxpc3AtYXJndW1lbnQpCi0g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZXNoZWxsLXBhcnNlLWJhY2tz bGFzaCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlc2hlbGwtcGFy c2UtZG91YmxlLXF1b3RlKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KGVzaGVsbC1wYXJzZS1saXRlcmFsLXF1b3RlKSkpCisgICAgICAgICAgICAgICAgICAgICAg ICAgKGNhdGNoICdlc2hlbGwtaW5jb21wbGV0ZQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHBjYXNlIHRva2VuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgiIyciIChl c2hlbGwtcGFyc2UtbGlzcC1hcmd1bWVudCkpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICgiXFwiIChlc2hlbGwtcGFyc2UtYmFja3NsYXNoKSkKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKCJcIiIgKGVzaGVsbC1wYXJzZS1kb3VibGUtcXVvdGUpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoIiciICAoZXNoZWxsLXBhcnNlLWxpdGVyYWwtcXVv dGUpKSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgOzsgR3VhcmQgYWdhaW5zdCBhbiBp bmZpbml0ZSBsb29wIGlmIG5vbmUgb2YKICAgICAgICAgICAgICAgICAgICAgICAgICA7OyB0 aGUgcGFyc2VycyBtb3ZlZCB1cyBmb3J3YXJkLgogICAgICAgICAgICAgICAgICAgICAgICAg ICh1bmxlc3MgKG9yICg+IChwb2ludCkgbmV4dCkgKGVvYnApKQpkaWZmIC0tZ2l0IGEvdGVz dC9saXNwL2VzaGVsbC9lc2hlbGwtdGVzdHMuZWwgYi90ZXN0L2xpc3AvZXNoZWxsL2VzaGVs bC10ZXN0cy5lbAppbmRleCBlMzFkYjA3YzYxLi4xZTMwM2Y3MGU1IDEwMDY0NAotLS0gYS90 ZXN0L2xpc3AvZXNoZWxsL2VzaGVsbC10ZXN0cy5lbAorKysgYi90ZXN0L2xpc3AvZXNoZWxs L2VzaGVsbC10ZXN0cy5lbApAQCAtNDQsNiArNDQsMTAgQEAgZXNoZWxsLXRlc3QvbGlzcC1j b21tYW5kCiAgICJUZXN0IGBlc2hlbGwtY29tbWFuZC1yZXN1bHQnIHdpdGggYW4gZWxpc3Ag Y29tbWFuZC4iCiAgIChzaG91bGQgKGVxdWFsIChlc2hlbGwtdGVzdC1jb21tYW5kLXJlc3Vs dCAiKCsgMSAyKSIpIDMpKSkKIAorKGVydC1kZWZ0ZXN0IGVzaGVsbC10ZXN0L2xpc3AtY29t bWFuZC13aXRoLXF1b3RlICgpCisgICJUZXN0IGBlc2hlbGwtY29tbWFuZC1yZXN1bHQnIHdp dGggYW4gZWxpc3AgY29tbWFuZCBjb250YWluaW5nIGEgcXVvdGUuIgorICAoc2hvdWxkIChl cXVhbCAoZXNoZWxsLXRlc3QtY29tbWFuZC1yZXN1bHQgIihlcSAnZm9vIG5pbCkiKSBuaWwp KSkKKwogKGVydC1kZWZ0ZXN0IGVzaGVsbC10ZXN0L2Zvci1sb29wICgpCiAgICJUZXN0IGBl c2hlbGwtY29tbWFuZC1yZXN1bHQnIHdpdGggYSBmb3IgbG9vcC4uIgogICAobGV0ICgocHJv Y2Vzcy1lbnZpcm9ubWVudCAoY29ucyAiZm9vIiBwcm9jZXNzLWVudmlyb25tZW50KSkpCi0t IAoyLjI1LjEKCg== --------------A4F7DCF6B7B0D686AB660DE4-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 01 17:16:38 2022 Received: (at 54603) by debbugs.gnu.org; 1 Apr 2022 21:16:38 +0000 Received: from localhost ([127.0.0.1]:43758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naOd5-0000NB-Eg for submit@debbugs.gnu.org; Fri, 01 Apr 2022 17:16:38 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:51039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naOd2-0000Mu-S7 for 54603@debbugs.gnu.org; Fri, 01 Apr 2022 17:16:21 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id CC02B3200929; Fri, 1 Apr 2022 17:16:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 01 Apr 2022 17:16:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; bh=nYr5X5Fow23/+10/RSw5KaPae0UouyM2iAdzaC okgKU=; b=V26wHOBrXhfOrgC6ec6gEnHK8NO0X3jbxg8T/WpFc6yWC/V+8YZCH2 hbML2j0MTSRMXRM2J5eVFkfSEPOM7gnbBcczBqa0rkHUr5/Oa8sCeMh7zGNmk2VE dax3IpN1YLxzRl3MMbcaXeqsFtBpu6PcNB44Uv0zuGWCLRqN4AVVNn3mDrD6r6Ei 5AMRAygjz5utPlgxYTwh2ELayzJAU/60dsLMOBk9L8OuTfhsO3px/yEdPpwm++Oj cKFQ8yu9pkeb/shyfGPvUm+Zayet6nV/cIOc3iopMcTNXMcLRa2bJoCffRB9A5I+ Gp76vHKbe2OxOiiruC8HXAcqeRM/wwzw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=nYr5X5Fow23/+10/R Sw5KaPae0UouyM2iAdzaCokgKU=; b=HooKpaV6om1BA6rdpDvhU1JcB3N/lO17U UAGigEX9Ugk8pyhsWs4kJfY0b19POdlPufDCz/+hGWWwleU9HoHgOkyWujcABWky b/nO6J8nib0F5PF4ZhmxRXsVcitlY6HYmbzlYTwOMhdN8k+hbVPcoOweBMPoKdli cB5xzTEv+gPrhPsOg3YkhpOlk1WVI6NyC1JcmtW8Ms5MKLAEg9uc/AM24XgxFTDa YpOSGCjlL4cjf/J2YY5jsaEoSx7DGgZ1AZg7Nq44zI5fyFXWc9UTCw9nCMaW8NdH i6PGItw1oQ0NdzwMjfnWsseD9ywdUL4U9pmWL+NJyRIj64RCUOaqA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeiiedgudehkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufgjfhgffffkgggtsehmtd dtredtredtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhhhithhtohhn sehsphifhhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepgfeuueetvdekff egvdevteehjeeitedvuddvffehvefgtedvgffhteetffdvveejnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfi hhihhtthhonhdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Apr 2022 17:16:14 -0400 (EDT) Received: by melete.silentflame.com (Postfix, from userid 1000) id 43AD67E0C12; Fri, 1 Apr 2022 14:16:13 -0700 (MST) From: Sean Whitton To: Jim Porter , 54603@debbugs.gnu.org Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks In-Reply-To: <8191b68d-975d-3f84-bb0b-501bdf2edf47@gmail.com> References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <871qyij7vx.fsf@melete.silentflame.com> <87bkxliy76.fsf@melete.silentflame.com> <87y20pbuwu.fsf@athena.silentflame.com> <8191b68d-975d-3f84-bb0b-501bdf2edf47@gmail.com> User-Agent: Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Fri, 01 Apr 2022 14:16:13 -0700 Message-ID: <87fsmwo676.fsf@melete.silentflame.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54603 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 (-) --=-=-= Content-Type: text/plain Hello, On Thu 31 Mar 2022 at 04:31PM -07, Jim Porter wrote: > On 3/31/2022 3:48 PM, Sean Whitton wrote: >> >> I think the error should be caught inside the `or', though? The idea >> would be that if eshell-incomplete is thrown within one of the >> disjuncts, that disjunct should return nil. > > Hmm, that's an interesting thought. Maybe this code could be more > particular about what parse function it calls. Since each of the > function calls here: > > (while (or (eshell-parse-lisp-argument) > (eshell-parse-backslash) > (eshell-parse-double-quote) > (eshell-parse-literal-quote))) > > correspond to a particular token here (earlier in the source): > > (re-search-forward > "\\(?:(\\|#?'\\|\"\\|\\\\\\)" bound t))) > > perhaps it would be better to match the function call to the > corresponding token. Thank you for this suggestion, but I think that findbeg1 is more readable, and actually perhaps more efficient, if we maintain the (while (or ...)) structure. So I would like to install the attached patch to resolve this bug. -- Sean Whitton --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-em-extpipe-Catch-eshell-incomplete-thrown-while-pars.patch >From a66fd4c30779a64e56621d21e589bb35856a57ea Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 1 Apr 2022 14:05:07 -0700 Subject: [PATCH] em-extpipe: Catch eshell-incomplete thrown while parsing * lisp/eshell/em-extpipe.el (em-extpipe--or-with-catch): New macro. (eshell-parse-external-pipeline): Use new macro to treat `eshell-incomplete' as a failure of the parse function to move us forward (Bug#54603). Thanks to Jim Porter for the report and for help isolating the problem. * test/lisp/eshell/eshell-tests.el (eshell-test/lisp-command-with-quote): New test for Bug#54603, thanks to Jim Porter . --- lisp/eshell/em-extpipe.el | 22 ++++++++++++++++++---- test/lisp/eshell/eshell-tests.el | 4 ++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/lisp/eshell/em-extpipe.el b/lisp/eshell/em-extpipe.el index eb5b3bfe1d..3db1dea595 100644 --- a/lisp/eshell/em-extpipe.el +++ b/lisp/eshell/em-extpipe.el @@ -49,6 +49,19 @@ eshell-extpipe-initialize (add-hook 'eshell-pre-rewrite-command-hook #'eshell-rewrite-external-pipeline -20 t)) +(defmacro em-extpipe--or-with-catch (&rest disjuncts) + "Evaluate DISJUNCTS like `or' but catch `eshell-incomplete'. + +If `eshell-incomplete' is thrown during the evaluation of a +disjunct, that disjunct yields nil." + (let ((result (gensym))) + `(let (,result) + (or ,@(cl-loop for disjunct in disjuncts collect + `(if (catch 'eshell-incomplete + (ignore (setq ,result ,disjunct))) + nil + ,result)))))) + (defun eshell-parse-external-pipeline () "Parse a pipeline intended for execution by the external shell. @@ -105,10 +118,11 @@ eshell-parse-external-pipeline (if (re-search-forward pat next t) (throw 'found (match-beginning 1)) (goto-char next) - (while (or (eshell-parse-lisp-argument) - (eshell-parse-backslash) - (eshell-parse-double-quote) - (eshell-parse-literal-quote))) + (while (em-extpipe--or-with-catch + (eshell-parse-lisp-argument) + (eshell-parse-backslash) + (eshell-parse-double-quote) + (eshell-parse-literal-quote))) ;; Guard against an infinite loop if none of ;; the parsers moved us forward. (unless (or (> (point) next) (eobp)) diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el index e31db07c61..1e303f70e5 100644 --- a/test/lisp/eshell/eshell-tests.el +++ b/test/lisp/eshell/eshell-tests.el @@ -44,6 +44,10 @@ eshell-test/lisp-command "Test `eshell-command-result' with an elisp command." (should (equal (eshell-test-command-result "(+ 1 2)") 3))) +(ert-deftest eshell-test/lisp-command-with-quote () + "Test `eshell-command-result' with an elisp command containing a quote." + (should (equal (eshell-test-command-result "(eq 'foo nil)") nil))) + (ert-deftest eshell-test/for-loop () "Test `eshell-command-result' with a for loop.." (let ((process-environment (cons "foo" process-environment))) -- 2.30.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 01 21:31:21 2022 Received: (at 54603) by debbugs.gnu.org; 2 Apr 2022 01:31:21 +0000 Received: from localhost ([127.0.0.1]:44022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naSbp-00077D-Jj for submit@debbugs.gnu.org; Fri, 01 Apr 2022 21:31:21 -0400 Received: from mail-pl1-f170.google.com ([209.85.214.170]:33699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naSbn-00076y-QT for 54603@debbugs.gnu.org; Fri, 01 Apr 2022 21:31:20 -0400 Received: by mail-pl1-f170.google.com with SMTP id c23so3917165plo.0 for <54603@debbugs.gnu.org>; Fri, 01 Apr 2022 18:31:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=jcLUmqKZpM7xJJE2AUJa4rMSJ6rEn4xtMhPy9t0jEck=; b=HVtU8aEle9KR6YYkwv0WZWqEZKIrZ2JQaE2ZU/CcjsrcIqSPpiBQ7cDBH28INdyANb iqYvH+CnQ6FaXoioLfZaxwManHw9sUJtUK9QdP5gBbVSMySWUSapTayOhdcmmYOFfnqY svU0DvGABKqXW1erKhUOXUvn32ZtOJauUscZErNkh/vihT6+D94CMr0HeqcytHCmCkWk Sj91N4ud/DDfQYEvR9yXCm1FGA5Yd+gAVit8OufBfOSbpBTI9yJ/ZdNnyE2fkgN6saM7 qhCYjwsvG47hUTNCcRKHQ0JUniM+uJetUh1Uv5VSY5JVH35DDS87K1NrXxBPToj9oIgx 4RWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jcLUmqKZpM7xJJE2AUJa4rMSJ6rEn4xtMhPy9t0jEck=; b=xkbB4olJwYIZGoCezqWkMf01kKatkqpVFqsxIVZ1r7nycUrzsyUqA3WiRlXtROBVhY IqOh81gB4QWyaRZz+Db1qY26rwpmuLI8SUO8jhwLWgDN3uTLJZ8SttKQtfsz2zSfNUZq gG8YzJvodYfk9foeWteWxRvY4Lm9RxhFnf15YYqwTrxTP1eZ4cQGURi6nkfi27U1RDyW H2tvxMXt6hiGw3pFtUmTRJddweGlqaEWbXk5CZBWjWLSSA2mZOqcS+3x2EY33KVMT6Kl mL5gXg6aSI9fy2+zooxRdKv39OMQ9KYr1fskC6UhPC7Ouu72X92d+ka+/+scAUGXqTLo zteg== X-Gm-Message-State: AOAM531m9yaGTGRDVXk638fevRPLcsTOKK1TO8uq4NaORdxg/eN8fHO7 6V2PJM4xOidrYa+HDKWT//qiRnUkiE0= X-Google-Smtp-Source: ABdhPJwU6DZTJb+CzuSI+1Zd6t1bQvOfHHWGvwXdbFrqxaWzQivvrehb0QCeCEtdeIqeiTpoPhKlbg== X-Received: by 2002:a17:903:1d1:b0:154:61ec:749b with SMTP id e17-20020a17090301d100b0015461ec749bmr13127736plh.52.1648863073721; Fri, 01 Apr 2022 18:31:13 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id mq6-20020a17090b380600b001c6357f146csm16892133pjb.12.2022.04.01.18.31.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Apr 2022 18:31:13 -0700 (PDT) Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks To: Sean Whitton , 54603@debbugs.gnu.org References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <871qyij7vx.fsf@melete.silentflame.com> <87bkxliy76.fsf@melete.silentflame.com> <87y20pbuwu.fsf@athena.silentflame.com> <8191b68d-975d-3f84-bb0b-501bdf2edf47@gmail.com> <87fsmwo676.fsf@melete.silentflame.com> From: Jim Porter Message-ID: <84496787-7539-2fb6-3779-6f15bb8bf225@gmail.com> Date: Fri, 1 Apr 2022 18:31:13 -0700 MIME-Version: 1.0 In-Reply-To: <87fsmwo676.fsf@melete.silentflame.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54603 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 (-) On 4/1/2022 2:16 PM, Sean Whitton wrote: > Thank you for this suggestion, but I think that findbeg1 is more > readable, and actually perhaps more efficient, if we maintain the > (while (or ...)) structure. > > So I would like to install the attached patch to resolve this bug. Thanks, this patch looks good to me, though I didn't actually build with it. Just let me know if you'd like me to test it out. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 10:09:34 2022 Received: (at 54603) by debbugs.gnu.org; 2 Apr 2022 14:09:34 +0000 Received: from localhost ([127.0.0.1]:46347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naeRa-0008Dk-0b for submit@debbugs.gnu.org; Sat, 02 Apr 2022 10:09:34 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naeRY-0008DY-V0 for 54603@debbugs.gnu.org; Sat, 02 Apr 2022 10:09:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=9BcvIDrMJ6Ee1CGPrD2VqhXgz3l5lO7PuRDacJhZJvg=; b=QHqDd7EHFEr72fDPO3Nuo8DO7d rdtPo+mUXE1dFA73tqXgBtDOTQfo1xhYS5VhVHTkqyfZ0l8XJSn6NACtxh8Y+mXCOSzP8eU0VedNY f+xZEo6kDQuSVexZaLT7E23BFD4e2QKuOioJPQKEizFDGrUPg5TrAuccaXaXUXUrifQ8=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1naeRP-0006Dx-Q1; Sat, 02 Apr 2022 16:09:25 +0200 From: Lars Ingebrigtsen To: Jim Porter Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <871qyij7vx.fsf@melete.silentflame.com> <87bkxliy76.fsf@melete.silentflame.com> <87y20pbuwu.fsf@athena.silentflame.com> <8191b68d-975d-3f84-bb0b-501bdf2edf47@gmail.com> <87fsmwo676.fsf@melete.silentflame.com> <84496787-7539-2fb6-3779-6f15bb8bf225@gmail.com> X-Now-Playing: Pet Shop Boys's _Actually_: "It couldn't happen here" Date: Sat, 02 Apr 2022 16:09:21 +0200 In-Reply-To: <84496787-7539-2fb6-3779-6f15bb8bf225@gmail.com> (Jim Porter's message of "Fri, 1 Apr 2022 18:31:13 -0700") Message-ID: <87r16fk25q.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: Jim Porter writes: >> Thank you for this suggestion, but I think that findbeg1 is more >> readable, and actually perhaps more efficient, if we maintain the >> (while (or ...)) structure. >> So I would like to install th [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 54603 Cc: 54603@debbugs.gnu.org, Sean Whitton 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 (---) Jim Porter writes: >> Thank you for this suggestion, but I think that findbeg1 is more >> readable, and actually perhaps more efficient, if we maintain the >> (while (or ...)) structure. >> So I would like to install the attached patch to resolve this bug. > > Thanks, this patch looks good to me, though I didn't actually build > with it. Just let me know if you'd like me to test it out. I've now pushed Sean's patch to Emacs 29. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 10:09:50 2022 Received: (at control) by debbugs.gnu.org; 2 Apr 2022 14:09:50 +0000 Received: from localhost ([127.0.0.1]:46350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naeRq-0008EL-7k for submit@debbugs.gnu.org; Sat, 02 Apr 2022 10:09:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naeRo-0008E7-Et for control@debbugs.gnu.org; Sat, 02 Apr 2022 10:09:48 -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=IdpVF1WXm2YIfbYXP+e2UejjKelCsfgBNO8H2GSUSXY=; b=p8gGQtXtPkQBuN8Z983r84FTvq EfXpGNdc4hvQFgUDYQaSIue+G7lIuXhLb4aaxtMMfCOkiKZe3tet2jzULgkrobQQUYndD4IYSJTK0 05rcvybpqjQEPe+KENlJw+ersqZnBsTGZPtrISs395ggvMlMh6tmVNxCsiQWlw8I/bb4=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1naeRg-0006Er-SQ for control@debbugs.gnu.org; Sat, 02 Apr 2022 16:09:42 +0200 Date: Sat, 02 Apr 2022 16:09:38 +0200 Message-Id: <87pmlzk259.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #54603 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 54603 29.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: -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 54603 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 02 11:52:15 2022 Received: (at 54603) by debbugs.gnu.org; 2 Apr 2022 15:52:15 +0000 Received: from localhost ([127.0.0.1]:46625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nag2x-0000c4-Md for submit@debbugs.gnu.org; Sat, 02 Apr 2022 11:52:15 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:54655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nag2v-0000bs-OZ for 54603@debbugs.gnu.org; Sat, 02 Apr 2022 11:52:14 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4B9505C006D; Sat, 2 Apr 2022 11:52:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 02 Apr 2022 11:52:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; bh=2G4K35IxJZhVGgPyHoWDYPQZp55X00 I33OU/tJvoHq4=; b=biQcDjz64QayZ8vigFXDkNtbdmSKKq5bPTZMQorgpeFf/d YnfAckFHMNmPdk5GM3zTG5qVAroVdduc3jPuZ/L16aIHn3DXVA0o1StYiPRBuuh6 J9qLKIM9bYbyq9t2+73trWpr/6MjBi1fRKVfmLQrFuoekzvhzh+f/b+KEx0T8kCX 0JA/4/kJCw9VnF0cypAFIwN71im/qXTQqivRSBALYxkr72uDUs5b6fQxG0lhV7Y3 yPWLwGVRhIk3/TutLmj2LzKGJ96TVobtQTq9NfMoBCSSzsJmi7/Y3Eh1ajmFYo75 HxIDm9M8/sDxDIV+G+VEZ8ddGNB8+u5ffg/11TRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=2G4K35IxJZhVGgPyH oWDYPQZp55X00I33OU/tJvoHq4=; b=Fs/rsEzAP7jMklmqqc3I9IlZNdPaS/20D odXwxNTQGat2BXCxLXRsrDA2qn02763umdyn8cxm9zzeDRf6cxTS5pPiDwfW91Wo DE7BDFb7k8U+TEZpWZpAKpHCqPYUgtoIrgqZKlEAcdeq7sb5bKBdN4xb5nMIKSIQ IDo9hNXqx5B7d5+mq+kgqke1kckrTS5OKRx7WxiCrNQa8wffd8xaO9T5ESQpVPBL hihhrYfcqXEXUcTQvjazQLWU2DTtpPZHGZ9JXQ9ZXrKUOvY02cdTB5/bt+dfQ8WF Dry1HMezrhIZgRaDmFQ3hBlV23rAxEboJOxvk+La082RLTJLZOV7Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeikedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhgffffkgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepleeggefgvdeijedvhfdugfegtefgkeekueeileejjeehudeg geefteeghfeuffeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 2 Apr 2022 11:52:08 -0400 (EDT) Received: by athena.silentflame.com (Postfix, from userid 1000) id EE55C1BA774; Sat, 2 Apr 2022 15:52:05 +0000 (UTC) From: Sean Whitton To: Lars Ingebrigtsen , Jim Porter Subject: Re: bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks In-Reply-To: <87r16fk25q.fsf@gnus.org> References: <70677cd2-f741-16d1-b38f-c39b507cc95e@gmail.com> <871qyij7vx.fsf@melete.silentflame.com> <87bkxliy76.fsf@melete.silentflame.com> <87y20pbuwu.fsf@athena.silentflame.com> <8191b68d-975d-3f84-bb0b-501bdf2edf47@gmail.com> <87fsmwo676.fsf@melete.silentflame.com> <84496787-7539-2fb6-3779-6f15bb8bf225@gmail.com> <87r16fk25q.fsf@gnus.org> User-Agent: Emacs/29.0.50 (x86_64-pc-linux-gnu) Date: Sat, 02 Apr 2022 08:52:05 -0700 Message-ID: <87o81jbhzu.fsf@athena.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54603 Cc: 54603@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.7 (-) Hello, On Sat 02 Apr 2022 at 04:09pm +02, Lars Ingebrigtsen wrote: > Jim Porter writes: > >>> Thank you for this suggestion, but I think that findbeg1 is more >>> readable, and actually perhaps more efficient, if we maintain the >>> (while (or ...)) structure. >>> So I would like to install the attached patch to resolve this bug. >> >> Thanks, this patch looks good to me, though I didn't actually build >> with it. Just let me know if you'd like me to test it out. > > I've now pushed Sean's patch to Emacs 29. Sweet, thanks both! -- Sean Whitton From unknown Sat Jun 14 19:09:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 01 May 2022 11:24:04 +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