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: Mon, 15 Aug 2022 15:13:55 +0300 Message-ID: <831qthiu0s.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> <83pmh3l8ey.fsf@gnu.org> <9ca08054-5b73-a13e-0478-d838b650317b@gmail.com> <837d3bl1tx.fsf@gnu.org> <5ff283e8-9ced-5894-1075-43bba580185e@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23992"; 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 Mon Aug 15 14:15:55 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 1oNZ0b-00066j-Q6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 14:15:53 +0200 Original-Received: from localhost ([::1]:40916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNZ0a-00022z-6c for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 08:15:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNYzn-00022U-KW for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 08:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51402) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNYzn-0006o3-2s for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 08:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNYzm-0007gM-UQ for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 08:15: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: Mon, 15 Aug 2022 12:15: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.166056565929442 (code B ref 57129); Mon, 15 Aug 2022 12:15:02 +0000 Original-Received: (at 57129) by debbugs.gnu.org; 15 Aug 2022 12:14:19 +0000 Original-Received: from localhost ([127.0.0.1]:41147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYz4-0007eo-LH for submit@debbugs.gnu.org; Mon, 15 Aug 2022 08:14:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNYz0-0007ea-Ts for 57129@debbugs.gnu.org; Mon, 15 Aug 2022 08:14:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNYyu-0006fW-ST; Mon, 15 Aug 2022 08:14:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=tOZ1cU/d2Nc9bCi3YhX/8saTAdIO9H2VCRWEdMPCYIY=; b=a8HRQgHOTlE2l9g2Z2zR S0cHB+MA8KMedilhj+Jt0bO2GfTsS3XfYSFbj1vBFNfrpld5wz8SsIpsR8hOr/XKb+PLjs9i9Zegs X4j1/6rqEi6v7uscdOkMgxjjPP1u/HhpkL5ZSoSDwsi4fcKiWEYKmu+2oyi/QXF5N0C86bd6rlQ68 42lNcU6qgPOyqNBYMzsG9B1RezKsBKi6GDhioti+FIku0cI5v0S1nIZh61XOYkicUwn+/qGS14nh0 Uk1C8+6TUeoY5XEEepM84L9hPR+njnqO/N62BFp4gVBF/U7HohBvWcaWlDzuKlxAR8hxio3w2jxFN dndFaTsye4Ui6w==; Original-Received: from [87.69.77.57] (port=1688 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 1oNYyu-0004e1-Cq; Mon, 15 Aug 2022 08:14:08 -0400 In-Reply-To: <5ff283e8-9ced-5894-1075-43bba580185e@gmail.com> (message from Jim Porter on Sun, 14 Aug 2022 14:40:06 -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:239790 Archived-At: > Cc: larsi@gnus.org, 57129@debbugs.gnu.org > From: Jim Porter > Date: Sun, 14 Aug 2022 14:40:06 -0700 > > On 8/14/2022 12:30 AM, Eli Zaretskii wrote: > > The manual definitely should be clarified in that matter, because: > > > > d:/gnu/git/emacs/trunk/src $ which format > > format is a built-in function in ‘C source code’. > > > > To me this says that 'format' is a built-in command, and the manual > > says such commands should be invoked in preference to external > > commands. The "eshell/" part is not mentioned anywhere. > > I'll work on a fix for that. This is a little more complex than > immediately apparent though, since Eshell also unfortunately uses the > term "alias" to refer to two kinds of entities: > > 1) Command abbreviations created by the user using the 'alias' command, > e.g. "alias ll 'ls -l'". These are sometimes called "command > aliases", and are implemented in em-alias.el. > > 2) Lisp functions with names like 'eshell/FOO'. These are sometimes > called "alias functions", and are implemented in esh-cmd.el. For > example, see 'eshell-find-alias-function', which checks if > 'eshell/FOO' exists. > > It would probably be good to fix all this terminology for once and for all. Yes, that could well be a source of a lot of confusion. > 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.