GNU bug report logs - #46351
28.0.50; Add convenient way to bypass Eshell's own pipelining

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Sat, 6 Feb 2021 20:07:01 UTC

Severity: wishlist

Tags: patch

Found in version 28.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: Sean Whitton <spwhitton <at> spwhitton.name>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 46351 <at> debbugs.gnu.org
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Date: Sun, 07 Feb 2021 12:01:58 -0700
On Sun 07 Feb 2021 at 10:17AM +01, Michael Albinus wrote:

> Applying your patch, I get the compiler warning
>
> --8<---------------cut here---------------start------------->8---
>   ELC      eshell/esh-mode.elc
>
> In end of data:
> eshell/esh-mode.el:1114:1: Warning: the function ‘(setf buffer-substring)’ is
>     not known to be defined.
> --8<---------------cut here---------------end--------------->8---

Hrm, I can't reproduce this, but looking at the docs, I think that the
problem is a missing (require 'cl-lib).  Would you mind seeing whether
that eliminates the warning at your end?

> And using it in eshell, there is
>
> --8<---------------cut here---------------start------------->8---
> ~/src/emacs $ !! cat ~/.emacs | grep albinus
> !!: command not found
> --8<---------------cut here---------------end--------------->8---

You need to add eshell-expand-to-eshell-shell-command to
eshell-expand-input-functions and (optionally)
eshell-restore-unexpanded-input to eshell-input-filter-functions.  Or
maybe (the first of) these should be added by default?  What do you think?

For testing you can type these forms into an Eshell buffer:

(add-hook 'eshell-expand-input-functions #'eshell-expand-to-eshell-shell-command nil t)
(add-hook 'eshell-input-filter-functions #'eshell-restore-unexpanded-input nil t)

> I wanted to see, whether this works also for remote directories. Have
> you tested this?

Yes, I have, and it works (I did cat largefile >file and confirmed it's
much faster when prefixed with !!, of course because the data doesn't
get copied to the local machine).

-- 
Sean Whitton




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

Previous Next


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