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: Sat, 13 Aug 2022 10:01:21 +0300 Message-ID: <83h72gmxtq.fsf@gnu.org> References: <8fb3461d-b7eb-23c4-2736-cdd6dfeb1aa0@gmail.com> <87mtc9o5af.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30966"; 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 Sat Aug 13 09:02:32 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 1oMlAF-0007w6-S2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 09:02:32 +0200 Original-Received: from localhost ([::1]:46942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMlAE-00006S-HO for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Aug 2022 03:02:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl9n-00005Q-Ai for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 03:02:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41562) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl9m-0007ez-4f for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 03:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl9l-00072x-VT for bug-gnu-emacs@gnu.org; Sat, 13 Aug 2022 03:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Aug 2022 07:02: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.166037409327051 (code B ref 57129); Sat, 13 Aug 2022 07:02:01 +0000 Original-Received: (at 57129) by debbugs.gnu.org; 13 Aug 2022 07:01:33 +0000 Original-Received: from localhost ([127.0.0.1]:59544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl9J-00072F-8p for submit@debbugs.gnu.org; Sat, 13 Aug 2022 03:01:33 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl9G-000722-QV for 57129@debbugs.gnu.org; Sat, 13 Aug 2022 03:01:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl9B-0007ck-Fz; Sat, 13 Aug 2022 03:01:25 -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=0za/p4bW66vvCfDhe/VTfduRwj3jlWzxG0ZH/WiL+bA=; b=YettXuTIZML7 YOOmk+majt9vtkTroQARpLGiIwtm7a7TDfpWYwVQObsUeW7bmH2nxRbWQZsCEoenwE18m07QGEC4+ s8sGh4Dc3DeR4H9D/gsXxaNdSv8xlsM4+JC7b2ipoT8Yivsh41YH0IiiWA3BVmMHsnbhMlm53Qbiw 0a2OeEc3uRa1orHPaGz42NwJPevaH11HeeM1TyVVnE5sIw5B1zAhvwStVe6CQsl6Zkon+6qjfmy/c FhqMvhOcfnwybc07JvZH4QtcX88aiX2GKBhCRnSj1IgOQKA2sSLN6pURBTMoy80X4qU080DaY0S+H h9ik2a8qk6Txc0EkvV/xkw==; Original-Received: from [87.69.77.57] (port=1075 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 1oMl9A-0004UO-Tk; Sat, 13 Aug 2022 03:01:25 -0400 In-Reply-To: (message from Jim Porter on Fri, 12 Aug 2022 22:14:02 -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:239493 Archived-At: > Cc: 57129@debbugs.gnu.org > From: Jim Porter > Date: Fri, 12 Aug 2022 22:14:02 -0700 > > On 8/12/2022 8:22 AM, Lars Ingebrigtsen wrote: > > Jim Porter writes: > > > >> Here are some patches to fix this. > > > > I haven't tested the patches, but reading them, they make sense to me, > > so please go ahead and push. > > Thanks for taking a look. Merged as > f3408af0a3251a744cb0b55b5e153565bfd57ea3. 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? One of the tests in eshell-tests.el also fails on MS-Windows, but I have no idea how to fix it, nor even what are the details of the test. Are the 'echo' commands in that test supposed to be external shell commands or internal Eshell commands? If the former, it could be a problem on MS-Windows. (This is a good example of my gripes about the test suite, which I described in bug#57150 yesterday: debugging a failure is unnecessarily hard and tedious. There's no information about the specific intent of the test and its inner workings and assumptions, except the general idea described in the doc string.) Here's the failure I get: Test eshell-test/subcommand-reset-in-pipeline backtrace: signal(ert-test-failed (((should (equal (eshell-test-command-result ert-fail(((should (equal (eshell-test-command-result (format templat (if (unwind-protect (setq value-38 (apply fn-36 args-37)) (setq form (let (form-description-40) (if (unwind-protect (setq value-38 (apply (let ((value-38 'ert-form-evaluation-aborted-39)) (let (form-descrip (let* ((fn-36 #'equal) (args-37 (condition-case err (let ((signal-ho (let ((template (car --dolist-tail--))) (let* ((fn-26 #'equal) (args (while --dolist-tail-- (let ((template (car --dolist-tail--))) (let* (let ((--dolist-tail-- '("echo {%s} | *cat" "echo ${%s} | *cat" "*ca (closure (t) nil (let* ((fn-21 #'executable-find) (args-22 (conditio ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name eshell-test/subcommand-reset-in-pipel ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp)))) ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n command-line-1(("-L" ";." "-l" "ert" "-l" "lisp/eshell/eshell-tests. command-line() normal-top-level() Test eshell-test/subcommand-reset-in-pipeline condition: (ert-test-failed ((should (equal (eshell-test-command-result ...) "first")) :form (equal nil "first") :value nil :explanation (different-types nil "first"))) FAILED 18/18 eshell-test/subcommand-reset-in-pipeline (1.873920 sec) at lisp/eshell/eshell-tests.el:80