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 11:08:45 -0700 Message-ID: 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> <7259f313-c6ef-bce8-ddc4-e35ecc27d856@gmail.com> <83pmh1h2pv.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="499"; 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 20:09:22 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 1oNeWe-000ASc-UZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 20:09:21 +0200 Original-Received: from localhost ([::1]:39738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNeWd-0003Ed-Ky for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 14:09:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNeWM-0003EQ-Qa for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 14:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNeWM-0006KQ-HR for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 14:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNeWM-0002mY-6N for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 14:09:02 -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 18:09:02 +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.166058694010687 (code B ref 57129); Mon, 15 Aug 2022 18:09:02 +0000 Original-Received: (at 57129) by debbugs.gnu.org; 15 Aug 2022 18:09:00 +0000 Original-Received: from localhost ([127.0.0.1]:44017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNeWJ-0002mI-V3 for submit@debbugs.gnu.org; Mon, 15 Aug 2022 14:09:00 -0400 Original-Received: from mail-pf1-f175.google.com ([209.85.210.175]:36717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNeWE-0002lw-2P for 57129@debbugs.gnu.org; Mon, 15 Aug 2022 14:08:58 -0400 Original-Received: by mail-pf1-f175.google.com with SMTP id a22so6656903pfg.3 for <57129@debbugs.gnu.org>; Mon, 15 Aug 2022 11:08:54 -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=QwF5+71Fr54YILFVnFOUDs1tU7J+xO3wGJJcT+AJs60=; b=ZRZHboGq9eGtjP/AIIFOqSzdEkRiiZAu70kh761zQ7l0pxfUTpkLim613a+7Fbc8yU 3jhaDyOJm1fcwurcI4Sn2d7GNDaMmtAxuwHRU2bHlmBYC8P+iQuJEkfxbHjWAyU5F00R gi1cWxm5cWBkR6SSoMfXaz/49z+ghsVkoLVsVjlwkrHf9EYCXoNqYoOXX5cqV7IfRpxQ krGlxIWkv4y+NEPeeSBWUFW9ZaYM/2lcXwD0O8DJtVXt9S+rwpZy0XL9nav873+zh6Df 8KYEbaXfDpAOSPQhiKVkNFBcGRLyIgxGnHzPnqs0leMr0D+RnfqNU1ExH0Lari4lGIOm AYfA== 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=QwF5+71Fr54YILFVnFOUDs1tU7J+xO3wGJJcT+AJs60=; b=7olAVCFY+YwTAn0sk+xOMsWcakB1fI3/00lwSDIexC9FkY3J+OWo0mCxnzOU2KTEKP /Y+SN9qBC33dPj9b2YRrXIx/Tgq0bRExkO24ishnNMS2XwEPN7ZOLl1g8708C4ivbPij S7Z6X1+jrtGeu69uEOesh9jR6TeXiLmDZzXed8DijSMSpb71ArSlA9VuRPTAOi3MnIY3 nr+lEkL6Ohv6AknnUFOfC2hhq1tYsAVB4ajt7OOwSYH0hyIYGnoAi/Zdzx+73DH0G79u NhJZSrcGmEt6kGvmltvRTKuuGPpBNLyuowu58O28kZb/Y8gqbBqaTrSeQ2ueeD9NCluU jRFg== X-Gm-Message-State: ACgBeo3GVqjZrnGqsmyZnvWHNgQ5OyiFN5fECt2so+VkWT5Ye+8uzJBh rV6MGGrX7jDgpRyRF8QhMqn1Q7g9pOw= X-Google-Smtp-Source: AA6agR4olejpgnJ/QqRfsYwkROVw0BXTt/ZCVXv0f7D0zjNnJdbKAwr3wn8VnHyLpfGHcJTY0nMIiA== X-Received: by 2002:a63:80c7:0:b0:41c:62dd:2109 with SMTP id j190-20020a6380c7000000b0041c62dd2109mr14427834pgd.449.1660586928101; Mon, 15 Aug 2022 11:08:48 -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 p23-20020a63e657000000b0041d02809facsm6101001pgj.79.2022.08.15.11.08.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Aug 2022 11:08:46 -0700 (PDT) In-Reply-To: <83pmh1h2pv.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:239823 Archived-At: On 8/15/2022 9:49 AM, Eli Zaretskii wrote: > None of these reverts fixes the issue. I tried both the tests in > eshell-tests.el and the problematic command: > > *cat $ | *cat Thanks for testing. I might have to get an MS-Windows dev environment set up to dig into this further. I'm a bit worried that this is related to bug#55590, where I had to jump through some awkward hoops to fix a somewhat-related issue with Eshell subcommands. I think that's due to 'eshell-do-eval' being written before lexical binding existed, and so the variable scoping doesn't work quite as expected. It could be that you only see this failure when using external commands due to some differences in timing. If that's the problem here too, it would be a pain to fix (but it would likely also mean that this bug has been present for a long time, and my tests/fixes have just brought it to the surface). As mentioned in bug#55590, I think it'd be nice to rip out 'eshell-do-eval' and replace it with the generator.el machinery, since they're conceptually pretty similar. That's easier said than done though... >> 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. > > I guess this means you somehow reuse the same temporary file on > MS-Windows? Maybe change the test a bit so that the file name > definitely differs? I need to investigate this a bit further, since on GNU/Linux, I get a new temp file every time. I think that's the behavior we want, or failing that, we could at least kill the temp file's buffer after we're done with it. I don't think there's much value in leaving it around.