From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#57129: 29.0.50; Improve behavior of conditionals in Eshell Date: Sun, 14 Aug 2022 08:07:49 +0300 Message-ID: <83pmh3l8ey.fsf@gnu.org> References: <8fb3461d-b7eb-23c4-2736-cdd6dfeb1aa0@gmail.com> <87mtc9o5af.fsf@gnus.org> <83h72gmxtq.fsf@gnu.org> <7c04a92b-85f4-41c3-917b-4716cca2b9d6@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29906"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 57129@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 14 07:09:33 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 1oN5sT-0007ae-0t for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Aug 2022 07:09:33 +0200 Original-Received: from localhost ([::1]:50118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oN5sO-0002DB-Ey for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Aug 2022 01:09:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oN5rz-0002Cy-35 for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 01:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oN5ry-0000H3-O5 for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 01:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oN5ry-0005cm-Id for bug-gnu-emacs@gnu.org; Sun, 14 Aug 2022 01:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Aug 2022 05: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.166045369621567 (code B ref 57129); Sun, 14 Aug 2022 05:09:02 +0000 Original-Received: (at 57129) by debbugs.gnu.org; 14 Aug 2022 05:08:16 +0000 Original-Received: from localhost ([127.0.0.1]:35608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN5rD-0005bn-MH for submit@debbugs.gnu.org; Sun, 14 Aug 2022 01:08:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oN5rA-0005bX-Mt for 57129@debbugs.gnu.org; Sun, 14 Aug 2022 01:08:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oN5r5-0000Ex-BG; Sun, 14 Aug 2022 01:08:07 -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=wwj8iPp1pw6US8Cnw4BfPlkkjS8/4kvB+P7BwyHYDjw=; b=rHZfBj9GX5ja 2/uiwysZbge1PZELxHEe3GKyHryUjMN6lraZeAqr6eHUj8vW53SkwV3oWW6P+4FcO2gDN7/6p3JnC Uo10RMNzdZwNCNazhNxQuF9WKsGfmBzqXe7Hy4ls2Lsybzqu4k9jUESNyu++YmRIkxyS3/fR8ZsQm McEZ2VY6O2V1OgAJ3ckJDAlduVUn10ARxf1BTg4XPnUnkSnnc4jZUu6YqQA/1GAJdEaxz1jgitzaU fwkHxOhIdJbftVUeCMnMy2wY7xrbsVyWgnSRZhoZ8zQkA4KSiqa10yuWvX8oTllZtz5bw0WjAsdY1 jUJLKOHwziJAzzzP3hSbmw==; Original-Received: from [87.69.77.57] (port=2444 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 1oN5r4-0000lX-M6; Sun, 14 Aug 2022 01:08:07 -0400 In-Reply-To: <7c04a92b-85f4-41c3-917b-4716cca2b9d6@gmail.com> (message from Jim Porter on Sat, 13 Aug 2022 11:56:20 -0700) 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:239613 Archived-At: > Cc: larsi@gnus.org, 57129@debbugs.gnu.org > From: Jim Porter > Date: Sat, 13 Aug 2022 11:56:20 -0700 > > On 8/13/2022 12:01 AM, Eli Zaretskii wrote: > > One of the tests in esh-var-tests.el failed on MS-Windows; I fixed it, > > although I'm not sure it's a correct fix, because the Eshell manual > > seems to say that a built-in implementation of a command should be > > preferred by default? > > Sorry about that. I think that's the right fix for that case. Maybe it > would make sense to set 'eshell-prefer-lisp-functions' to t for most of > the Eshell tests to improve reproducibility on various platforms; tests > that want an external command can just put a "*" in front of the command > name. But then this fragment from the Eshell manual: The command can be either an Elisp function or an external command. Eshell looks first for an alias (*note Aliases::) with the same name as the command, then a built-in (*note Built-ins::) or a function with the same name; if there is no match, it then tries to execute it as an external command. seems to be inaccurate? Since 'format' exists as a built-in command, why did Eshell in this case invoke the external command instead? > I'm surprised that test fails on MS Windows, since it *should* be > testing internal Eshell logic that's not platform-specific. Based on the > failure, it looks like one of the following commands is returning the > wrong value: > > echo {echo $eshell-in-pipeline-p | echo} | *cat > echo ${echo $eshell-in-pipeline-p | echo} | *cat > *cat $ | *cat > > All of these should return 'first'. The first two do; the last one returns nothing. > That test is just checking that, > when you're in a subcommand ({...}, ${...}, or $<...>), the value of > 'eshell-in-pipeline-p' shouldn't be influenced by the pipeline in the > "super-command". Some built-in Eshell commands consult > 'eshell-in-pipeline-p', and if it had the wrong value, they might do the > wrong thing. So how to investigate this failure further? > If nothing else, it would probably be helpful to set up ERT explainers > so that the error messages are easier to understand. As it is now, > they're not very explanatory. Indeed, more explanations in this and other tests will be most welcome. Thanks.