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#54470: 29.0.50; [PATCH] Add documentation/tests for Eshell argument expansion Date: Fri, 15 Apr 2022 15:56:32 +0300 Message-ID: <83zgkm1p4v.fsf@gnu.org> References: <83bky1f6jk.fsf@gnu.org> <83k0ca7fo6.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3579"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54470@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 15 14:57:12 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 1nfLVf-0000lt-TF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Apr 2022 14:57:12 +0200 Original-Received: from localhost ([::1]:56122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nfLVe-00023m-ES for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Apr 2022 08:57:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfLVW-00023T-QG for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2022 08:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nfLVW-0004SP-HW for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2022 08:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nfLVW-00052W-3g for bug-gnu-emacs@gnu.org; Fri, 15 Apr 2022 08:57: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: Fri, 15 Apr 2022 12:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54470 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54470-submit@debbugs.gnu.org id=B54470.165002738919316 (code B ref 54470); Fri, 15 Apr 2022 12:57:02 +0000 Original-Received: (at 54470) by debbugs.gnu.org; 15 Apr 2022 12:56:29 +0000 Original-Received: from localhost ([127.0.0.1]:58312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfLUy-00051T-8e for submit@debbugs.gnu.org; Fri, 15 Apr 2022 08:56:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nfLUw-00051D-6O for 54470@debbugs.gnu.org; Fri, 15 Apr 2022 08:56:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfLUq-0004Qg-RJ; Fri, 15 Apr 2022 08:56:20 -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=ji9aMszpR5QnYuDBW2mcfydrY1xB50isiDmECU5ZXgI=; b=IPIcqKkAZLaw lYWrZl1bNoZiJyRgXmIveepq30+Zrq/VJ6PchlTfwFJZQcvbalT/uWmDPqvjOFiqBXn0vYuKoQxdw gGTM5Q6Gl7aY/L5TMcYabJx4RQhT7SEcWMXZcrPMgWzX1NuCPSTCFbte0UiRmZhzuqjzZQTGfj2U0 JVQ5zqr8IOiw/+6qrzrWamGI0fpU+09u2ZJF0ybDBuliFF3MEy7XC1w7SUcsQflpKJKsnnOAR0klq adRuJy2/x0hLUdkx+2nCOkJs5is7wggSoNLHhTHro282w22xni9wpJKOBLYGFLKzdntz/eQysGCYF sSzmbYFFAPUqpx4I8B0ZCQ==; Original-Received: from [87.69.77.57] (port=4716 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 1nfLUq-00021X-9k; Fri, 15 Apr 2022 08:56:20 -0400 In-Reply-To: (message from Jim Porter on Fri, 1 Apr 2022 22:10:07 -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:229934 Archived-At: > Cc: 54470@debbugs.gnu.org > From: Jim Porter > Date: Fri, 1 Apr 2022 22:10:07 -0700 > > > @kbd is right for things that are meant specifically and only as > > keyboard input. > > Thanks for the explanation. > > Having thought this over further, I think Eli's suggestion to use @samp > makes sense for both the globs and the predicates/modifiers, so I've > updated my patches to do this. Thanks. I was about to install these, but then I saw that some of the tests you added fail on my system: Test em-pred-test/combine-predicate-and-modifier backtrace: signal(ert-test-failed (((should (equal (eshell-eval-predicate files ert-fail(((should (equal (eshell-eval-predicate files ".:e:u") '("el (if (unwind-protect (setq value-724 (apply fn-722 args-723)) (setq f (let (form-description-726) (if (unwind-protect (setq value-724 (app (let ((value-724 'ert-form-evaluation-aborted-725)) (let (form-descr (let* ((fn-722 #'equal) (args-723 (condition-case err (let ((signal- (let ((files '("/fake/type=-.el" "/fake/type=-.txt" "/fake/type=s.el (progn (fset #'file-executable-p vnew) (fset #'file-symlink-p vnew) (unwind-protect (progn (fset #'file-executable-p vnew) (fset #'file- (let* ((vnew #'(lambda (file &rest rest) (apply (if (and ... ...) #' (closure (t) nil (let* ((vnew #'(lambda (file &rest rest) (apply (if ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name em-pred-test/combine-predicate-and-mo 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/em-pred-tests command-line() normal-top-level() Test em-pred-test/combine-predicate-and-modifier condition: (ert-test-failed ((should (equal (eshell-eval-predicate files ".:e:u") '...)) :form (equal nil ("el" "txt")) :value nil :explanation (different-types nil ("el" "txt")))) FAILED 1/34 em-pred-test/combine-predicate-and-modifier (0.484375 sec) at lisp/eshell/em-pred-tests.el:513 Test em-pred-test/predicate-file-types backtrace: signal(ert-test-failed (((should (equal (eshell-eval-predicate files ert-fail(((should (equal (eshell-eval-predicate files "%") '("/fake/ (if (unwind-protect (setq value-20 (apply fn-18 args-19)) (setq form (let (form-description-22) (if (unwind-protect (setq value-20 (apply (let ((value-20 'ert-form-evaluation-aborted-21)) (let (form-descrip (let* ((fn-18 #'equal) (args-19 (condition-case err (let ((signal-ho (let ((files (mapcar #'(lambda (i) (format "/fake/type=%s" i)) '("b" (progn (fset #'file-executable-p vnew) (fset #'file-symlink-p vnew) (unwind-protect (progn (fset #'file-executable-p vnew) (fset #'file- (let* ((vnew #'(lambda (file &rest rest) (apply (if (and ... ...) #' (closure (t) nil (let* ((vnew #'(lambda (file &rest rest) (apply (if ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name em-pred-test/predicate-file-types :do 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/em-pred-tests command-line() normal-top-level() Test em-pred-test/predicate-file-types condition: (ert-test-failed ((should (equal (eshell-eval-predicate files "%") '...)) :form (equal nil ("/fake/type=b" "/fake/type=c")) :value nil :explanation (different-types nil ("/fake/type=b" "/fake/type=c")))) FAILED 29/34 em-pred-test/predicate-file-types (0.140625 sec) at lisp/eshell/em-pred-tests.el:152 Test em-pred-test/predicate-links backtrace: signal(ert-test-failed (((should (equal (eshell-eval-predicate files ert-fail(((should (equal (eshell-eval-predicate files "l1") '("/fake (if (unwind-protect (setq value-214 (apply fn-212 args-213)) (setq f (let (form-description-216) (if (unwind-protect (setq value-214 (app (let ((value-214 'ert-form-evaluation-aborted-215)) (let (form-descr (let* ((fn-212 #'equal) (args-213 (condition-case err (let ((signal- (let ((files '("/fake/links=1" "/fake/links=2" "/fake/links=3"))) (l (progn (fset #'file-executable-p vnew) (fset #'file-symlink-p vnew) (unwind-protect (progn (fset #'file-executable-p vnew) (fset #'file- (let* ((vnew #'(lambda (file &rest rest) (apply (if (and ... ...) #' (closure (t) nil (let* ((vnew #'(lambda (file &rest rest) (apply (if ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name em-pred-test/predicate-links :documen 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/em-pred-tests command-line() normal-top-level() Test em-pred-test/predicate-links condition: (ert-test-failed ((should (equal (eshell-eval-predicate files "l1") '...)) :form (equal nil ("/fake/links=1")) :value nil :explanation (different-types nil ("/fake/links=1")))) FAILED 31/34 em-pred-test/predicate-links (0.000000 sec) at lisp/eshell/em-pred-tests.el:228 Test em-pred-test/predicate-size backtrace: signal(ert-test-failed (((should (equal (eshell-eval-predicate files ert-fail(((should (equal (eshell-eval-predicate files "L2048") '("/f (if (unwind-protect (setq value-379 (apply fn-377 args-378)) (setq f (let (form-description-381) (if (unwind-protect (setq value-379 (app (let ((value-379 'ert-form-evaluation-aborted-380)) (let (form-descr (let* ((fn-377 #'equal) (args-378 (condition-case err (let ((signal- (let ((files '("/fake/size=0" "/fake/size=1024" "/fake/size=2048" "/ (progn (fset #'file-executable-p vnew) (fset #'file-symlink-p vnew) (unwind-protect (progn (fset #'file-executable-p vnew) (fset #'file- (let* ((vnew #'(lambda (file &rest rest) (apply (if (and ... ...) #' (closure (t) nil (let* ((vnew #'(lambda (file &rest rest) (apply (if ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test ert-run-test(#s(ert-test :name em-pred-test/predicate-size :document 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/em-pred-tests command-line() normal-top-level() Test em-pred-test/predicate-size condition: (ert-test-failed ((should (equal (eshell-eval-predicate files "L2048") '...)) :form (equal nil ("/fake/size=2048")) :value nil :explanation (different-types nil ("/fake/size=2048")))) FAILED 33/34 em-pred-test/predicate-size (0.156250 sec) at lisp/eshell/em-pred-tests.el:321 Can you fix these failures and resubmit? If they are due to some MS-Windows specific issues, please tell how can I help you with diagnosing the problem. Thanks.