GNU bug report logs - #53715
29.0.50; [PATCH] Improve correctness of pipelines in Eshell

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Wed, 2 Feb 2022 03:33:01 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Porter <jporterbugs <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 53715 <at> debbugs.gnu.org
Subject: bug#53715: 29.0.50; [PATCH] Improve correctness of pipelines in Eshell
Date: Fri, 4 Feb 2022 22:51:43 -0800
[Message part 1 (text/plain, inline)]
On 2/3/2022 11:03 AM, Lars Ingebrigtsen wrote:
> Jim Porter <jporterbugs <at> gmail.com> writes:
> 
>> Here's a small additional improvement that I hope is correct. The
>> third patch here changes how eshell-tests-helpers.el is loaded to that
>> it uses `require'. This reduces some of the boilerplate and will
>> hopefully prevent issues with this file not getting recompiled when
>> it's updated.
>>
>> The first two patches are the same as before. I've just included them
>> for completeness/ease of applying.
> 
> Thanks; seems to work well for me, so I've now pushed them to Emacs 29.

I found a bug in the second patch.

  emacs -Q --eval '(eshell)'
  ~ $ echo hi | *cat

This prints:

  ~ $ hi

That is, the output of the command is printed *after* the next prompt. 
That's because my patch wasn't smart enough about finding the "head" 
process in a pipeline. In "echo hi | *cat", the head process is "cat" 
(Eshell's builtin echo command doesn't create a process). In my old 
patch, it thought the head process was nil, which confused Eshell.

Here's a patch with a test to verify that things work correctly. Now the 
output is:

  hi~ $

(That's a bit ugly, but Eshell's builtin echo doesn't normally print a 
newline, so it's correct.)
[0001-Ensure-that-the-CAR-of-eshell-last-async-procs-alway.patch (text/plain, attachment)]

This bug report was last modified 3 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.