From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#57129: 29.0.50; Improve behavior of conditionals in Eshell Date: Mon, 15 Aug 2022 09:14:04 -0700 Message-ID: <7259f313-c6ef-bce8-ddc4-e35ecc27d856@gmail.com> References: <8fb3461d-b7eb-23c4-2736-cdd6dfeb1aa0@gmail.com> <87mtc9o5af.fsf@gnus.org> <83h72gmxtq.fsf@gnu.org> <7c04a92b-85f4-41c3-917b-4716cca2b9d6@gmail.com> <83pmh3l8ey.fsf@gnu.org> <9ca08054-5b73-a13e-0478-d838b650317b@gmail.com> <837d3bl1tx.fsf@gnu.org> <5ff283e8-9ced-5894-1075-43bba580185e@gmail.com> <831qthiu0s.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 57129@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 18:25:06 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oNctl-0005pL-1D for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 18:25:05 +0200 Original-Received: from localhost ([::1]:41052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNctj-0001IK-TH for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 12:25:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNck2-0003St-5O for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 12:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54177) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNck1-0004QJ-Rm for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 12:15:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNck1-0008KS-KF for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 12:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2022 16:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57129 X-GNU-PR-Package: emacs Original-Received: via spool by 57129-submit@debbugs.gnu.org id=B57129.166058005331926 (code B ref 57129); Mon, 15 Aug 2022 16:15:01 +0000 Original-Received: (at 57129) by debbugs.gnu.org; 15 Aug 2022 16:14:13 +0000 Original-Received: from localhost ([127.0.0.1]:43926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNcjF-0008Is-A1 for submit@debbugs.gnu.org; Mon, 15 Aug 2022 12:14:13 -0400 Original-Received: from mail-pf1-f180.google.com ([209.85.210.180]:42976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNcjD-0008Id-62 for 57129@debbugs.gnu.org; Mon, 15 Aug 2022 12:14:11 -0400 Original-Received: by mail-pf1-f180.google.com with SMTP id f192so6981819pfa.9 for <57129@debbugs.gnu.org>; Mon, 15 Aug 2022 09:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:from:to:cc; bh=xWezpF9ofczCp9MQkHmEpZq5/AbdlIsYu/Q7fGVCvkw=; b=BJ9t5sz/yjYSF4Gu2rl/SkajoPb1i17tFULt6To2RjXB41pofj9K0wNxDg5BwcGivg 9vGiKRYuj4Af/jSMnQ+Tud27n9kHBdtVpTDMpnQcw1BZORaUnZD+zCkFixcrRQ2us4/c ld0izj1jfL0ZMI9T/DBvjjCRFlkhaYYic2VSGQWpXgOJ92L0ARMzvHhqbn8XtbNUcuz4 9P5xjXXUO0K4Hndo+rsREAod+Rrn3S6vW3kcev4oicvbY0ZqcdJa6wySIm92cmLRtVcW 9IjS7C3YR/miS5k/tvtjWhWqVy33PL8ak6eQz9kOHxbnvycSeYwty32+1rm500HZ8qjr mbEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :date:message-id:from:references:cc:to:subject:x-gm-message-state :from:to:cc; bh=xWezpF9ofczCp9MQkHmEpZq5/AbdlIsYu/Q7fGVCvkw=; b=C9/KHHd5vdQLgB5foQlEvAAW8pV2tm7vsGKzHTGFRA/kryRN1xNtOPFzrkqA5vbtih iImpoUXyT3pHN/atDgj1XONNR3WZUQ9Vp6OHfMI6Z/EZ8JBRxjJbZgi1k//S2NPLPhL+ 5oY9RiBP6YZmCh+7P/ThWR6VZu0oK8gIiVaQVTDYmzqmpzxLD5cwNnlI9CszLlFOZybR 8JKcpFyKDJnzUZAXj8kStnTxWK53QPwHrOeQw3TPxBp+co6zLgzXHrIcJwGL0SJaYZ5O 2+DGvm/pu+HU9A6qqW6lQPado+RWQIAZvfConUU8m8G/PguaXjM9w6pR2wBCNzLVglHs WKGQ== X-Gm-Message-State: ACgBeo25JD43ZFYTn/zBUHjkzLtLQ1HUh/B2Ja1DJApveGbi3UcLKWJC HXrPS4V4gR6+ikpLjj/B3PjiWzmD36A= X-Google-Smtp-Source: AA6agR4XCaMIioUibg2bvlSU3v81bk+t9YWnJ7t/3VC9oYmWumsKpjF14Tqo37/tFSD0dvv9+8WvCA== X-Received: by 2002:a05:6a00:158b:b0:52e:6fe3:537d with SMTP id u11-20020a056a00158b00b0052e6fe3537dmr16868881pfk.51.1660580045215; Mon, 15 Aug 2022 09:14:05 -0700 (PDT) Original-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 a85-20020a621a58000000b0052abfc4b4a4sm6962182pfa.12.2022.08.15.09.14.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Aug 2022 09:14:04 -0700 (PDT) In-Reply-To: <831qthiu0s.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:239815 Archived-At: On 8/15/2022 5:13 AM, Eli Zaretskii wrote: >> Cc: larsi@gnus.org, 57129@debbugs.gnu.org >> From: Jim Porter >> Date: Sun, 14 Aug 2022 14:40:06 -0700 >> >> You could try some Eshell commands that don't use subprocesses to see if >> that changes anything. For example, these should only use Lisp functions: >> >> ;; Should print "first" in the Eshell buffer: >> eshell/echo ${eshell/echo $eshell-in-pipeline-p | eshell/echo} >> eshell/echo ${eshell/echo $eshell-in-pipeline-p | eshell/echo} | >> eshell/echo >> >> ;; Should open a temp file containing "first" in a new buffer: >> find-file $ >> find-file $ | >> eshell/echo >> >> The "eshell/" prefix probably isn't necessary, but I figured it's worth >> being extra-careful here while diagnosing the issue. I'm particularly >> interested in whether the third and fourth commands work. If they work, >> that would definitely point towards a bug in Eshell's subprocess >> handling; if not, then that would point to a bug in the "$" >> handling. > > All the 4 commands do what you say they should do. Hm, and I can't reproduce this on the prebuilt Emacs 29 snapshot from July 18, which is from just before I merged the changes to 'make-process', so it's definitely possible that this is due to those commits. Does reverting 4e59830bc0ab17cdbd85748b133c97837bed99e3 and d7b89ea4077d4fe677ba0577245328819ee79cdc fix the issue? I checked locally, and they should revert cleanly at least. It might also be interesting to revert just the changes from d7b89ea in lisp/eshell/esh-proc.el. I don't think any of the changes I made to the C sources should impact this, since a) I was careful to keep the logic as close to before as I could, and b) it just changes the logic for creating a PTY, which doesn't work on MS Windows anyway. I did notice one weird issue though, and maybe this has something to do with the problem: on MS Windows, if I run any command with a $, the second and subsequent times, it warns me about changing the temp file, e.g.: 3Zz80A has changed since visited or saved. Save anyway? (yes or no) This probably shouldn't do that, and it could definitely cause issues in the tests, which can't prompt the user for things like that.