GNU logs - #46351, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 06 Feb 2021 20:07:01 +0000
Resent-Message-ID: <handler.46351.B.161264197423995 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 46351 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.161264197423995
          (code B ref -1); Sat, 06 Feb 2021 20:07:01 +0000
Received: (at submit) by debbugs.gnu.org; 6 Feb 2021 20:06:14 +0000
Received: from localhost ([127.0.0.1]:46507 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8TqQ-0006Ew-3Q
	for submit <at> debbugs.gnu.org; Sat, 06 Feb 2021 15:06:14 -0500
Received: from lists.gnu.org ([209.51.188.17]:41388)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spwhitton@HIDDEN>) id 1l8TqK-0006Eg-7c
 for submit <at> debbugs.gnu.org; Sat, 06 Feb 2021 15:06:12 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:37002)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <spwhitton@HIDDEN>)
 id 1l8TqJ-0001CF-Ug
 for bug-gnu-emacs@HIDDEN; Sat, 06 Feb 2021 15:06:08 -0500
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:39175)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <spwhitton@HIDDEN>)
 id 1l8TqE-0003WB-Kn
 for bug-gnu-emacs@HIDDEN; Sat, 06 Feb 2021 15:06:07 -0500
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id F182FD43
 for <bug-gnu-emacs@HIDDEN>; Sat,  6 Feb 2021 15:06:00 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Sat, 06 Feb 2021 15:06:01 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=from:to:subject:date:message-id:mime-version:content-type; s=
 fm2; bh=xFVppfuaA/xSv23xhAoBA9UZEx2Wo1lsi1ufwdwgpMM=; b=QGSrkhHY
 Yv10jcwaOND6I5REHP2wQGwsv19RbMGPE03KhZKXYENFgZUZCui4rqW0Tkha8TXK
 OkItXe9Fk3tXD5Bt6zkZ2HA3IexRLHb31M1F6QVaUET+oJmoJGoEZ7pRjmJrq2hv
 XxLKn7AwGtB7yb84bmyPqdDHaQIuAwEkpygVsOBw04zdsNsNHCfald2Q1au2uGhJ
 Mk18KuW/7M9lkwK9JgeUmwFD4nMqJKE+/b7nx9Mk/RaqLH+4uWOi/Ntz9A/nNKx/
 zfAyHn+pyzORBLNpNIrCjy+WtqmQSgv1tV2rmzrifrWK4xo8KnaxnwWISTpyYOM1
 6T+lFnVfQgBl7A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=xFVppfuaA/xSv23xhAoBA9UZEx2Wo
 1lsi1ufwdwgpMM=; b=AEOEE9LgoSEYjTxB6ZtSbJJplGhJaspOoSUPiyWZetDwL
 MsQ0+bwtlARVBi9ezNrmMz0ICPkhdhlrDEFIo+mIb+/ivDCWzy03Y5zFM463K18g
 2lM7h7b/Lyyep6GhtRfBXFp6R9e1Q5v4s+PPfh9QnvqsEcReDqJg8MkjpCWtidXZ
 0zn8LkcA39bghTSE8AkAmfZ3BQdMM6Z4EkPQVE+9VJ1B0hVt/gN8tKJoopcgIDKe
 fAwOb2Rb2NWykHli0k/lr2JTWBAj+CJ6CEz3+cKk9eLw7K2lVjSzUJJ0v59aVBcX
 pd8MoyyUlBOfOdAMAXBbcWZokWPPXRJKg3frvzL8A==
X-ME-Sender: <xms:qPYeYBevWkUpkI852GXIKFXPqb0l7NoihWcznCvtJ5x4J2d3spEcBg>
 <xme:qPYeYPNSFaRdFtbEKKxjqu776AIKI0xapA9t_1kAhNOrxsXPln4U2RExT2tQEQMCN
 5MnO0plShXkR_kK3A>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgeekgddufeefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehmtderredttd
 dtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhhhithhtohhnsehsphif
 hhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepteegtdejheejvdehgeettd
 dvjeffudetuedutdegkefhtdetteeuueetkeefkeegnecuvehluhhsthgvrhfuihiivgep
 tdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtth
 honhdrnhgrmhgv
X-ME-Proxy: <xmx:qPYeYKj7_i4HU40aL2VBcayWYOPLJMxk42pnnK1iso0Ai2I5fhJkqQ>
 <xmx:qPYeYK-CbQwPmNvZHP3z1p_EkVZeYgzzJcHkH0rMsIcRnSgc7bv_wg>
 <xmx:qPYeYNuioSUdlyd2e0g51nwy_WUpkLFEmQ7-ywRReTFuBJC2lzfE5A>
 <xmx:qPYeYL5FE2cL9kYMxErcQhtGXSXuhGsgg_JimkioHYzuSQCRSCHVZg>
From: Sean Whitton <spwhitton@HIDDEN>
Date: Sat, 06 Feb 2021 13:06:53 -0700
Message-ID: <878s812c6a.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=64.147.123.24;
 envelope-from=spwhitton@HIDDEN; helo=wout1-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

--=-=-=
Content-Type: text/plain

Most people who use Eshell a lot need to be aware of the limitations of
its support for shell pipelines: primarily, that all data in pipelines
has to go through Emacs buffers, and that can be slow.  If you're
running pipelines which will move a lot of data, you should use a system
shell which will be more performant.

Currently, if Eshell is your primary shell, it's not particularly
convenient to switch to using an operating system shell when you're
preparing a pipeline that you know is going to move a lot of data.  You
would need either to switch to a shell-mode buffer, or quote and escape
your Eshell input and put something like `bash -c' in front of it.

I think that it would be good to have a way to easily toggle Eshell's
own pipelining support on and off for particular commands.  I have come
up with the attached patches.  When the new functions I've defined are
enabled, you can type

    !! foo | bar 'arg' >baz >>#<buffer *scratch*>

and it will be executed by Eshell as if you had typed

    bash -c 'foo | bar '"'"'arg'"'"' >baz' >>#<buffer *scratch*>

The idea is that you can easily toggle Eshell's pipelining on and off as
appropriate to your needs just by adding and removing the "!!" prefix.

I think that the patches I've prepared are a clean implementation of
this feature that would be good to include in Emacs.

-- 
Sean Whitton

--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0001-Add-eshell-restore-unexpanded-input.patch

From ccc4427ff06bf6dc63840517aefbb7fb899d4b8c Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhitton@HIDDEN>
Date: Sat, 6 Feb 2021 00:01:50 -0700
Subject: [PATCH 1/2] Add eshell-restore-unexpanded-input

* lisp/eshell/esh-mode.el (eshell-send-input): Store the original
input before running eshell-expand-input-functions.
* lisp/eshell/esh-mode.el (eshell-restore-unexpanded-input): Define
new function and register as a customization option for
eshell-input-filter-functions.
---
 lisp/eshell/esh-mode.el | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index d29b010ea0..6036829941 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -197,6 +197,7 @@ This is used by `eshell-watch-for-password-prompt'."
 ;; byte-compiler, when compiling other files which `require' this one
 (defvar eshell-mode nil)
 (defvar eshell-command-running-string "--")
+(defvar eshell-last-unexpanded-input nil)
 (defvar eshell-last-input-start nil)
 (defvar eshell-last-input-end nil)
 (defvar eshell-last-output-start nil)
@@ -631,6 +632,7 @@ newline."
 		(progn
 		  (setq input (buffer-substring-no-properties
 			       eshell-last-output-end (1- (point))))
+                  (setq eshell-last-unexpanded-input input)
 		  (run-hook-with-args 'eshell-expand-input-functions
 				      eshell-last-output-end (1- (point)))
 		  (let ((cmd (eshell-parse-command-input
@@ -664,6 +666,21 @@ newline."
 
 (custom-add-option 'eshell-input-filter-functions 'eshell-kill-new)
 
+(defun eshell-restore-unexpanded-input ()
+  "Restore the input text before `eshell-expand-input-functions' ran.
+Useful when you want to see the unexpanded input rather than the
+expanded input in the Eshell buffer, and when you want later
+entries in `eshell-input-filter-functions' to use the unexpanded
+input.  For example, you might want the unexpanded input to be
+what gets stored in the history list."
+  (setf (buffer-substring eshell-last-input-start
+                          (1- eshell-last-input-end))
+        eshell-last-unexpanded-input)
+  (eshell-update-markers eshell-last-output-end))
+
+(custom-add-option 'eshell-input-filter-functions
+                   'eshell-restore-unexpanded-input)
+
 (defun eshell-output-filter (process string)
   "Send the output from PROCESS (STRING) to the interactive display.
 This is done after all necessary filtering has been done."
-- 
2.29.2


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=0002-Add-eshell-shell-command-and-eshell-expand-to-eshell.patch

From d5d48427c75555cd5cf2f6eb5b89e0c832cf7edf Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhitton@HIDDEN>
Date: Sat, 6 Feb 2021 00:48:32 -0700
Subject: [PATCH 2/2] Add eshell-shell-command and
 eshell-expand-to-eshell-shell-command

* lisp/eshell/esh-mode.el (eshell-shell-command,
eshell-expand-to-eshell-shell-command): Define new functions.
Register eshell-expand-to-eshell-shell-command as a customization
option for eshell-expand-input-functions.
---
 lisp/eshell/esh-mode.el | 77 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 6036829941..b3132393a5 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -62,6 +62,7 @@
 (require 'esh-module)
 (require 'esh-cmd)
 (require 'esh-arg)                      ;For eshell-parse-arguments
+(require 'subr-x)
 
 (defgroup eshell-mode nil
   "This module contains code for handling input from the user."
@@ -660,6 +661,82 @@ newline."
 	       (run-hooks 'eshell-post-command-hook)
 	       (insert-and-inherit input)))))))))
 
+(defun eshell-shell-command (command)
+  "Execute COMMAND using the operating system shell."
+  (throw 'eshell-replace-command
+	 (eshell-parse-command shell-file-name
+			       (list shell-command-switch command))))
+
+(defun eshell-expand-to-eshell-shell-command (beg end)
+  "Expand Eshell input starting with '!!' to use `eshell-shell-command'.
+
+This is intended to provide a convenient way to bypass Eshell's
+own pipelining which can be slow when executing shell pipelines
+which move a lot of data.  It is also useful to avoid
+roundtripping data when running pipelines on remote hosts.
+
+To enable, add this function to `eshell-expand-input-functions'.
+
+For example, this function expands the input
+
+    !! cat *.ogg | my-cool-decoder >file
+
+to
+
+    eshell-shell-command \"cat *.ogg | my-cool-decoder >file\"
+
+Executing the latter command will not copy all the data in the
+*.ogg files into Emacs buffers, as would normally happen with
+Eshell's own pipelining.
+
+This function tries to extract Eshell-specific redirects and
+avoids passing these to the operating system shell.  For example,
+
+    !! foo | bar >>#<buffer scratch>
+
+will be expanded to
+
+    eshell-shell-command \"foo | bar\" >>#<buffer scratch>
+
+This function works well in combination with adding
+`eshell-restore-unexpanded-input' to `eshell-input-filter-functions'."
+  (save-excursion
+    (goto-char beg)
+    (when (looking-at "!!\\s-*")
+      (let ((end (copy-marker end)) ; needs to be a marker
+            redirects)
+        ;; drop the !!
+        (delete-region beg (match-end 0))
+        ;; extract Eshell-specific redirects
+        (while (search-forward-regexp "[0-9]?>+&?[0-9]?\\s-*\\S-" nil t)
+          (let ((beg (match-beginning 0)))
+            (forward-char -1) ; start from the redirect target
+            (when-let ((end (cond
+                             ;; this is a redirect to a process or a
+                             ;; buffer
+                             ((looking-at "#<")
+                              (forward-char 1)
+                              (1+ (eshell-find-delimiter ?\< ?\>)))
+                             ;; this is a redirect to a virtual target
+                             ((and (looking-at "/\\S-+")
+                                   (assoc (match-string 0)
+                                          eshell-virtual-targets))
+                              (match-end 0)))))
+              (push (buffer-substring-no-properties beg end) redirects)
+              (delete-region beg end)
+              (just-one-space))))
+        ;; wrap the remaining text and reinstate Eshell redirects
+        (let ((pipeline (string-trim
+                         (buffer-substring-no-properties beg end))))
+          (delete-region beg end)
+          (insert "eshell-shell-command ")
+          (prin1 pipeline (current-buffer))
+          (when redirects
+            (insert " " (string-join (nreverse redirects) " "))))))))
+
+(custom-add-option 'eshell-expand-input-functions
+                   'eshell-expand-to-eshell-shell-command)
+
 (defsubst eshell-kill-new ()
   "Add the last input text to the kill ring."
   (kill-ring-save eshell-last-input-start eshell-last-input-end))
-- 
2.29.2


--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Sean Whitton <spwhitton@HIDDEN>
Subject: bug#46351: Acknowledgement (28.0.50; Add convenient way to bypass
 Eshell's own pipelining)
Message-ID: <handler.46351.B.161264197423995.ack <at> debbugs.gnu.org>
References: <878s812c6a.fsf@HIDDEN>
X-Gnu-PR-Message: ack 46351
X-Gnu-PR-Package: emacs
Reply-To: 46351 <at> debbugs.gnu.org
Date: Sat, 06 Feb 2021 20:07:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 46351 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
46351: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D46351
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Feb 2021 09:18:01 +0000
Resent-Message-ID: <handler.46351.B46351.16126894738716 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.16126894738716
          (code B ref 46351); Sun, 07 Feb 2021 09:18:01 +0000
Received: (at 46351) by debbugs.gnu.org; 7 Feb 2021 09:17:53 +0000
Received: from localhost ([127.0.0.1]:46872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8gCX-0002GW-6J
	for submit <at> debbugs.gnu.org; Sun, 07 Feb 2021 04:17:53 -0500
Received: from mout.gmx.net ([212.227.17.21]:46649)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1l8gCU-0002GI-MJ
 for 46351 <at> debbugs.gnu.org; Sun, 07 Feb 2021 04:17:51 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1612689461;
 bh=kBYyXybfJTGujIUP+XabvU5wXuS8zAEj+aZOi8HbzjE=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=aYg0nScMWrDxfGF1omlTGwEzZpeV4OMnKY1tC3tRF+ztY0DrdGhkKTKNMZM/hn9F6
 ejYFHpiCxbE6757lWLuncgqpDvzP9wXGYM3bz+sSy8jHqtKejaYwwRWi8Z/m3Ffm/e
 seSnTw3pKz0Z9JyH24DkPAv1P02yZx+gm4tlaql0=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([178.20.94.105]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Ma20q-1lTbFZ0kiK-00VvEz; Sun, 07
 Feb 2021 10:17:41 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
References: <878s812c6a.fsf@HIDDEN>
Date: Sun, 07 Feb 2021 10:17:39 +0100
In-Reply-To: <878s812c6a.fsf@HIDDEN> (Sean Whitton's message
 of "Sat, 06 Feb 2021 13:06:53 -0700")
Message-ID: <87eehsz170.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:3D9BpDFhXMiKRCUyou6dlXWDmN/cx+UzIGwhHHN/1Mgu/coJW6q
 Qb60jvGbf4QS64+H9XZlBjPIhQ8vx5qNHQZYPKJnoYdn8KS8M4Iu3SQSwsYBfyrdQSNUWB8
 pMIHvipTO9aP1R4L41GaxIEuPfXNVzvWkDu+alP3/D3IIanbcgFPDPBCGrrbZ8V+YHFrLgC
 D0YA3wJkLT9NQErH+ROPA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:6mVKEQ8ht3k=:4QkjRb2CmWuTZ/Gb7y8snJ
 SEy8GxDcqrkt8vTMvmbyj6vZo/c6XbFBSxUJe3k6HkehEBcKJOLrSMkL4ECUoZiBnQ3Wv0vzV
 +m0Hq7LXgOrLVbUyNLYP8noSWcm2C+SaqEIn3Sf4pHff/wyeC6ePIb49bnFz8Jy0h8KC7ACx5
 RSNANzPUD5r+nEZ8rgNxnsQuDPvfQ7CiT1aR5DE9VxjOmWy6lbUG9PgS/MlFev8zyGAmBHyb8
 jZFb4HWApG1VOe7hqIyDgp3tlyf8/SI3SLSSuPL/+TNpeL9eG6AwlFjor704ZWBiF4qSOeLM5
 qpxrIERN1UOI6WcMqzHCdC6r1hlhslEvIcuEFn6ozMgfNtUd1AuebcdtpE8muAC233BQftA6p
 CxMN0MmdeVYsUodRm2vzSFiYLibJ13Pn3IxPcBbNHDu+tTyKUW+ZCgR7dIMsSQspzDTxDx9RF
 ySXyh6NTJbtog5I0sMkB8B6hLaYP6C2qYtdKMuyyWCNLqhhYtSyBdpBEgKmm5RMhHIVqkky1f
 0QsXjFtn4I/pSKJIfQ0FOs5BmXaSx70QZwXxZe752RzdUV9syjKA0J824yZYW4lRhYZuLtjgQ
 iOhGtHTM4kszI9gtZzvylQJr1njDjOcTq/e2hXyxppNHlFWOhbmmuMHJ9a85D9n00E5nVr8sX
 /khj1TPfDwn5z8a1fLRS0+Rp/7UdkwEOLt9AIw/wKhDMEG3UkbtS3kOUTnk1JJKtEonR/737d
 brXCKsU1A8Jab/SLaAixiInUOUM56PS3cvltuEWqnXpqmPNBvo1y1IMxlt6TaM3b/I+rMnKT0
 oF0inHathM5HNcjp5ZhuPlxb8cqdS/GuZAtfyjre57WAFFkeSQXMzPn1R4CFtrP53OPNBJ9u2
 OHpIC2bdHhGQi+G5ewuQ==
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

Hi Sean,

> I think that it would be good to have a way to easily toggle Eshell's
> own pipelining support on and off for particular commands.  I have come
> up with the attached patches.  When the new functions I've defined are
> enabled, you can type
>
>     !! foo | bar 'arg' >baz >>#<buffer *scratch*>
>
> and it will be executed by Eshell as if you had typed
>
>     bash -c 'foo | bar '"'"'arg'"'"' >baz' >>#<buffer *scratch*>
>
> The idea is that you can easily toggle Eshell's pipelining on and off as
> appropriate to your needs just by adding and removing the "!!" prefix.

Nice idea.

> I think that the patches I've prepared are a clean implementation of
> this feature that would be good to include in Emacs.

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 =E2=80=98(setf buffer-subs=
tring)=E2=80=99 is
    not known to be defined.
--8<---------------cut here---------------end--------------->8---

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---

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

> Sean Whitton

Best regards, Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Feb 2021 19:02:01 +0000
Resent-Message-ID: <handler.46351.B46351.161272447426329 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Albinus <michael.albinus@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.161272447426329
          (code B ref 46351); Sun, 07 Feb 2021 19:02:01 +0000
Received: (at 46351) by debbugs.gnu.org; 7 Feb 2021 19:01:14 +0000
Received: from localhost ([127.0.0.1]:48805 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l8pJ3-0006qa-V2
	for submit <at> debbugs.gnu.org; Sun, 07 Feb 2021 14:01:14 -0500
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:33571)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spwhitton@HIDDEN>) id 1l8pJ1-0006qM-7F
 for 46351 <at> debbugs.gnu.org; Sun, 07 Feb 2021 14:01:12 -0500
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id F1B1BBEC;
 Sun,  7 Feb 2021 14:01:04 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Sun, 07 Feb 2021 14:01:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=from:to:cc:subject:in-reply-to:references:date:message-id
 :mime-version:content-type:content-transfer-encoding; s=fm2; bh=
 l4TucaqnSeQL34nI/CzS5SIgXJyUcBefPZGO3Ierqes=; b=Hy/T9ZzxNCMBsAoE
 JYNZnjCW7VU3HXFqdwjAhkj/ctu4ePAPza0Iep9RwO14VGn5w68+oieStpH7RQXh
 VdfJ2yWzulSEE5fIN3FRARvF+Gj4WDQsNS1W9KW+ESZeAjawY58JYZOwc4klK7Ac
 NYggbYRvlxyIF3pqpMCgD2fAfBk/08dwdr5KyPCL59pMjCX8lENkzc2iJQnbrGUM
 K89oLRqDLT4uRTqXB7KxLXMHUqCc88mCNASaak5tuA0leik9HQwoV0tDRRORnBA/
 JlcHhTrY5Bwz/zaWRYJG/nLlgIXZcjp+Tucu51aOqJ9UsOP83S0PPnXIGdkeweyO
 Y0oCgQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm2; bh=l4TucaqnSeQL34nI/CzS5SIgXJyUcBefPZGO3Ierq
 es=; b=hWNeVHeY3rlw1Ywy3lgIDxLxfOqZ1tNvT3hhj8hpFqzkH/e8XwGDfaDUM
 KBUR4MwtatJOggL7/Pet1sMHh9+v0/x5AbfiUBjF0mlWQ1hORSdP9oYmJhE+WAof
 lc3p9JOvP9SHRcbtFoBqG5yoS5XB5k1NZCFB69HFGT9J1ARSFifkYtG/TkqapeBp
 yDVudeTgqCyyZXM2EJFsbDzEcMdAbx+X1qHfy8Db7XBkeaotlucOlIExLMTE1CjP
 eOwB2wqxT74ihUA9CIa1Ca11wsWY7mYFs1zC3an7yNQ7IRlFIjN1fYRtkquY+f3D
 EW43lzYBhK8ZWcO7JaEvbc4R5Lz8A==
X-ME-Sender: <xms:8DggYMOxOsyjsXqXCXqgQt8aPuNiu39gfflBK_q8pjwlXdCJ3xVfWA>
 <xme:8DggYAzwloMqyiX1hqA4WpBm2urqmMPsB1QBfkX3OOtyGPsnc81iAqk9P1xJmy5bo
 7rLXOmlnTBHq6wXlw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrhedugdduvddtucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufgjfhffkfggtgfgsehtqhertddttdejnecuhfhrohhmpefuvggrnhcu
 hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne
 cuggftrfgrthhtvghrnhepvdfgkeevtdetvedvhffhgeevleelfeekveeuveehffduvdei
 udfhgeelvefghfehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv
X-ME-Proxy: <xmx:8DggYNsyQAMBmp1c6HrOkz9qfzFLBpbr0YaqHZ61p4VYIT9mEukN6w>
 <xmx:8DggYB63gCoYt-asBcf4EWbmTMs-xkcHfqqB1ZEIAtJsLI-KD7ybng>
 <xmx:8DggYET_5RhFPLGgb8RmTARVjIWK4tiNvBsVG75XHREf-kPIs4HOKA>
 <xmx:8DggYPNlTjc0IxSw1iDYu5i55z2accEYa9b5v7_qU2SkCbgZ_TYZDw>
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <87eehsz170.fsf@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
Date: Sun, 07 Feb 2021 12:01:58 -0700
Message-ID: <874kin1z2x.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

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 =E2=80=98(setf buffer-su=
bstring)=E2=80=99 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-co=
mmand 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).

--=20
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 08 Feb 2021 10:30:02 +0000
Resent-Message-ID: <handler.46351.B46351.16127801501852 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.16127801501852
          (code B ref 46351); Mon, 08 Feb 2021 10:30:02 +0000
Received: (at 46351) by debbugs.gnu.org; 8 Feb 2021 10:29:10 +0000
Received: from localhost ([127.0.0.1]:49884 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l93n4-0000To-75
	for submit <at> debbugs.gnu.org; Mon, 08 Feb 2021 05:29:10 -0500
Received: from mout.gmx.net ([212.227.15.18]:33537)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1l93n1-0000TL-Cb
 for 46351 <at> debbugs.gnu.org; Mon, 08 Feb 2021 05:29:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1612780138;
 bh=hArfY/KOVJcMV8YV/34usUfGhJDpUmeXmjRCg1OTBLQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=RFzfoi/mvWSLOCEev8EtvAdkZg52VU5NMjKjswmj/KtZNFknijlabvCx80PVMMfeZ
 awkkXyeKSFSE3rbe8/XuV5smhilyay0ocXNnhP/ZGjoHNqozNK7V6VrrApB6458iiA
 A17hIOXTPg9jYiDrkhTPFUoN6SPL7Y6q8YMLCtMg=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([178.20.90.93]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MCbIn-1l0ZKL2Syx-009jJr; Mon, 08
 Feb 2021 11:28:58 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN>
Date: Mon, 08 Feb 2021 11:28:54 +0100
In-Reply-To: <874kin1z2x.fsf@HIDDEN> (Sean Whitton's message
 of "Sun, 07 Feb 2021 12:01:58 -0700")
Message-ID: <87ft26etuh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:aH4/yFrfnH80dbrTcPdUDnZG9jPzogwwW20cEL+mbKY3OdbuLS+
 5SYUwClQr33AIfrhTjzfIPBqVuW9Ow4MfssmUIaq/f9NAp/lxP3i4dOtrcv/vmDX+BBzHvj
 6cRVPqTNCMW0hFtuvkC5wehXVWWKWxu7ZY5ygSmOgi11bBiJNLB1Dc2FlfzIH5CUgWlv35q
 to9NpQ8ZpnqrBDLeEDy9A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:jg9cYuyiQXM=:mf3/566p2jbGew9GX63EXq
 IXvsbfpXzBQcqX9sptd/xObbVALR0STL/hcD8ipwn7qMXGNE8oA8NkN8hudW63xty9AYSzEO8
 po/hd3zAz5p1k7XlgizWOPXvgnOCr8brIAfYvjp+SpGVa6z8eUovuo6pgw4OI/NuwvwHnglmG
 6m+7d98vnv5ycd3nrb82NwDyzRwsDjPtZ0G+2HdOqnMcSijhMo5lFUJ8q7EcChgTgCIuZUws9
 QBd8U6xv9+TQNXg0dBQZj759jR8XSHh3UmDip98xeuugRNp5UnQPhZA3tevIrupTNedjjjcYM
 JtNuG+FtjZt1/WX5kpiWtm6erk6jzYwlroEILQrz7Zm3OZ+jGC5ozow7rifByL4jotu13lKeg
 pk3fzLn2ZAVdlPLCxeFCQLzyg5qm10wvcp3xKaW6I7yMJclmlvho0tvTzAqvGyxTAE7Q5hxAG
 mqn9XgezkTAvYWkst8wAcWXFxG+tlPshz6XcksaOJd+UF5k9D9H7O4Uf833R8wEcSXa2/Piz2
 5+dyrIs2oXSl+5Q2cs0ulf1wJFyOrCe1mgsisM9nvEu4E23fzCWAWO+kDllMoevx5ulyqz5JJ
 dYXyF5lr6rsBZ4DwRq3ogIdUj2YnVT3IBzoX/h9Jy1GIZ2ZVuNcvSAA6POwmFLXSccYNGCbV+
 elTzCKo/FG58R8D2OY/rQrbvUSO7Dq/+QPnjlt6nka47UExvG5Bt66EQrZHLn3Z66poGNMadU
 eAxBwvnh0Iq49TMabzx6pgX49LwwR7VAxj9pds2WXojgijHrdB2hmpCTQOCIahSzh9ZtcLf+N
 8mgQw/zHKRqMkpcSGNwg38f2sdeB2P80CwIJGfWCWR+cdaq3uRyFom5r6ZwWulv+wXG0Ng7Ct
 4dXNDH9DV3CX3k51V0Gg==
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

Hi Sean,

>> 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 =E2=80=98(setf buffer-s=
ubstring)=E2=80=99 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?

Yes, that helps.

>> 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-inpu=
t nil t)

That works. Maybe we could add it to the defaults. But at least I would
like to see it documented in the eshell manual, otherwise nobody will
know the effect of "!!".

And I have the impression, that the eshell history is not preserved any
longer, when I have applied these settings.

>> 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).

It doesn't work for me. The reason is a little bit subtle: you use
`shell-file-name' in order to call a remote shell. In my case, it is
"/usr/local/bin/tcsh", which doesn't exist on the remote machine I've
used for testing.

Maybe you can base your implementation on `shell-command'? This should
know, how to handle a connection-local `shell-file-name'.

Best regards, Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 08 Feb 2021 18:07:01 +0000
Resent-Message-ID: <handler.46351.B46351.161280760323473 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Michael Albinus <michael.albinus@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.161280760323473
          (code B ref 46351); Mon, 08 Feb 2021 18:07:01 +0000
Received: (at 46351) by debbugs.gnu.org; 8 Feb 2021 18:06:43 +0000
Received: from localhost ([127.0.0.1]:51882 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9Avr-00066X-6n
	for submit <at> debbugs.gnu.org; Mon, 08 Feb 2021 13:06:43 -0500
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34043)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spwhitton@HIDDEN>) id 1l9Avn-00066J-TD
 for 46351 <at> debbugs.gnu.org; Mon, 08 Feb 2021 13:06:41 -0500
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.nyi.internal (Postfix) with ESMTP id 9C3E65C00A5;
 Mon,  8 Feb 2021 13:06:34 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute5.internal (MEProxy); Mon, 08 Feb 2021 13:06:34 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=from:to:cc:subject:in-reply-to:references:date:message-id
 :mime-version:content-type; s=fm2; bh=PnCmSK4KQgeHcrnVYPJDF5f6+q
 0AshVucaHzKd1vqTU=; b=mDH8KTUZFtsHrT4mMHjhA8zNwKWYFqlX2tllJmMLXV
 eukVXF1IpAm+LmEoc/33QgyuPcUkpFHPHdmVYO1wGa/DDmdEVoYkcSSqO8wDRayC
 84XhvcHSnSH6uRDj6H7EqTH4aAwYsQdJX1/aZSc4jdDL6d0nwwSWBXOD89Lax4O0
 r520LRgnYC3LndmS3Tq9c91MIcD2faszwGZrT78OEvfZ9yVx5b7V0z72+F9S3KDh
 cHrPdwKv1oNhpPLbWCIEUt1pjzKf1Zg3ndyyxAChdiY9Qs/QyDHCRjEnXyGB0Amh
 7J+arjGd3ioEsmvIolvwryxux1JD3E8ZEIZvaBdauChg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=PnCmSK
 4KQgeHcrnVYPJDF5f6+q0AshVucaHzKd1vqTU=; b=hzfFLNqIpRJ6QvzLW7Y+G0
 NIqLdrL+8mf0wWp2T8m47eEbISQ4WqCEZH0TYyQas/FxiaGAuYEtH5Po4Tv2Ae/K
 IgqfPO6pYW2MpsnhfWLLKbHam0h21+vBbAuLQGrHhhZEod1/2xtY6xqWG6OrjG8Z
 ZEFI7MAts9d7XE+HdammEDiHHFRobHlWHBEvCf7RLhlw6ZTIQud3s1BbR/j7e561
 0o+lTpDOEkwZKFJaqbzSspazeKv55uV2TJtK/7WGggKN3/1rwaqaAY5boDakYuME
 a4uIThQkhGW+9lLK1EcQJ7LxBOOW23tVJqqvM1P+CkCEq+/DJBE9+VMaWsMh0rew
 ==
X-ME-Sender: <xms:qn0hYE-MWQ3rRV2_hpQfmWgw1C69upajYhOtYh6V1Ax2cvfhG6zCKQ>
 <xme:qn0hYGVqmNln6SUFPiSD-o7ZKBCPTiMQ6awtrwHZjTVVavRIez0LdtJ3SNsJ9LRn9
 Z8wbeijFc2AmuyvKQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrheefgddutdekucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepufgvrghnucgh
 hhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqeenuc
 ggtffrrghtthgvrhhnpeegtddvheegfffhffdvfeefhffgjefflefhteevffffkeetgfdt
 jedtiedvtdevheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh
 hrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg
X-ME-Proxy: <xmx:qn0hYKACavJMbJidFXd4hQPZCGkB3abzi9gGPOpS2acavajkY8e0fQ>
 <xmx:qn0hYHzmfNXBKRxjuW9ydnIGTi4jbjtjM06yfAImFCrihHgYo7IYHA>
 <xmx:qn0hYHAOXAhOQ0Ky-wnePxqLyNklIOUYfdzMtA90KJ0Xfn2fQmRNjw>
 <xmx:qn0hYKfNZe4Wk0-qlj0hhhUmAvkWmJ9xV37k1SMtIN6QQgIurTQXGA>
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <87ft26etuh.fsf@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
Date: Mon, 08 Feb 2021 11:07:30 -0700
Message-ID: <877dnizb4t.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello,

On Mon 08 Feb 2021 at 11:28AM +01, Michael Albinus wrote:

> Sean Whitton <spwhitton@HIDDEN> writes:
>>
>> 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?
>
> Yes, that helps.

Thanks, I will add it.

> That works. Maybe we could add it to the defaults. But at least I would
> like to see it documented in the eshell manual, otherwise nobody will
> know the effect of "!!".

I was waiting to document it in the manual based on what others thought
the defaults should be.  If neither hook is added by default then I
think the docstrings of the functions that I've already written are
adequate documentation.

What do you think about adding only the eshell-expand-input-functions
hook by default, versus adding both of them?  I think that adding both
is probably most useful to most people, but it has the potential to
break existing uses of eshell-expand-input-functions in people's configs.

I'll look into your other points, thank you.

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 10 Feb 2021 11:34:02 +0000
Resent-Message-ID: <handler.46351.B46351.161295683513276 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.161295683513276
          (code B ref 46351); Wed, 10 Feb 2021 11:34:02 +0000
Received: (at 46351) by debbugs.gnu.org; 10 Feb 2021 11:33:55 +0000
Received: from localhost ([127.0.0.1]:55593 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1l9nkp-0003S4-Dv
	for submit <at> debbugs.gnu.org; Wed, 10 Feb 2021 06:33:55 -0500
Received: from mout.gmx.net ([212.227.15.15]:33515)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1l9nkl-0003Rp-RR
 for 46351 <at> debbugs.gnu.org; Wed, 10 Feb 2021 06:33:54 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1612956822;
 bh=RE5pQf4LZ6b0th5G/BtOFsI5ndeTnMMQtCBTsUDn/h4=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=MloLa3uvekUxYhH7o3JgqJYnEPgfDn2RmmPmym6muZM8MW/ubO0HnFQ2XZAZDQCs8
 tWhy9c6DVEgoyREzSrECKEL6DW1tZbZESfeiLNiCxQ6OQPrPSksyS5oxlE6DD25ivu
 1bOJg2h6hv2ExrwW01JrW2Hxk0plqccf6B+84jVU=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([79.140.117.252]) by mail.gmx.net (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MGhuK-1l4uCl3biE-00DlKb; Wed, 10
 Feb 2021 12:33:41 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <877dnizb4t.fsf@HIDDEN>
Date: Wed, 10 Feb 2021 12:33:40 +0100
In-Reply-To: <877dnizb4t.fsf@HIDDEN> (Sean Whitton's message
 of "Mon, 08 Feb 2021 11:07:30 -0700")
Message-ID: <87y2fwcg2z.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:XEhctSqB9JvlWvJS+TWVWGcxrWtgPii0Ch0sWY0pCjfsumhQtG8
 yfUSdED8OnRTax2+vEkH07mygfZ2A0FD5ixA4JvE1O+xEvzeqpgWQv8Na9Y/k53LCh94S2u
 Z+KP2nfc+By/HQikdFKQq+IJOLT7dolMdy5c9pLkkJfyvZdzTipc+RUt1ff67592xKHE4M+
 bx9xOtVbfnMaeWaxvNhvg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:55Ob/gkYaGE=:XXPnWfu8SdkCvE4I1FY6bG
 ihqF2tsWJe7FEe7+BcT4ve272OTk3SWmSGdPw5LfsVWc0/4wwUHbF4CSwrymWAT2Uijt8gasF
 1lh0zJhL2NzkowPT4lHdFsJW0Y/qfqUd9Rw2hL/pUboUT5f6l2hN1jJ2i9+6Exma2YI9xFaes
 o1JX7/hu9aUMtVLhRr6wiHYIVevBAfaLAMNU1KWbdu2Awk0XsylR+PtF3cFVOuQpvclGg9Aj1
 kX00zbrFmUPsosREru7BJMYtzogIURKmvEOipJHCK6gQkWto3+XmPHwDAELiWDQOGfL5LaSCU
 /Z+YYHVat04VdFtVBp6x4SRGRpmv0kqS9+hRkNPTcFduyDQgVRyIZAIjXcArkwSU3zLgNx+xN
 bZPeVYidqidYjqRf2icdOPzzg+Qb31pUvPF6xd+XfICOzuN/kmlbCEU7AGLWfbySWfHtOYTTK
 rday3vz3L4Sj1kG/iGosnkMsiK3+eNkXg54XSujeS2Me1Vdud26zIfxvMwjp/T2OMOU1hXFBM
 PErAdsOLFKaXp5ACQvcouSC5fAB0GRQrdgbbe9BuFqRtrLvJ6NEvT7d3Rz8voSTv55J8KMKNs
 0QVxmfDp0Vkv2kTbC5pU2QKxY1uqIyCN5hddxP0F3BNnEN6uexl+o6xzi80knW1jNbyLch5A6
 1bghucyb5aSRfqaPCogH62Mllt/2zMx5QrV5ozuB92rSvzl6lCo0yUQdDt6qLSMll3pRWPO/D
 76TDEuG8L+BSJMBeH1Mr0qaDP5VIKPYfRtfaJ+iMORprbTcGp8HfISAtfhe+m18ZW72vejGQH
 VerUG3J456o2u8GTfFA62Qj5D15JkVMroT/daOWDvtDQrgtY4jpPKdLvj1UzayR6UvswLrZ42
 I2PGRWbEY5K3A/uiYaKA==
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> Hello,

Hi Sean,

>> That works. Maybe we could add it to the defaults. But at least I would
>> like to see it documented in the eshell manual, otherwise nobody will
>> know the effect of "!!".
>
> I was waiting to document it in the manual based on what others thought
> the defaults should be.  If neither hook is added by default then I
> think the docstrings of the functions that I've already written are
> adequate documentation.

Sure. But the manual needs an explanation of "!!".

> What do you think about adding only the eshell-expand-input-functions
> hook by default, versus adding both of them?  I think that adding both
> is probably most useful to most people, but it has the potential to
> break existing uses of eshell-expand-input-functions in people's
> configs.

Honestly, I'm not a heavy eshell user, so I don't know whether it will
disturb people.

If you don't feel comfortable with these changes by default, you might
move them to an own eshell module, people would load if they like.

Best regards, Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 24 Dec 2021 21:21:01 +0000
Resent-Message-ID: <handler.46351.B46351.16403808409307 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 46351 <at> debbugs.gnu.org, Michael Albinus <michael.albinus@HIDDEN>
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.16403808409307
          (code B ref 46351); Fri, 24 Dec 2021 21:21:01 +0000
Received: (at 46351) by debbugs.gnu.org; 24 Dec 2021 21:20:40 +0000
Received: from localhost ([127.0.0.1]:38166 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n0rzT-0002Q2-9i
	for submit <at> debbugs.gnu.org; Fri, 24 Dec 2021 16:20:39 -0500
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:40037)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spwhitton@HIDDEN>) id 1n0rzO-0002Pj-20
 for 46351 <at> debbugs.gnu.org; Fri, 24 Dec 2021 16:20:37 -0500
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id B31925C003B;
 Fri, 24 Dec 2021 16:20:28 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Fri, 24 Dec 2021 16:20:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=from:to:subject:in-reply-to:references:date:message-id
 :mime-version:content-type; s=fm1; bh=0PT3cYT6OFZIVtOBz/d1QmmLaF
 8nr7QJvE4qpPXmZzk=; b=ETAa71HWPQqJa+ROhAYlX/5rD+MOYElDPkwGDrL9pz
 6k2kdr1TSgjGqZeFyaQErnPpiu4yhwtuFoULySMt3nCY6aBP7qZEVIzUVsCMIA/y
 aPVoEByN0tmrNUewpsyQZu6eE7V/voBzJ24VjuGsEkHsepJN60/L5CYytiKQ4yzy
 kVQXddqxL1OxMUMuPOgO+de3vaVhKw52/52A748u1QUbk+ApkbFYGwyjWEA2Y65F
 Sa390B0nN16Hdf08j0WvOusgCx5pUU9Jzs1YGysejnxGmSlYfof3capIYSZcN819
 1ZlkW2SHg8eLXjLZRQzTm4Tm1dPW0FJvxPYTAMxXi8vA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=0PT3cY
 T6OFZIVtOBz/d1QmmLaF8nr7QJvE4qpPXmZzk=; b=KDyEz2HaCWsmbdxZyIIoBA
 xqnElPObJCU/SQHO3TNt2vNVfSsKcte1zmkFJeTpItja48rNx2HNcbq9WsX2jcRN
 wegvUqDdsiP8EP6UWjY4Wg9orUtLYpxwdHRMz/rfHWT6K4FE+ECorbB4Vv3rd1ZL
 hJQ62psl0YVFS0d9iyl4zOgml9Tl3ovT/gUljJE2yzUWP5ZY/oyy0xRcT85rHHdN
 3FcByvQJJd4EW14oT+hemGmZxcR+q7/TXzJBsRareS5EJ9y1ck4vgEdYJTQdZNA4
 pcCZAUIkKk6tz18MbcPYV1WSkYsGZmw72W1bqCYYYHNjBeT7fTST7vb137cTIp5A
 ==
X-ME-Sender: <xms:nDnGYcz_EqIo1-3Qhu049ekz9tTCBd6TZZEqJPcRJm9bNwo4X3VZgw>
 <xme:nDnGYQRO7hNpz-uGhdYKobnjw-Ps-y07J5I7GqXauu9S3KQumQShunBFR2JCdRraE
 HaQsMJ5ydCTBEuuvQ>
X-ME-Received: <xmr:nDnGYeUnn_HCgz0gUtvgznCLZAuWt825uM2_ipR_GZzJjhgHqFUYz5fzBeJDilCSRsg2pI5r-fGioxoy7sRPVCjGMFpH_tJDInp_3fIMcPopxeWBjg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddutddgudeghecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffujghffgffkfggtgesmhdttdertdertdenucfhrhhomhepufgvrghn
 ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe
 enucggtffrrghtthgvrhhnpefgueeutedvkeffgedvveetheejieetvdduvdffheevgfet
 vdfghfetteffvdevjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih
 hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg
X-ME-Proxy: <xmx:nDnGYagmm4CF6QfY8n73UvCpcym3-tXUS2GWdWRuOP3VL1IQeiQwrQ>
 <xmx:nDnGYeAp7rWgr3K5sTEFwOVjz5rfnmqbUAZuXmn2CpeVDu2ZCsFsFw>
 <xmx:nDnGYbKwbcu7fv5P-HNBrOE9HbrwIxGTF0VqGkHvnzz3_JRknCX0fg>
 <xmx:nDnGYZp8sSb0t37OiNwajk2LgPwos60DqnDqz6-io11v4XwCkRBhQw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri,
 24 Dec 2021 16:20:28 -0500 (EST)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 5EAF77F3128; Fri, 24 Dec 2021 14:20:27 -0700 (MST)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <87ft26etuh.fsf@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50
 (x86_64-pc-linux-gnu)
Date: Fri, 24 Dec 2021 14:20:27 -0700
Message-ID: <87tuex1yzo.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Hello,

On Mon 08 Feb 2021 at 11:28AM +01, Michael Albinus wrote:

> Maybe we could add it to the defaults. But at least I would
> like to see it documented in the eshell manual, otherwise nobody will
> know the effect of "!!".

I'm attaching new patches which

- switch !! to ||, because !! in shells typically has something to do
  with rerunning the last command

- activate the syntax by default -- I do use Eshell regularly myself,
  and I don't believe that activating it by default is likely to disrupt
  anyone's usage

- adds a section to the Eshell manual introducing the new syntax.

> And I have the impression, that the eshell history is not preserved any
> longer, when I have applied these settings.

I have not been able to reproduce this -- can you confirm?

> It doesn't work for me. The reason is a little bit subtle: you use
> `shell-file-name' in order to call a remote shell. In my case, it is
> "/usr/local/bin/tcsh", which doesn't exist on the remote machine I've
> used for testing.

I was able to fix this by using `with-connection-local-variables'.
Thank you for pointing out the problem.

-- 
Sean Whitton

--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=v2-0001-Add-eshell-restore-unexpanded-input.patch

From d47446cbe7db5c7fb4eba71ab022cfae3de07799 Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhitton@HIDDEN>
Date: Sat, 6 Feb 2021 00:01:50 -0700
Subject: [PATCH v2 1/2] Add eshell-restore-unexpanded-input

* lisp/eshell/esh-mode.el (eshell-send-input): Store the original
input before running eshell-expand-input-functions.
* lisp/eshell/esh-mode.el (eshell-restore-unexpanded-input): Define
new function and register as a customization option for
eshell-input-filter-functions.
---
 lisp/eshell/esh-mode.el | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index cae5236d89..87166ef3bf 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -62,6 +62,7 @@
 (require 'esh-module)
 (require 'esh-cmd)
 (require 'esh-arg)                      ;For eshell-parse-arguments
+(require 'cl-lib)
 
 (defgroup eshell-mode nil
   "This module contains code for handling input from the user."
@@ -197,6 +198,7 @@ eshell-first-time-p
 ;; byte-compiler, when compiling other files which `require' this one
 (defvar eshell-mode nil)
 (defvar eshell-command-running-string "--")
+(defvar eshell-last-unexpanded-input nil)
 (defvar eshell-last-input-start nil)
 (defvar eshell-last-input-end nil)
 (defvar eshell-last-output-start nil)
@@ -641,6 +643,7 @@ eshell-send-input
 		(progn
 		  (setq input (buffer-substring-no-properties
 			       eshell-last-output-end (1- (point))))
+                  (setq eshell-last-unexpanded-input input)
 		  (run-hook-with-args 'eshell-expand-input-functions
 				      eshell-last-output-end (1- (point)))
 		  (let ((cmd (eshell-parse-command-input
@@ -674,6 +677,23 @@ eshell-kill-new
 
 (custom-add-option 'eshell-input-filter-functions 'eshell-kill-new)
 
+(defun eshell-restore-unexpanded-input ()
+  "Restore the input text before `eshell-expand-input-functions' ran.
+Useful when you want to see the unexpanded input rather than the
+expanded input in the Eshell buffer, and when you want later
+entries in `eshell-input-filter-functions' to use the unexpanded
+input."
+  (setf (buffer-substring eshell-last-input-start
+                          (1- eshell-last-input-end))
+        eshell-last-unexpanded-input)
+  ;; We have to move point for compatibility with smart display.
+  (save-excursion
+    (goto-char eshell-last-input-end)
+    (eshell-update-markers eshell-last-output-end)))
+
+(custom-add-option 'eshell-input-filter-functions
+                   'eshell-restore-unexpanded-input)
+
 (defun eshell-output-filter (process string)
   "Send the output from PROCESS (STRING) to the interactive display.
 This is done after all necessary filtering has been done."
-- 
2.30.2


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=v2-0002-Add-eshell-shell-command-and-eshell-expand-to-esh.patch

From 98df5163018b9c99ad8e65f03422f908c6068c78 Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhitton@HIDDEN>
Date: Sat, 6 Feb 2021 00:48:32 -0700
Subject: [PATCH v2 2/2] Add eshell-shell-command and
 eshell-expand-to-eshell-shell-command

* lisp/eshell/esh-mode.el (eshell-shell-command,
eshell-expand-to-eshell-shell-command): Define new functions.
Register eshell-expand-to-eshell-shell-command as a customization
option for eshell-expand-input-functions, and add it by default.
* etc/NEWS:
* doc/misc/eshell.texi: Document the new syntax.
---
 doc/misc/eshell.texi    | 35 ++++++++++++++++++
 etc/NEWS                |  9 +++++
 lisp/eshell/esh-mode.el | 79 ++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 122 insertions(+), 1 deletion(-)

diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index a87dd4308c..7e9233c09e 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -875,6 +875,7 @@ Expansion
 @menu
 * Dollars Expansion::
 * Globbing::
+* Running Shell Pipelines Natively::
 @end menu
 
 @node Dollars Expansion
@@ -945,6 +946,40 @@ Globbing
 The GNU Emacs Manual}.}
 groups ``eshell-glob'' and ``eshell-pred''.
 
+@node Running Shell Pipelines Natively
+@section Running Shell Pipelines Natively
+When constructing shell pipelines that will move a lot of data, it is
+a good idea to bypass Eshell's own pipelining support and use the
+operating system shell's instead.  This is especially relevant when
+executing commands on a remote machine using Eshell's Tramp
+integration: using the remote shell's pipelining avoids copying the
+data which will flow through the pipeline to local Emacs buffers and
+then right back again.
+
+To quickly construct a command for the native shell, prefix your
+Eshell input with the string @code{||}.  For example,
+
+@example
+|| cat *.ogg | my-cool-decoder >file
+@end example
+
+Executing this command will not copy all the data in the *.ogg files
+into Emacs buffers, as would normally happen with Eshell's own
+pipelining.
+
+As this feature is implemented as an expansion, your original input
+will be replaced with something like this:
+
+@example
+eshell-shell-command \"cat *.ogg | my-cool-decoder >file\"
+@end example
+
+This makes it clear what Eshell is doing, but has the disadvantage of
+being harder to edit, especially for complex pipelines with a lot of
+quoting.  If you would prefer that the @code{||}-prefixed input be
+restored, customize the variable @code{eshell-input-filter-functions}
+to include the function @code{eshell-restore-unexpanded-input}.
+
 @node Input/Output
 @chapter Input/Output
 Since Eshell does not communicate with a terminal like most command
diff --git a/etc/NEWS b/etc/NEWS
index 57fe40c488..767763098b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -749,6 +749,15 @@ the Netscape web browser was released in February, 2008.
 This support has been obsolete since Emacs 25.1.  The final version of
 the Galeon web browser was released in September, 2008.
 
+** Eshell
+
++++
+*** New feature to easily bypass Eshell's own pipelining.
+Prefixing commands with '||' causes them to be executed using the
+operating system shell, which is particularly useful to bypass
+Eshell's own pipelining for pipelines which will move a lot of data.
+See "Running Shell Pipelines Natively" in the Eshell manual.
+
 
 * New Modes and Packages in Emacs 29.1
 
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 87166ef3bf..04680e4305 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -63,6 +63,7 @@
 (require 'esh-cmd)
 (require 'esh-arg)                      ;For eshell-parse-arguments
 (require 'cl-lib)
+(require 'subr-x)
 
 (defgroup eshell-mode nil
   "This module contains code for handling input from the user."
@@ -105,7 +106,8 @@ eshell-send-direct-to-subprocesses
   "If t, send any input immediately to a subprocess."
   :type 'boolean)
 
-(defcustom eshell-expand-input-functions nil
+(defcustom eshell-expand-input-functions
+  '(eshell-expand-to-eshell-shell-command)
   "Functions to call before input is parsed.
 Each function is passed two arguments, which bounds the region of the
 current input text."
@@ -671,6 +673,81 @@ eshell-send-input
 	       (run-hooks 'eshell-post-command-hook)
 	       (insert-and-inherit input)))))))))
 
+(defun eshell-shell-command (command)
+  "Execute COMMAND using the operating system shell."
+  (throw 'eshell-replace-command
+         (with-connection-local-variables
+	  (eshell-parse-command shell-file-name
+			        (list shell-command-switch command)))))
+
+(defun eshell-expand-to-eshell-shell-command (beg end)
+  "Expand Eshell input starting with '||' to use `eshell-shell-command'.
+
+This is intended to provide a convenient way to bypass Eshell's
+own pipelining which can be slow when executing shell pipelines
+which move a lot of data.  It is also useful to avoid
+roundtripping data when running pipelines on remote hosts.
+
+For example, this function expands the input
+
+    || cat *.ogg | my-cool-decoder >file
+
+to
+
+    eshell-shell-command \"cat *.ogg | my-cool-decoder >file\"
+
+Executing the latter command will not copy all the data in the
+*.ogg files into Emacs buffers, as would normally happen with
+Eshell's own pipelining.
+
+This function tries to extract Eshell-specific redirects and
+avoids passing these to the operating system shell.  For example,
+
+    || foo | bar >>#<buffer scratch>
+
+will be expanded to
+
+    eshell-shell-command \"foo | bar\" >>#<buffer scratch>
+
+This function works well in combination with adding
+`eshell-restore-unexpanded-input' to `eshell-input-filter-functions'."
+  (save-excursion
+    (goto-char beg)
+    (when (looking-at "||\\s-*")
+      (let ((end (copy-marker end)) ; needs to be a marker
+            redirects)
+        ;; drop the ||
+        (delete-region beg (match-end 0))
+        ;; extract Eshell-specific redirects
+        (while (search-forward-regexp "[0-9]?>+&?[0-9]?\\s-*\\S-" nil t)
+          (let ((beg (match-beginning 0)))
+            (forward-char -1) ; start from the redirect target
+            (when-let ((end (cond
+                             ;; this is a redirect to a process or a
+                             ;; buffer
+                             ((looking-at "#<")
+                              (forward-char 1)
+                              (1+ (eshell-find-delimiter ?\< ?\>)))
+                             ;; this is a redirect to a virtual target
+                             ((and (looking-at "/\\S-+")
+                                   (assoc (match-string 0)
+                                          eshell-virtual-targets))
+                              (match-end 0)))))
+              (push (buffer-substring-no-properties beg end) redirects)
+              (delete-region beg end)
+              (just-one-space))))
+        ;; wrap the remaining text and reinstate Eshell redirects
+        (let ((pipeline (string-trim
+                         (buffer-substring-no-properties beg end))))
+          (delete-region beg end)
+          (insert "eshell-shell-command ")
+          (prin1 pipeline (current-buffer))
+          (when redirects
+            (insert " " (string-join (nreverse redirects) " "))))))))
+
+(custom-add-option 'eshell-expand-input-functions
+                   'eshell-expand-to-eshell-shell-command)
+
 (defsubst eshell-kill-new ()
   "Add the last input text to the kill ring."
   (kill-ring-save eshell-last-input-start eshell-last-input-end))
-- 
2.30.2


--=-=-=--




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 25 Dec 2021 12:02:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 25 07:02:17 2021
Received: from localhost ([127.0.0.1]:38597 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n15kf-0001rT-BR
	for submit <at> debbugs.gnu.org; Sat, 25 Dec 2021 07:02:17 -0500
Received: from quimby.gnus.org ([95.216.78.240]:50622)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1n15ke-0001rD-6k
 for control <at> debbugs.gnu.org; Sat, 25 Dec 2021 07:02:16 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc:
 MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=EVF4DK2C0JdbuDezu2kmJ+wYQzYBsmkUsaQafHDQAe4=; b=dflz57+qZGwyyGnbosfjw8gv7N
 SiwcZm4f0luBPOSw7vtuhvII7hJ1OJ/axvlupU2EhG/P8WwMJKXh3UEtnR9h/DFuSQyOeUy2mpxiH
 Jhp0T40NOUxqnBNI/+D8dIGqifK/PuW43X4HmINWuipZkh1/jQ6GdtTUJ6nZhT4Bn4vA=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>) id 1n15kW-0003XW-AV
 for control <at> debbugs.gnu.org; Sat, 25 Dec 2021 13:02:10 +0100
Date: Sat, 25 Dec 2021 13:02:06 +0100
Message-Id: <87zgoozydd.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: control message for bug #46351
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  tags 46351 + patch quit 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

tags 46351 + patch
quit





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 25 Dec 2021 13:52:01 +0000
Resent-Message-ID: <handler.46351.B46351.16404403064559 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.16404403064559
          (code B ref 46351); Sat, 25 Dec 2021 13:52:01 +0000
Received: (at 46351) by debbugs.gnu.org; 25 Dec 2021 13:51:46 +0000
Received: from localhost ([127.0.0.1]:38692 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n17Sc-0001BT-3X
	for submit <at> debbugs.gnu.org; Sat, 25 Dec 2021 08:51:46 -0500
Received: from mout.gmx.net ([212.227.17.20]:38015)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1n17SW-0001B7-QG
 for 46351 <at> debbugs.gnu.org; Sat, 25 Dec 2021 08:51:44 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1640440291;
 bh=rR9cDY55qwuyDUCmDaxNewiJyIumqT5Jf6hFOnD9h0U=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=VBkexGR1ybcX4D16TigNdazGo8FUnmDZq0/K/uF0/nJYD7et22dEW7w8KT8+ytPlM
 WS5Oc1cx1bmHl8z6UyWWtXzzOYKGwKuO6HPcom9J0PEoUTXCMdKeraCeV12iERnJrW
 rowRh3h1q8SfonH8J5pu3pi2WCP8Zy/sUQCMsDHA=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([212.91.242.110]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MO9z7-1mpwEc18Tx-00OV0T; Sat, 25
 Dec 2021 14:51:31 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN>
Date: Sat, 25 Dec 2021 14:51:30 +0100
In-Reply-To: <87tuex1yzo.fsf@HIDDEN> (Sean Whitton's message
 of "Fri, 24 Dec 2021 14:20:27 -0700")
Message-ID: <87czlkbxnh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:YMeeq5HUOSuliojmgnmRr5j4zisoLB7FcXC/GfkMM87r8pE2Jsj
 i92f2RJIfYZ6qNC5EcdN6eTaslAf3Qs8E3pcNgsBEhxLexShBsIc0HPp4GzS74Fq3Lu+s9u
 gSSIC3O9CX9PpuSFBXrmBD6SF8IyrJkMuCKP3bkU7a87q3OPGE55zcVPJhZP3gXPtYhi+4M
 1bu+Ghi8KvONKHsdCiR0w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:cxT7b3MdjTg=:Lnhq19gnynDdZLVXluf0yu
 aMgY8Ewyk4rO1XPoV1EUUkO7KyXtM3Y4mgL82ndo6P8wA6FViu67jBOKQsqWkCG1nYU/x6//q
 6ZIreHy/1S1xkM2ia8pcw6MAih6s0ZHpv3dm00EelOeW2Cq41vjlmqVdjVnfvzuENO7avX3UT
 TZihW8YdKqO2k7U/7ExfTodGYvH905xaco/K9344mz/4fb56Y+gfJTpabzxm2tO8gaPi2AdvG
 1mCtSmoMEZJcrPcwIlscrqaI9RaU37zR3TDC0DBSMC1nbgSUctEbiS/OvTlJT0xJDvrUdZFPW
 O5dVclG99+C5qPEOuIXqebDP6msl3rVYUYSSB0aFBUOGQhd8tR3Ffo6t37GvHDmTB0DR28MXp
 joAeg61xJgf+xxc7P2ooSIkXW+ZcbpSQ8VC2inxldBORETp1oBtW8DbjqGhGaKq2bYGhgf7gY
 Zc09xJL6ZFFyKp9FvdTWJDpWrYcrdfx2xca0Ksm9QSrD1IuUlCZvh0V1mqgzVMZzsEcdlC+IX
 r3cVUHuFozPAov+P2oXvmSnQBDclgcQPwcbn37/xuXPa081MtOJ4L7OCfRw7P24ww6jFSnsW8
 iRvcqADe/ivHRF+hVKphCHzidW4sGTKqLW9o5UegJRqDsPFSTBcZrI2nK/yZxPitMNxlNBMbZ
 JQGYzcn1ygpLvfh382BkvgrSiXCSZbzIX+SF5hArIILLLJZBJ+pl+FMw0ec8k9XfKIKkg9ohu
 M8urXqYUZ8DFWJhvGvsmFqyQzr3TBzAAhb3vrEP9IwZ/4J1Mm2+NWF7eRZ9G1iyofv5XGkYF8
 niBDpaIx/umlyQoma56RCQQtWXbuCp+FCR5R4pLEbuupDxzkK8JtDtFR2bCuuye6WQ1TrLffR
 238MVQgDmwqZKrXaes+UZhc1uCml30ojfJmOyWSSJu56q0Ucw1IK/hx0WhoxO4VzcIOe/T+q6
 JT5pfxV2/sVvBn2XOwH3jHA0q4MUNtHtRqQOcheYTtN8flmnYMCdafynOjKKmsThbeu7yrMIQ
 CHtf1oVE+Cy4bsNpMdhbwatqeShtZUH1Im9frXFIc18Krzn32ooZ0F/Rr0XZdfyyHstmi+oRy
 3RaNPiP2Kbu9BE=
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> Hello,

Hi Sean,

>> Maybe we could add it to the defaults. But at least I would
>> like to see it documented in the eshell manual, otherwise nobody will
>> know the effect of "!!".
>
> I'm attaching new patches which
>
> - switch !! to ||, because !! in shells typically has something to do
>   with rerunning the last command
>
> - activate the syntax by default -- I do use Eshell regularly myself,
>   and I don't believe that activating it by default is likely to disrupt
>   anyone's usage
>
> - adds a section to the Eshell manual introducing the new syntax.

Thanks! I've played a little bit with it.

>> And I have the impression, that the eshell history is not preserved any
>> longer, when I have applied these settings.
>
> I have not been able to reproduce this -- can you confirm?

Yep, the eshell history is there. However, it looks a little bit weird,
when I have applied '|| cat .emacs | grep a'. The history shows me
'eshell-shell-command "cat .emacs | grep a"' instead. I understand
what's meant, but is this convenient for an occasional eshell user?

>> It doesn't work for me. The reason is a little bit subtle: you use
>> `shell-file-name' in order to call a remote shell. In my case, it is
>> "/usr/local/bin/tcsh", which doesn't exist on the remote machine I've
>> used for testing.
>
> I was able to fix this by using `with-connection-local-variables'.
> Thank you for pointing out the problem.

This is fixed, indeed.

Thinking more about, perhaps we could solve it a little bit
differently. Eshell knows how to invoke external commands explicitly, by
prefixing the command with a star like '*ls'. What if we do it the same
with pipes? That means, '*|' would mean to call an external pipe. So my
command above would be 'cat .emacs *| grep a'. And an external pipe
shall convert all other commands in that line into external commands as
well, like '*cat .emacs *| *grep a'.

By this you wouldn't need your restore-unexpanded-input patch any more, yes?

WDYT?

Best regards, Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 25 Dec 2021 22:46:01 +0000
Resent-Message-ID: <handler.46351.B46351.16404723551456 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Michael Albinus <michael.albinus@HIDDEN>, 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.16404723551456
          (code B ref 46351); Sat, 25 Dec 2021 22:46:01 +0000
Received: (at 46351) by debbugs.gnu.org; 25 Dec 2021 22:45:55 +0000
Received: from localhost ([127.0.0.1]:40014 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1FnW-0000NP-KX
	for submit <at> debbugs.gnu.org; Sat, 25 Dec 2021 17:45:54 -0500
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:50175)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spwhitton@HIDDEN>) id 1n1FnU-0000N8-6o
 for 46351 <at> debbugs.gnu.org; Sat, 25 Dec 2021 17:45:53 -0500
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.west.internal (Postfix) with ESMTP id 1D9633200E8E;
 Sat, 25 Dec 2021 17:45:46 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Sat, 25 Dec 2021 17:45:46 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=from:to:subject:in-reply-to:references:date:message-id
 :mime-version:content-type; s=fm2; bh=oyI2mZtIRK00E6lMyXQ2bKW9C8
 kqq1gt2Si/sJwl9yM=; b=gbCqkpNjVtqCzJZln5c15VDz89HLHahU/0z2fQ7ImX
 sKHX/P3/t+vV+wGwweaYJVKfcPNfujKUO7aEbUhehoMPw0AUDjsxzKHuq7z5ugv2
 5yQya9yV2BFs3+vDTjCV/hVyeMRnDZ2zy1Bh/XGqkPbysvXKM5QYxlA9JEofLBiZ
 W2hUre0MEGpWGsuGaZzehZ19Ptm+/roANfe+mt7fV0X4MqtecIALk+G+6C+MGzz0
 eeIf6lAX+0ZMB9YxQJbzbxqGmhvuH9QcD1QLnHJANSZQ5LN/mFVH0Pe5/TKISxrh
 grEHbNHAx4E7z/XVA6ZnNZw7WE53JqV615HZ+p/q6RAQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=oyI2mZ
 tIRK00E6lMyXQ2bKW9C8kqq1gt2Si/sJwl9yM=; b=EVtjSEgNDouIdhRAMtZ1Nn
 eN7AT+l/kdLF5C/m3FCDWT2N0sTGVMtA12UJUloMzCILx92DmCizo/Hwlq5Z5tRg
 Y53DncbukWeTSH9m5FxW4kZ/BlHzMdysnKe4mrV/PR2jEiPe/leC5UcAnLlDUKln
 7DKdZz7BQ+1zDlXi7Q5NaDRuMp05FHAEKuxN9cC4Q8JKenVnWZ1HtEgKAqB45GOW
 PYeJmBkZjAaE1dC1lttzhOASeVtyDmfILphFdY70w2mu+/GbOSHwjQ1Sw2pAO7u3
 9i1SogR0nk0AyCxV/3YKW6WE3e2LLDui5U0/b7dXduFboAeL+WOCrRcP9xWhIA6g
 ==
X-ME-Sender: <xms:GZ_HYfFnXuAk8i0bDlk2FhTi1Fo8TRQt96xinXMUORLvy_eugmiRRA>
 <xme:GZ_HYcXjtnG0csNNOYNTzhxVvJprGfEHVpRF0ZASnLI8Rd9LVxh0N22njZqROzrvK
 oQJT_2DvTYRSAPcow>
X-ME-Received: <xmr:GZ_HYRJRfoIkHSZbPPEraCtcjYcSuahst2Y3Yz10VmYZAH6EHEyyPU6KaYQvSB9KbJCrnczpLDybNI1mbveBkxSCjLXhp7CVp26aWzc>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddufecutefuodetggdotefrodftvfcurf
 hrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecuuegr
 ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug
 hrpefhvffujghffgffkfggtgesthdttddttdertdenucfhrhhomhepufgvrghnucghhhhi
 thhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqeenucggtf
 frrghtthgvrhhnpeelgeeggfdvieejvdfhudfggeetgfekkeeuieeljeejhedugeegfeet
 gefhueffkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh
 hmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg
X-ME-Proxy: <xmx:GZ_HYdEcGqpmzh2gY2tSSxIHUEn7bEnaIITCZIVZmpbxYdjkzotIVQ>
 <xmx:GZ_HYVXP8e0oYz0wfccJDuhmms-ztfifrt3kb8IpOj8pPh1NJXfdVQ>
 <xmx:GZ_HYYNBfumtXN20D2h5YEHPy04oWoge21TMAN7C7jInPVgas8HqaQ>
 <xmx:GZ_HYWe-iVTTCrU57PUVzn94GTqQOIYK_AP6e0054CWW7WzENbuJSA>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 25 Dec 2021 17:45:45 -0500 (EST)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id F3F8E7F32AD; Sat, 25 Dec 2021 15:45:43 -0700 (MST)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <87czlkbxnh.fsf@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50
 (x86_64-pc-linux-gnu)
Date: Sat, 25 Dec 2021 15:45:43 -0700
Message-ID: <87ee601ey0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello Michael,

On Sat 25 Dec 2021 at 02:51PM +01, Michael Albinus wrote:

> Yep, the eshell history is there. However, it looks a little bit weird,
> when I have applied '|| cat .emacs | grep a'. The history shows me
> 'eshell-shell-command "cat .emacs | grep a"' instead. I understand
> what's meant, but is this convenient for an occasional eshell user?

Yeah.  Actually, when I prepared the first version of this series, the
unexpanded version got stored in the history, so I think something has
changed about Eshell history recording in the past year.

> Thinking more about, perhaps we could solve it a little bit
> differently. Eshell knows how to invoke external commands explicitly, by
> prefixing the command with a star like '*ls'. What if we do it the same
> with pipes? That means, '*|' would mean to call an external pipe. So my
> command above would be 'cat .emacs *| grep a'. And an external pipe
> shall convert all other commands in that line into external commands as
> well, like '*cat .emacs *| *grep a'.
>
> By this you wouldn't need your restore-unexpanded-input patch any more, yes?

This is an intriguing suggestion.  It would need to be implemented in
`eshell-parse-pipeline, rather than `eshell-expand-input-functions',
because parsing is required to determine which *| are unquoted, etc.  We
also require *> and *< redirections, also in `eshell-parse-pipeline'.

So, I guess when A *| B is parsed, it would be rewritten to a single
call to `shell-file-name' in the way that `eshell-shell-command' does.
I am not sure how feasible it will be to implement that within the
existing structure of `eshell-parse-pipeline', but I can give it a try.

I have one unresolved design question.  A disadvantage of your proposal
compared to mine is that it is much more laborious to convert an
existing pipeline to use the external shell: you have to replace each |
with *| and > with *>, etc., instead of just putting || at the
beginning.

I think it's important that it is easy to switch this feature on and
off, because it is often only after you start figuring out a pipeline
that you realise you ought to bypass Eshell's pipelining.

One option would be to add an entry to `eshell-expand-input-functions'
which converts all | to *| and > to *> when the input begins with ||.
But that is too simple, because you need to parse the input to know
which | to replace ... any ideas?  I don't think it can be done inside
`eshell-parse-command'.

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Dec 2021 14:44:01 +0000
Resent-Message-ID: <handler.46351.B46351.164061618610155 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.164061618610155
          (code B ref 46351); Mon, 27 Dec 2021 14:44:01 +0000
Received: (at 46351) by debbugs.gnu.org; 27 Dec 2021 14:43:06 +0000
Received: from localhost ([127.0.0.1]:42415 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1rDM-0002dh-3H
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 09:43:05 -0500
Received: from mout.gmx.net ([212.227.17.22]:42141)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1n1rD6-0002cn-0Q
 for 46351 <at> debbugs.gnu.org; Mon, 27 Dec 2021 09:43:03 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1640616159;
 bh=ca/qRAzsaE0C26ohy+R+KZxZSIElRSGFnxrv0V1DMjQ=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=Y1TB/BKHPELAzCa1YFeNY3ROMYFyOWRveMUEm3TBuo2wtQ9F2FFNaon9svJhYDo60
 MKENLGWqEmgQ//TMHwC3Aq/OoKPbPSzLFk2rmC2iaVkExAqYuAUwtcqMfSkKIb8wTi
 XzLOT4A12hYXv8EIkqoo0fHVIS2PseVp7nxvb7h0=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([79.140.124.170]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MUGiJ-1mtIke04Dj-00RHhg; Mon, 27
 Dec 2021 15:42:39 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
 <87ee601ey0.fsf@HIDDEN>
Date: Mon, 27 Dec 2021 15:42:37 +0100
In-Reply-To: <87ee601ey0.fsf@HIDDEN> (Sean Whitton's message
 of "Sat, 25 Dec 2021 15:45:43 -0700")
Message-ID: <871r1yaz36.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:yoMOSxhcOBXCTFFHCKMad6r9MOb7vd5TAmSOu8ivSunO8QPaIAL
 MI5lx6868jfeZJo7uwy6qRk88sTdL8NJkbkYQSMVjsstubLabLZPcYH9Lt2XM7QbOm2a9n2
 j5Yt/+olRY0dKNiG+kafq6yYrNZxlbwiC7O3f0DCe9ep4WDFyNBjp5y6vyhCGu+vX3hmM8v
 th4e9zzc0u4dTXPet8b7A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:vkWA/r+Id3Y=:f6Z1MxC+KGpWhSrfjNIq3L
 NE+a/Jtvoan/L1lb0LrSfBBs1sY65WnEXtiRHsE9xpRSSJTVgSW767m68LkoE4ITHW0C0Cgbi
 Rgsr8e6bu1R5RPkc24464mduFSAlpG8N2IfAL/94FxOYZl24qU5953uXQgCPYBxo+Qim2/ojY
 0VBKE1tD5///ajvAqgGfAoCXzT+AZLOeYmOj5Fm3nZjLPLtQ04s2GwA48KShn+KsMYEI5+/cx
 nQfXcLdXwhqUqE5nbnyLUrMxfoef9IZUpZeS0QBiMmPtyaT1u/cOH43dldyGa+2y2+QdHCNl8
 nKZIkd0OxymlQvgzH81xTidkH/YaVQXTMhYSu61wyVXaucazmgH+23QdAbfj53J4/aadn7Do5
 G5dbg6V32aijEMFTFzZs3H525veAqk5Kw49yVt/PSKvFePaLs2UBykM9TN35Oc896AF66Igfo
 5Ub+dxBVMtupQE+pSPlkxmnWnG+nmmUx7JGO7wdEZk6kpe5KM1FuweOTLzoiMNysJ3DZsdblN
 phdd9vzFtm0Qx2mVQzW8omL+w91UfHutOZTxrG4HksC/NQGcCgY6qgeO8aH9+oh6UH6tZibdL
 mPgizgk0LI/RHgcoR/xy8U7wyVzQHhrqNl+dKpJXKJnUpXzX6pNIBFWyOBf7pnzLzqD1F1Sqt
 3C23J5r99Ls6E5ZwDh5VLQxVTVNrNcTb2Xm+tPf3ZcD6iDAFwAOE7njDmIWpnndRUtiYL6tZM
 7vxqbb/H5ky3+5s6yv5fKOe9SnIRMNkR6ZVg/LCwAkd1DJNokAWKVkEpXgBjgNqAzbbmKhr13
 MKjAb5B/QbaSnJTtgpV+7Cq/3G+1hiyelOo1wymV65pXRqzNcr6CuU9BKlcyZF+9SMumV0ONl
 4hMtx2mnnLkMYzIDrjP5Ni74LSoEKTfq79Pl14rCleAcPcgbcS15b5uGobssaEo0MSBp7Luxg
 /T2qmhuWbfP3sfp1QpuEb2nSjMjacKv/VXNnABsZPwF1eDSxIlVItJGLDtNkyHu4wUAOsaEin
 jOjln5Na14OZMrJT4XfJg//pLQBjq8s3XdISmD5/uKTpoJ52ltcKCBW/Q94EnDMt7gZ0uDDPP
 zDbN+UkutRCPko=
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> Hello Michael,

Hi Sean,

>> Thinking more about, perhaps we could solve it a little bit
>> differently. Eshell knows how to invoke external commands explicitly, by
>> prefixing the command with a star like '*ls'. What if we do it the same
>> with pipes? That means, '*|' would mean to call an external pipe. So my
>> command above would be 'cat .emacs *| grep a'. And an external pipe
>> shall convert all other commands in that line into external commands as
>> well, like '*cat .emacs *| *grep a'.
>>
>> By this you wouldn't need your restore-unexpanded-input patch any more, yes?
>
> This is an intriguing suggestion.  It would need to be implemented in
> `eshell-parse-pipeline, rather than `eshell-expand-input-functions',
> because parsing is required to determine which *| are unquoted, etc.  We
> also require *> and *< redirections, also in `eshell-parse-pipeline'.
>
> So, I guess when A *| B is parsed, it would be rewritten to a single
> call to `shell-file-name' in the way that `eshell-shell-command' does.
> I am not sure how feasible it will be to implement that within the
> existing structure of `eshell-parse-pipeline', but I can give it a try.

Perhaps. I'm not so familar with the eshell code, so I cannot give you
much recommendation on implementation details.

> I have one unresolved design question.  A disadvantage of your proposal
> compared to mine is that it is much more laborious to convert an
> existing pipeline to use the external shell: you have to replace each |
> with *| and > with *>, etc., instead of just putting || at the
> beginning.

Yep, but this isn't relevant for the user. This replacement shall happen
by eshell itself, in the background. And it isn't necessary to show this
replacement by the commands in the history.

> I think it's important that it is easy to switch this feature on and
> off, because it is often only after you start figuring out a pipeline
> that you realise you ought to bypass Eshell's pipelining.

As I said: switching on this feature just needs the asterisk to *|.

> One option would be to add an entry to `eshell-expand-input-functions'
> which converts all | to *| and > to *> when the input begins with ||.
> But that is too simple, because you need to parse the input to know
> which | to replace ... any ideas?  I don't think it can be done inside
> `eshell-parse-command'.

Again, I don't see the need for the heading ||. When there is a *| in
the command line, DTRT.

Best regards, Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Dec 2021 18:14:01 +0000
Resent-Message-ID: <handler.46351.B46351.164062882114589 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Michael Albinus <michael.albinus@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.164062882114589
          (code B ref 46351); Mon, 27 Dec 2021 18:14:01 +0000
Received: (at 46351) by debbugs.gnu.org; 27 Dec 2021 18:13:41 +0000
Received: from localhost ([127.0.0.1]:44225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1uVA-0003nE-Pb
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 13:13:41 -0500
Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:56385)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spwhitton@HIDDEN>) id 1n1uV6-0003mq-Kd
 for 46351 <at> debbugs.gnu.org; Mon, 27 Dec 2021 13:13:40 -0500
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.west.internal (Postfix) with ESMTP id B2E513200F3B;
 Mon, 27 Dec 2021 13:13:30 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute5.internal (MEProxy); Mon, 27 Dec 2021 13:13:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=from:to:cc:subject:in-reply-to:references:date:message-id
 :mime-version:content-type; s=fm2; bh=WvyKcDVyne7mz4NgzeRPMEJfkp
 IDy2W3vgGl6Dfa3Fg=; b=F0Q14VUv5ySsTGVE+fI11MKGl4bEsP5oWQvNEhwn7d
 iuP08trE0kVKrK85/Xmd6eifTPnxRlnA8HrW6xYss/jN/0qmZUqfjvxBxUioWWfW
 HsvSimexTt/AEpmlCEwsiJOAoa2fW0lR1VBir9ZvMkMAJb6jsxzF6AuO4OH3/MKT
 mf/p0CDFCOBAGZyKRx2RgVAfh3hecQ2wVTiUgHHeaOvZNZiC///BtiSYQCac+4DV
 pI8pzFOfIbMGYMYnNELMQCPOXC2KvMvKhhjdqKRqRnIcTGA1nci43qJDTcp9e6cl
 77EgtLJVQpUpOjP1SOXGi/X2SS0a/rScOW/rRnGQP3qw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=WvyKcD
 Vyne7mz4NgzeRPMEJfkpIDy2W3vgGl6Dfa3Fg=; b=TaoMcmK/BgTJUkzbF6vXCL
 0+Cs7EW3mjzTaIdMwWPtFi4h6pZKX7v7IfV4oZCQG470XvUF5N/dotWcFOYT+gvX
 SRH6p+5b5PJC0LxZKmSD5VvA9kDBTdaXVZcROCm9JkWRDux+c1N/iSc/QZJC3/FR
 gLtv0owdf2q654ghJzgRoYeU30KvYeXTvK5o/VM73CgazmU0/lkrHPSkiEWzVZfl
 gh+xc4upVE4DwI19ba4UdyWJa2XcItdcE2xyFhgTDBNmeEmrFir/j1IQ+JpzluFR
 JQeh98w5xVtxsaPko7spLGkx1aSLoNyf4t9q3UwYkWTkGhJHG87fCv6tSOd6wmaA
 ==
X-ME-Sender: <xms:SgLKYXorRTzna8uUvTwXtotYyoHCtznPwb-vhtdHgaLDCbN4KH2inA>
 <xme:SgLKYRo78fY-IBKQukWcjfSK05AznGRdveH5bLV8dmoZCbOuAQuW3G8XknaYMyY4-
 C-fBxTLYrhNgU3NLA>
X-ME-Received: <xmr:SgLKYUPeJ9_krmg1z-H8Cr9myBOhXuYWmEHRRLLhu1lP0BBj4ETdE8W_FiPHo4iqcenA5wtLDEERDSAmxiowPHWdEfvWbn8zqestk4lKijMFG4I1Cg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddujedgleelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufgjfhgffffkgggtsehttddttddtredtnecuhfhrohhmpefuvggrnhcu
 hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne
 cuggftrfgrthhtvghrnhepleeggefgvdeijedvhfdugfegtefgkeekueeileejjeehudeg
 geefteeghfeuffeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv
X-ME-Proxy: <xmx:SgLKYa5AURq3_b4qkIJ7NuKtwnDq_IacSl66AtQHgxrQGduwT5w3tg>
 <xmx:SgLKYW6iYPWe8l11tpfvm6JR5eY0i04b29tB_RXAlSwCOk0kuDH05g>
 <xmx:SgLKYSiZYu7rzmpVwfgFqNO9jkMVO1Xrz-Z0gCD4IvUSNuiibpiFxw>
 <xmx:SgLKYbhgK2y6EzYeAxKW0kP2yI6-dlg-9AORWRRlVc8MLlbihl-yaw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 27 Dec 2021 13:13:29 -0500 (EST)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 078B77E9113; Mon, 27 Dec 2021 11:13:29 -0700 (MST)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <871r1yaz36.fsf@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
 <87ee601ey0.fsf@HIDDEN> <871r1yaz36.fsf@HIDDEN>
User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50
 (x86_64-pc-linux-gnu)
Date: Mon, 27 Dec 2021 11:13:29 -0700
Message-ID: <87y245zzjq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello Michael,

On Mon 27 Dec 2021 at 03:42PM +01, Michael Albinus wrote:

>> I have one unresolved design question.  A disadvantage of your proposal
>> compared to mine is that it is much more laborious to convert an
>> existing pipeline to use the external shell: you have to replace each |
>> with *| and > with *>, etc., instead of just putting || at the
>> beginning.
>
> Yep, but this isn't relevant for the user. This replacement shall happen
> by eshell itself, in the background. And it isn't necessary to show this
> replacement by the commands in the history.
>
>> I think it's important that it is easy to switch this feature on and
>> off, because it is often only after you start figuring out a pipeline
>> that you realise you ought to bypass Eshell's pipelining.
>
> As I said: switching on this feature just needs the asterisk to *|.
>
>> One option would be to add an entry to `eshell-expand-input-functions'
>> which converts all | to *| and > to *> when the input begins with ||.
>> But that is too simple, because you need to parse the input to know
>> which | to replace ... any ideas?  I don't think it can be done inside
>> `eshell-parse-command'.
>
> Again, I don't see the need for the heading ||. When there is a *| in
> the command line, DTRT.

What I had in mind was a pipeline involving more than two commands, e.g.

    foo | bar | baz >quux

Indeed, this is exactly the sort of pipeline you might want this feature
for.  But the user would have to manually insert three asterisks to turn
on this feature.  That seems pretty inconvenient -- any thoughts on how
to improve it?

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Dec 2021 18:23:01 +0000
Resent-Message-ID: <handler.46351.B46351.164062936015829 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org, michael.albinus@HIDDEN
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.164062936015829
          (code B ref 46351); Mon, 27 Dec 2021 18:23:01 +0000
Received: (at 46351) by debbugs.gnu.org; 27 Dec 2021 18:22:40 +0000
Received: from localhost ([127.0.0.1]:44254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1uds-00047F-9Z
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 13:22:40 -0500
Received: from eggs.gnu.org ([209.51.188.92]:50746)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1n1udr-00046x-G8
 for 46351 <at> debbugs.gnu.org; Mon, 27 Dec 2021 13:22:39 -0500
Received: from [2001:470:142:3::e] (port=35708 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1n1udm-0004EB-2M; Mon, 27 Dec 2021 13:22:34 -0500
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=I8jRG8qqiXGHYSwGSuKZGvLE7ZcFceHM4brKS1L6AGA=; b=SIfv0ScOMR19
 g478UXaLkS5RQYc7mIKl0zZ8jwLVU2Fynx8ObajGjwFDwEy0NRS3p8hPq8wutJnW/+mqmVNfjqpJo
 pbn/OTpCsaiH8qQKEFkZ9Jc2KCNYyV7zStZ3kK1D2+fh+fTe+Gqgb3b/pHhkE79hbj/qAgOnI8VvO
 8CXT5OFqBqddVmIV7+XW0jyP85kmUaUU4U6Ciy4RGES66sPQCUUROk0okbyZq+hOQh7E5kIi4GCoi
 ex4p5CXZrYR51VE8ahtA1Lll7wGFRqvr6yQXMV0WmmG8l+SvfHJBjOLHCo3v/v2tNhMtK3Tdg/oe+
 mpf1MC98ESEEcU5TIBoQJg==;
Received: from [87.69.77.57] (port=3606 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1n1udm-0003tV-5O; Mon, 27 Dec 2021 13:22:34 -0500
Date: Mon, 27 Dec 2021 20:22:31 +0200
Message-Id: <83fsqdnc0o.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87y245zzjq.fsf@HIDDEN> (message from Sean
 Whitton on Mon, 27 Dec 2021 11:13:29 -0700)
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
 <87ee601ey0.fsf@HIDDEN> <871r1yaz36.fsf@HIDDEN>
 <87y245zzjq.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Sean Whitton <spwhitton@HIDDEN>
> Date: Mon, 27 Dec 2021 11:13:29 -0700
> Cc: 46351 <at> debbugs.gnu.org
> 
> What I had in mind was a pipeline involving more than two commands, e.g.
> 
>     foo | bar | baz >quux
> 
> Indeed, this is exactly the sort of pipeline you might want this feature
> for.  But the user would have to manually insert three asterisks to turn
> on this feature.  That seems pretty inconvenient -- any thoughts on how
> to improve it?

The easiest way is to add a user option that would make every pipe use
the external shell.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Dec 2021 18:27:02 +0000
Resent-Message-ID: <handler.46351.B46351.164062959016304 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.164062959016304
          (code B ref 46351); Mon, 27 Dec 2021 18:27:02 +0000
Received: (at 46351) by debbugs.gnu.org; 27 Dec 2021 18:26:30 +0000
Received: from localhost ([127.0.0.1]:44258 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1uhZ-0004Eu-QU
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 13:26:29 -0500
Received: from mout.gmx.net ([212.227.17.21]:35033)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1n1uhX-0004Eb-4m
 for 46351 <at> debbugs.gnu.org; Mon, 27 Dec 2021 13:26:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1640629578;
 bh=9sdFYGTKWnOi2zYfeyorvNl63LAdwOH0XLWa5iImdOY=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=HcIlA3BKeES6vUZ7cs7hCLRptajKWxAmvHKSS6KHV+70lse5U4ebAaTlwL8zqPP45
 7k9nNlH6guaA/r/wnHKZOIHzue5eZlcTxEyxFe8EPikWhww/TPqlI2AWe1doECulPU
 zlTrysyn8PGAYjH9RFVDO7X/NZrapmEmF0MxhNWI=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([79.140.124.170]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M72oB-1n4xde3zgN-008YxB; Mon, 27
 Dec 2021 19:26:18 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
 <87ee601ey0.fsf@HIDDEN> <871r1yaz36.fsf@HIDDEN>
 <87y245zzjq.fsf@HIDDEN>
Date: Mon, 27 Dec 2021 19:26:17 +0100
In-Reply-To: <87y245zzjq.fsf@HIDDEN> (Sean Whitton's message
 of "Mon, 27 Dec 2021 11:13:29 -0700")
Message-ID: <87r19xaoqe.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:bsDPWJq8mW4y0a0V/8ErrqBajiLqyOrR/HA5TdqBcqPe+uw7VNe
 2jL1Uk2ao/YQIxENtP4+hFHTE9PwQxoJXGUxn5Z/Ja58kfPTqefGfgpedNysQmlsAKafwh1
 T7m1asRMZaeXrNXkK2V9nnKYT9mXVGeU/rQp7x/WoJfvJKdUnVuybtiFpHA4nILN4T4seEu
 TSu84txb7VrClbAuYZFAQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:B2xQtN+O4CI=:uj2QeMC1A1RlWOJBdFJz4Z
 d6fC25NkTdMTmWLbqBvEZTaET19SvHm/8qWkPnMNeQhA1Xs548H5zAneByzxjA+ApBvXBwaiU
 H5hLf4My9GcQBYxbHkHp8O+gZ0Ggxwlp+hn+fjVMc088ct8yjIuS5ARi1msOYmdq9LvZIAK0O
 B7Jb18vz6GCyyFCYlzCfigqIrEfsiUBGwp5FN3Bk0y6hlwuARhwr3OiF5cYrdHv2XrHlsdPB2
 CuiIdtMY5d6POF/tZO9EL6hEkbwyl2gIBKPQqMN3BcjIrjXhg+zWWiKNa9Psgi8FuuS9YwcpT
 UtH3F2c49OOCRSKOym+Bn/iijromXlOkWN0WVGSCMyB7XOLbZR6D8LZQazt4ts+AxXUzExWiA
 PhPTyySzkmmwZtsWnEZU8VRU+XlGhdwJIEnNWk1Paw0pgg5hsPCCDFzV/UwWKGI5x2qsAS1+e
 l3KR2ev8LovvEz3oyAqQXHOduZ3Zu6xlEFmBG0+Fi1Kx1AUdUlz6qSUHhPRldkDtPCqqrURR/
 igvPNtJZ/Ro9kxBh5jQ/vqSt1E64q96YNZ/FUEgg1dg2YiEURKeYaSXZBEfKKWwjg3GKn0lYa
 wPTNp8Up4/MByzQ83nXn0aiofZe88zCsF+AndljXcins57s5Inq8xlE9CM/sj75q8UrkH1NhY
 sGgTbaNmBkp8A+R4wetf1RwzwETV/YAORLXxzudtDD2NCPe875ys2jfMWxYnfCKIHwRUg8qEu
 roH9drVrdQdNk6tjLdseJq+tFrUSWjUoJfBjQK99oBu/ot0/q8C3fxk7zO8Vx1N+/f/PxtlXY
 eXRzNYbqxhxUoWxRonn+ViXw5l2zkDixWIRpZA4aZUV4RiOdHMNNYOlEBb2es9n8OFxbR+T+6
 LEMdedrUvuAO9kZDuNeggWBfc8oeQ/ZyxxhuBa/eQZJWZIct3w8o9d+WDxF10F6LMmOKjcWwR
 pw/WhpmWiQPOq81b7xncPyp1hQN4OHLySXAv7JdBpXJKxwQEq1isjmbQYnyy15wYl3Jp0zKGq
 x93iWn6DOLTfHgl8PtLHfl4TZ4O/cLs0BmtqpSEDpC6NG8VMFrXi+DReXw66Gf2mcMPf2nQJ2
 YNPTrMPWCNbc8c=
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> Hello Michael,

Hi Sean,

>> Again, I don't see the need for the heading ||. When there is a *| in
>> the command line, DTRT.
>
> What I had in mind was a pipeline involving more than two commands, e.g.
>
>     foo | bar | baz >quux
>
> Indeed, this is exactly the sort of pipeline you might want this feature
> for.  But the user would have to manually insert three asterisks to turn
> on this feature.  That seems pretty inconvenient -- any thoughts on how
> to improve it?

One to rule them all. As soon there is one *|, *< or *> in the command
line, everything is regarded external. Also commands like ls or cat,
which behave then like *ls or *cat.

Best regards, Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Dec 2021 19:23:01 +0000
Resent-Message-ID: <handler.46351.B46351.164063292223042 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Michael Albinus <michael.albinus@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 46351 <at> debbugs.gnu.org
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.164063292223042
          (code B ref 46351); Mon, 27 Dec 2021 19:23:01 +0000
Received: (at 46351) by debbugs.gnu.org; 27 Dec 2021 19:22:02 +0000
Received: from localhost ([127.0.0.1]:44293 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1vZK-0005zZ-8j
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:22:02 -0500
Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:53413)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spwhitton@HIDDEN>) id 1n1vZI-0005zG-NT
 for 46351 <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:22:01 -0500
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id CC4663200D18;
 Mon, 27 Dec 2021 14:21:54 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Mon, 27 Dec 2021 14:21:55 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=from:to:subject:in-reply-to:references:references:date
 :message-id:mime-version:content-type; s=fm2; bh=6c/IJvvlFoHBh2e
 gKqDc85tj30sljmfSY+wqTzsxD1s=; b=vEaytHqPxext7eA6Bqf3J/TgPui0AQm
 mXTZCj1z1tyA2hpQkyENVcjZw0/23dHgCebhj+6d5fGk2yZ7+SpSxGmnGHKl45eZ
 frYu6JcYo7ayjx4UigSoG2YF1lr8WOQp0vKpS9WUc3flUF/iZX/8TmmZTNhnBpWp
 n53/STwgveaFC7UjvKMl7XOtxCxBZrrAvnFN2vSlDN0ONCuqwBfeBiTfPe1/h+QZ
 0MxzijPzSRjYYRGBz1Bd2y7Clf4snqp8+DdKgmv1nf6CjSYGzIsEhSQH66kYf8TN
 pRUYh8nyhPf4SdNCDaZ9TkmMEST5AGtMxspdqsFTEHS/kOS5cAhLaIA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:references:subject:to
 :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm1; bh=6c/IJvvlFoHBh2egKqDc85tj30sljmfSY+wqTzsxD1s=; b=aPK/u/SZ
 mM4rbAYYkzKM9CJ5XCHia9HCShIIt7s4VgjfMrQvkwm62ay36qLivLIes3wygBj+
 C6ea//g5qb1g6S4U3WZSrRyMKt4am28pr+IFvfVZEx4KN7ntFOCOjrkCIJGkBMib
 yTQQCGkXv+J4Ek37r8ZUHCNUW0gLjbCZTL5UWSs/X4VlWOAN5c7Xb4n9X3/FGCXx
 iwi4d20tQdDQxt9xWuKGRPFytRgOEdWvhuCE5HnFDmtABceBTVywl1CluFIxmca5
 c0NcqVPWU9cX2CyYiSMwOOXxrUXXSY65QSBIENP+RbhL6VUrnY2mMyDM2FIhDp+F
 icFWS7a+lkkdZA==
X-ME-Sender: <xms:UhLKYSS-4CWYEHnCqE_E1wSIKOTSNtXq4DUeg5y4IzSNW3XazUHnCw>
 <xme:UhLKYXxpq9QFDEv4_gtkg-LDNaIykFum4muMBzFb2cCsJnw4vIMMHXKj8J_BQ51Pg
 77A9c9p7CTBGAuPfA>
X-ME-Received: <xmr:UhLKYf2pcUvmJda4MfnTYL-rkebH9kVQ601CLURFxP-N-Sdb2P8xpMjWIe1kbJnVhtwzaN9oSK_GMB8kHE2iYxAWE-dB8fLn-kLngRS62k0CcGKk6g>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddujedgudduudcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enogfthfevqddqjfgurhdqufhushhpvggtthdqlhhoficuldehmdenogfthfevqddqjfgu
 rhdqufhushhpvggtthculddvtddmnecujfgurhephffvufgjfhhffgffkfggtgesthdttd
 dttdertdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfihhihhtthhonhes
 shhpfihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpefhteevvdelieevgf
 dttddtleeghfetjeefiedugfeihedtkedtkeefkeeguefgieenucevlhhushhtvghrufhi
 iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhh
 hithhtohhnrdhnrghmvg
X-ME-Proxy: <xmx:UhLKYeAaPp7-wkiyHTMFXKTi34Do3Q08j9FSrIjNeJhPi9A-IOrP8g>
 <xmx:UhLKYbh1Wm__fr2m04X5LIKcImW-GdbRGACWGyLqoB4Hs74OBql__Q>
 <xmx:UhLKYaoLzkWc50P2H7KaHIvHmobiw4ap7y4WWZrzBbGfb_cd5czvCA>
 <xmx:UhLKYTaiaRZuXHOcJRSnAwJVVyg3YYxcQERbREUupbcvflnDV4piIw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 27 Dec 2021 14:21:53 -0500 (EST)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 20F257F7F72; Mon, 27 Dec 2021 12:21:53 -0700 (MST)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <83fsqdnc0o.fsf@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
 <87ee601ey0.fsf@HIDDEN> <871r1yaz36.fsf@HIDDEN>
 <87y245zzjq.fsf@HIDDEN> <83fsqdnc0o.fsf@HIDDEN>
References: <87r19xaoqe.fsf@HIDDEN>
User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50
 (x86_64-pc-linux-gnu)
Date: Mon, 27 Dec 2021 12:21:53 -0700
Message-ID: <87o851zwdq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello,

On Mon 27 Dec 2021 at 08:22PM +02, Eli Zaretskii wrote:

> The easiest way is to add a user option that would make every pipe use
> the external shell.

On Mon 27 Dec 2021 at 07:26PM +01, Michael Albinus wrote:

> One to rule them all. As soon there is one *|, *< or *> in the command
> line, everything is regarded external. Also commands like ls or cat,
> which behave then like *ls or *cat.

I see what you mean now, but I don't think either of these options would
be desirable.  It would mean that you can't combine Lisp functions with
external commands; for example

    my-lisp-function arg1 arg2 | my-cool-encoder *>output.ogg

In this case, the first | needs to use Eshell's own pipelining support.

Similarly something like

    buffer-string #<buffer ...> | my-cool-command *| other-cmd *>file

Does that make sense?  Would you agree that this new feature needs to
work only on individual pairs of commands?

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Dec 2021 19:36:02 +0000
Resent-Message-ID: <handler.46351.B46351.164063375324536 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org, michael.albinus@HIDDEN
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.164063375324536
          (code B ref 46351); Mon, 27 Dec 2021 19:36:02 +0000
Received: (at 46351) by debbugs.gnu.org; 27 Dec 2021 19:35:53 +0000
Received: from localhost ([127.0.0.1]:44304 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1vmi-0006Nf-Rx
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:35:53 -0500
Received: from eggs.gnu.org ([209.51.188.92]:36276)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1n1vme-0006NQ-Po
 for 46351 <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:35:51 -0500
Received: from [2001:470:142:3::e] (port=39166 helo=fencepost.gnu.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1n1vmZ-0005ha-Gl; Mon, 27 Dec 2021 14:35:43 -0500
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=zBFpQ7dmvmD132zfv6c9wZ9dqL0SdGI458xFRsGvN8w=; b=PQv1daogLi7A
 MJCLgluYCUgTEthsrT4gW+yDVx8yOUvJasyFkilThlFi3oqGeHI+fhH2YdB/rCaOdg1aYTmysVHzj
 xandy7S0JTk3ahpWsMcKJb7qknV7sO5zzWi8nV6WnnjwoUhcd4y24aUHGW7OZ1+oE3TOrWrtPXjj6
 YwTbm26godQqLsbjsQD2IdKkyx1bRTi+auMD72huYxPEexkavItxO+uNj30C1Zq06g84Py0W7k4rL
 mu8wCfmWiHt3R7tkPJxiMN43FlaXX1Q+mcunxq33J9LcZ3SEETQNhudplbmVQgo//4BDnkJu1QYr2
 bG289oBSQddJU+IwYCZYFw==;
Received: from [87.69.77.57] (port=4190 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1n1vmZ-0005Wi-Ec; Mon, 27 Dec 2021 14:35:43 -0500
Date: Mon, 27 Dec 2021 21:35:40 +0200
Message-Id: <83bl11n8mr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87o851zwdq.fsf@HIDDEN> (message from Sean
 Whitton on Mon, 27 Dec 2021 12:21:53 -0700)
References: <87r19xaoqe.fsf@HIDDEN> <878s812c6a.fsf@HIDDEN>
 <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
 <87ee601ey0.fsf@HIDDEN> <871r1yaz36.fsf@HIDDEN>
 <87y245zzjq.fsf@HIDDEN> <83fsqdnc0o.fsf@HIDDEN>
 <87o851zwdq.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Sean Whitton <spwhitton@HIDDEN>
> Date: Mon, 27 Dec 2021 12:21:53 -0700
> 
> On Mon 27 Dec 2021 at 08:22PM +02, Eli Zaretskii wrote:
> 
> > The easiest way is to add a user option that would make every pipe use
> > the external shell.
> 
> On Mon 27 Dec 2021 at 07:26PM +01, Michael Albinus wrote:
> 
> > One to rule them all. As soon there is one *|, *< or *> in the command
> > line, everything is regarded external. Also commands like ls or cat,
> > which behave then like *ls or *cat.
> 
> I see what you mean now, but I don't think either of these options would
> be desirable.  It would mean that you can't combine Lisp functions with
> external commands; for example
> 
>     my-lisp-function arg1 arg2 | my-cool-encoder *>output.ogg
> 
> In this case, the first | needs to use Eshell's own pipelining support.
> 
> Similarly something like
> 
>     buffer-string #<buffer ...> | my-cool-command *| other-cmd *>file
> 
> Does that make sense?  Would you agree that this new feature needs to
> work only on individual pairs of commands?

The *| thingy could be available as well, for when you need a mix.  My
proposal was only for the situation when it's hard or inconvenient to
change too many pipes manually.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Dec 2021 19:38:01 +0000
Resent-Message-ID: <handler.46351.B46351.164063384024712 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.164063384024712
          (code B ref 46351); Mon, 27 Dec 2021 19:38:01 +0000
Received: (at 46351) by debbugs.gnu.org; 27 Dec 2021 19:37:20 +0000
Received: from localhost ([127.0.0.1]:44308 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1vo8-0006QW-76
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:37:20 -0500
Received: from mout.gmx.net ([212.227.17.22]:42487)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1n1vo6-0006QD-Gs
 for 46351 <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:37:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1640633829;
 bh=9w/hFFPYpRhFk4EHiJwTeypNQap1gT2KP7tEeo02yNg=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=NXZ/CX2zEtP6iTCBbYWX9g/KddMrJ8q3Eve+iOZMbdgtTNIPsWE2c9rWcw1NLcRc3
 Ho6MDhuE/H1KsRTsG1oc7seYpYrixleMadDbhemEzmJPByvMEmxWQ32p8TR41Hs01R
 GVgooqFf0wFDFWTCNcwpYurd5ozBhv3qxeT7UTkY=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([79.140.124.170]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGz1f-1nEsEQ134t-00E8fN; Mon, 27
 Dec 2021 20:37:09 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
 <87ee601ey0.fsf@HIDDEN> <871r1yaz36.fsf@HIDDEN>
 <87y245zzjq.fsf@HIDDEN> <83fsqdnc0o.fsf@HIDDEN>
 <87r19xaoqe.fsf@HIDDEN> <87o851zwdq.fsf@HIDDEN>
Date: Mon, 27 Dec 2021 20:37:07 +0100
In-Reply-To: <87o851zwdq.fsf@HIDDEN> (Sean Whitton's message
 of "Mon, 27 Dec 2021 12:21:53 -0700")
Message-ID: <87lf05algc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:MN1HVFl+n/5lZxz36/0mT7/hSvMteEN+tUT56/IAilgGVLCrOGI
 mJbk1AMnadObdtuVPeB7C8o3w2qL0etuEt9lDqWRyUJWk7fJLcCEEZrUzyV+fb1YA6PEl5a
 rdZ7qvkMR32wnILw8HkRs553xQjnctN8GLM/1sjDjiW0WEWhqGK428LRVWhC7Mwm0r69n/H
 KjuqVvyOyPUYhs5kvZ3dw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:AfkZHUFt37I=:umm340C3KrcyX2kM8vwAPv
 iOv/97J1rTHgxbi0794AZ9bq7JfNxlmboetYF7Wv4dYtyZU2GuLSIMi3BbVlVFsu4LAGWDY+S
 9x+7BVjvJ1rMUaiMBoloQjf+m/mnSEzHXCW0JQnlvzM+6gSexZ8hsJthWYesH6iv2LbsMsp/e
 r3sAs5WiJ6U7wp1enJbYcCc26HX+co63Y8cJrJw3e05qWwT5zlIfeuq9ZZv6b/DXYIM+9Tm0W
 ka4fuMUuxQ8awoco84JO9HmdzWabpgKfxNnlCOYfsmgVNnPKjJZoqF/3irS8c1B4RRoxyShwS
 2Kvyt1G/OZHqG2Ar570+Mi12CEEHV57VTetfHz85quR4cddmEOpJdZ55aI2iFtfuUGvNVPBoE
 sof3NIzSQhZq+35Ym5v1pgjniLTyMi9NuNfKVYy15r0VTyw42UxZvXWSeel/z5T+H7b8W0V21
 8Y8qbBD2TG2mPdRgvvzRZ+gL+OFnJ/6B81GXMZGccSGnqjx7duHInvASQHOXgqCCFu3Jggvl7
 WUp/Sy0tk+5yCmHsppAg7TM3FNDGtrXyGgP0J0b8jyfWVgkSrWYc+DVGGRRf2YNmO3wECI/An
 Tbqq/jNke8evbE4YiHEFCb3WUlzOXUv6iyTyQw426awlWA1G22U0yyg4HP0mid4ugsciwNRrT
 saqCib1PM+KikLyF+RBWowqz6qVbGbOtmn0z2yMFkaW59bps8BPPxurCMUYoR9F5YFv4DtI2x
 mq4H32JyJzX1COUds5j4UQ6jZhvGTCas+/6dWcWE75auHa7uxTgBHI0DDR5lwH5hGH+kuP3gb
 2K6PqWjaIIII5OUboR6M3EUbW1p35V7g2gX4aWckHX5mQ1AOugmRlNh3pPd7vd1nMpXCtaAfB
 KRQfIgT0siVlv2iPd2BhVKx3DGkyZFGd4vUjIJI5jxWNybGhUpFFwYj3BDoL5cGNI0EYI+jeY
 VsVhdWDb4VK6fR+JdOdLeIhSSENcivzCbqfrvp7VAtfG7YQMgIbrn+605vBQrQpBE9x+jD6LI
 HmSrWvK2OTgrG2h32C8Yu+JqmfCHJ9k2WhAmQqD8z6rPcm/18anHhbL77S2ZNNqIqApFeyQlC
 x+IgpiRTVg5RWc=
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> Hello,

Hi Sean,

>> One to rule them all. As soon there is one *|, *< or *> in the command
>> line, everything is regarded external. Also commands like ls or cat,
>> which behave then like *ls or *cat.
>
> I see what you mean now, but I don't think either of these options would
> be desirable.  It would mean that you can't combine Lisp functions with
> external commands; for example
>
>     my-lisp-function arg1 arg2 | my-cool-encoder *>output.ogg
>
> In this case, the first | needs to use Eshell's own pipelining support.
>
> Similarly something like
>
>     buffer-string #<buffer ...> | my-cool-command *| other-cmd *>file
>
> Does that make sense?  Would you agree that this new feature needs to
> work only on individual pairs of commands?

If you want this complexity (external and internal pipelins and
stdin/stout redirection) in one command line, you must mark every single
such operator with an asterisk, which might be inconvenient. But you
have the eshell history, which gives you the command line including the
external asterisks, which let you edit the command prior reexecution.

Personally, I could live with both approaches. Your proposal with a
leading "||" is similar to my "one rules them all", because it changes
the meaning of all pipelines etc in a command line to be external.

Best regards, Michael.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Dec 2021 19:54:01 +0000
Resent-Message-ID: <handler.46351.B46351.164063483926734 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org, michael.albinus@HIDDEN
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.164063483926734
          (code B ref 46351); Mon, 27 Dec 2021 19:54:01 +0000
Received: (at 46351) by debbugs.gnu.org; 27 Dec 2021 19:53:59 +0000
Received: from localhost ([127.0.0.1]:44338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1w4F-0006x7-89
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:53:59 -0500
Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:35551)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spwhitton@HIDDEN>) id 1n1w4B-0006wp-Qh
 for 46351 <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:53:57 -0500
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailout.west.internal (Postfix) with ESMTP id 45ACC3200EE0;
 Mon, 27 Dec 2021 14:53:49 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Mon, 27 Dec 2021 14:53:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=from:to:cc:subject:in-reply-to:references:date:message-id
 :mime-version:content-type; s=fm2; bh=iV1TddUhUGawjioVrtFN8IyAyX
 tC2iKKkW2aRsG+YRg=; b=fBsg1oPJa6Y90M54vNkPkoFaz5yMYBKSt1wI4uNyVp
 KOYvtDVZ+iz85M4F9FQjQkOqgvW74xFEtbz88f6QQr505ma6H/+2yv0Gs9SYg4dl
 oCJrHWSauGUi0ba5pV1F5EOeR3L3jGQi0GjIS79Ct5GhJ+gynVzxP/SqRbYY3buV
 ICeaxC0+xG0GjlaMn1160iKlgFgdZJqQr2VRQKO7Z/lLh7ur9pJZRr4pGSzmTpwF
 L7bkv/3r5Y2FY2hUMOJt+0iR6ow41f3pzMyFKPyezO2Z9eyytzkaqnEEcIvtfFfe
 nC1k50I/wmB5+5WPEFLjTyB5p/sckOV3unxRpxh5AE+Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=iV1Tdd
 UhUGawjioVrtFN8IyAyXtC2iKKkW2aRsG+YRg=; b=QhOY3uaG2TEp9+z2V8LEdc
 YDyKaJfQMh+duAXAC/rVasVyBt0742gwcAZg090aSpCtYQeJ4aFEqcA1GfYNLznF
 pbjF8ciOVMraBdLunxScRpugUIWso2umESg9kgD+Ha6QJpxyilc45zhS2pWW6KeB
 KMkaApre+oVWw4C8KjR3gHocNbrdKDktXJ9Ptle0wijPkpBeH1u0hpy/ZxWSGQn+
 6wyEaMyEUHhBxTyXgmnkllSyBSXqvcP21QEMm4UbDe8Vn5jKxAQ6kZBW029m3ZD4
 6P5LPPHzked8f6+FJg3PlcDOgr+4MyvHEBdjDhoPECSupqFBujm6aNj0FF5frHdA
 ==
X-ME-Sender: <xms:zBnKYYBvEJ6ygjR-_19Z6iA04wlqaTmPxHJizFx-BcrPLu-avS5NZg>
 <xme:zBnKYaiVIiMLBAZiSLqRvBeWjmpnmKLpCk4yl0F_JyGL4e3zUviJrsBBkZRoHrEL5
 sA9QM0anS7FGpJ8nw>
X-ME-Received: <xmr:zBnKYbkAb6YfZiaMCzYdW2qc0sVwjGWw7AkdFecgXD5qDssa-YVZJI9uPDWvFU9Qrn_fDvgbDaB-52zeO-KFEbsdLmFjC9TlvgZskujDHE5NszypXA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddujedguddujecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffujghffgffkfggtgesthdttddttdertdenucfhrhhomhepufgvrghn
 ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe
 enucggtffrrghtthgvrhhnpeelgeeggfdvieejvdfhudfggeetgfekkeeuieeljeejhedu
 geegfeetgefhueffkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih
 hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg
X-ME-Proxy: <xmx:zBnKYezwWPVUL4-dUuy_HMhmIMQL2Rwev-0WwsepnWKyiyfT8PPkRw>
 <xmx:zBnKYdRgJl35MGSSlylTvQSyvn9z1fe1SnKZ4aXJbKkcktp03mDvAg>
 <xmx:zBnKYZZOrMCVw2iiY852ayNnR3vk5uh2EaYdiC8AhUakHpqPRVuk1Q>
 <xmx:zBnKYcKtjF8cSeWIXmqE-94W68jv5YZ5RfkyyQTCeF9NAwvZ0bnbOQ>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 27 Dec 2021 14:53:48 -0500 (EST)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 0FC8B7F7FA7; Mon, 27 Dec 2021 12:53:47 -0700 (MST)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <83bl11n8mr.fsf@HIDDEN>
References: <87r19xaoqe.fsf@HIDDEN> <878s812c6a.fsf@HIDDEN>
 <87eehsz170.fsf@HIDDEN> <874kin1z2x.fsf@HIDDEN>
 <87ft26etuh.fsf@HIDDEN> <87tuex1yzo.fsf@HIDDEN>
 <87czlkbxnh.fsf@HIDDEN> <87ee601ey0.fsf@HIDDEN>
 <871r1yaz36.fsf@HIDDEN> <87y245zzjq.fsf@HIDDEN>
 <83fsqdnc0o.fsf@HIDDEN> <87o851zwdq.fsf@HIDDEN>
 <83bl11n8mr.fsf@HIDDEN>
User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50
 (x86_64-pc-linux-gnu)
Date: Mon, 27 Dec 2021 12:53:47 -0700
Message-ID: <87lf05zuwk.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello,

On Mon 27 Dec 2021 at 09:35PM +02, Eli Zaretskii wrote:

> The *| thingy could be available as well, for when you need a mix.  My
> proposal was only for the situation when it's hard or inconvenient to
> change too many pipes manually.

Ah right, I see -- yes, nice idea.

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Sean Whitton <spwhitton@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 27 Dec 2021 19:55:01 +0000
Resent-Message-ID: <handler.46351.B46351.164063488726845 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Michael Albinus <michael.albinus@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.164063488726845
          (code B ref 46351); Mon, 27 Dec 2021 19:55:01 +0000
Received: (at 46351) by debbugs.gnu.org; 27 Dec 2021 19:54:47 +0000
Received: from localhost ([127.0.0.1]:44345 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1w51-0006yv-Kf
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:54:47 -0500
Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:48281)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spwhitton@HIDDEN>) id 1n1w50-0006yi-Pu
 for 46351 <at> debbugs.gnu.org; Mon, 27 Dec 2021 14:54:47 -0500
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.west.internal (Postfix) with ESMTP id F1F633200E91;
 Mon, 27 Dec 2021 14:54:40 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Mon, 27 Dec 2021 14:54:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name;
 h=from:to:cc:subject:in-reply-to:references:date:message-id
 :mime-version:content-type; s=fm2; bh=XM+Bip4JWyD98CM6SU1XZ87xdV
 Wkv1eGdX4vTGjKyzM=; b=zXUpnKSt5geQAkBWp8N5iSLWr0WPf+62LISjomWIwa
 f1ta2ELhmXcezn65oXfRN7btQlUwp0b4aMVNf5QKTKuEpgu2UEQL8Vw9qURPEfPy
 bUVrYiwwV1YwyIvB+woD99thHV/0viCeRSeTDm2/0YNyGhgb/ISF/C0LDrbq2CrX
 NMTxb6L5TRgDPZnZXwh9nCljU6njAWPU6N5gvGeH+BJ3/Qaw8s374cLAmQ1HZFbN
 g1MRNJxghHmh7CklYGeGcCuLIaapfkUWrTVqFuh5DoE1ZN6tZC9+J21+USymB1uX
 JIU5pCCgVsFGdJ8S6g/+V9pnyfxlCmzATq10YoWORIdg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=XM+Bip
 4JWyD98CM6SU1XZ87xdVWkv1eGdX4vTGjKyzM=; b=XQ0DKxhyQbNzLhvwyC4kCk
 ksXirFQ15qK8ZqdQ54DBzMrtNWEhfiQfrz0qnfxaJ3ghbvP3Qmaa87QWpa7/LSqM
 DWTfY/HIe5KQ4GLL/rU19u1wb9AIq7BEUP1s1Qg7Y5rt+XzSFC5dgPKf9HZ8ftnw
 8/RARobOd7Rfy6F9wSlvosvgQ98ry3cuPT++Zh0BoTPvHdKUKS1W1AgMgLY8YAwA
 tjgCOhTY2B451COctcYbnYfk9EUXsO37XQsl7ZaSHuGjtK2VxfSzCG/yRIQ/HDki
 0G0VVxp5gVjQNVxYOswiUzq73HZFDO5siGeoi+nHHLt03dDwkuzHt/9ePW+6Ateg
 ==
X-ME-Sender: <xms:ABrKYXR6vkteJrIQUHt82Zxzl7m3ZaXUNOr4vsFGWCWIekEvMtwDSA>
 <xme:ABrKYYx3BCVmiz_osMnrpGhchwEX5LuZhPcUIyjQt78UuSeYZh_SojvvPT_CbiDa0
 B3y3YxGkeKObwoseQ>
X-ME-Received: <xmr:ABrKYc0Gv1qdv_Eip9vRhqddcppb-_b8WS2OngVkVTs4ePHimDHER5GnojUO1uCjWf7pJuLLW8GoTBfsAvyQ34T-0amKMB2XNKE7Ng0OqFtW0aVTwg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddujedguddujecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffujghffgffkfggtgesthdttddttdertdenucfhrhhomhepufgvrghn
 ucghhhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqe
 enucggtffrrghtthgvrhhnpeelgeeggfdvieejvdfhudfggeetgfekkeeuieeljeejhedu
 geegfeetgefhueffkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih
 hlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg
X-ME-Proxy: <xmx:ABrKYXB_UZOPfRvFau9dztsPdZWq0DGXNobEnuAL3WGMEPbBzcX0Sw>
 <xmx:ABrKYQintcnDMdZz4dvdA7HwlxpbcEC_MqiHJRjvo0ZbL0BJOpOIjA>
 <xmx:ABrKYbrqr4KgXfMovRUb2omkQ2XJBaOITFSlNTxvXA8Dez1Fcsrhiw>
 <xmx:ABrKYcYIL7Ki2bayJMFRTIX9VdBVzfPXmAAUWjUw1TlpdqqqculeeA>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 27 Dec 2021 14:54:40 -0500 (EST)
Received: by melete.silentflame.com (Postfix, from userid 1000)
 id 34FCF7F7FA7; Mon, 27 Dec 2021 12:54:39 -0700 (MST)
From: Sean Whitton <spwhitton@HIDDEN>
In-Reply-To: <87lf05algc.fsf@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
 <87ee601ey0.fsf@HIDDEN> <871r1yaz36.fsf@HIDDEN>
 <87y245zzjq.fsf@HIDDEN> <83fsqdnc0o.fsf@HIDDEN>
 <87r19xaoqe.fsf@HIDDEN> <87o851zwdq.fsf@HIDDEN>
 <87lf05algc.fsf@HIDDEN>
User-Agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50
 (x86_64-pc-linux-gnu)
Date: Mon, 27 Dec 2021 12:54:39 -0700
Message-ID: <87ilv9zuv4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello Michael,

On Mon 27 Dec 2021 at 08:37PM +01, Michael Albinus wrote:

> If you want this complexity (external and internal pipelins and
> stdin/stout redirection) in one command line, you must mark every single
> such operator with an asterisk, which might be inconvenient. But you
> have the eshell history, which gives you the command line including the
> external asterisks, which let you edit the command prior reexecution.
>
> Personally, I could live with both approaches. Your proposal with a
> leading "||" is similar to my "one rules them all", because it changes
> the meaning of all pipelines etc in a command line to be external.

Right.  I was thinking that the piecemeal approach was one of the
advantages of your idea.

I'll see if I can implement this more complex thing and get back to you.

-- 
Sean Whitton




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#46351: 28.0.50; Add convenient way to bypass Eshell's own pipelining
Resent-From: Michael Albinus <michael.albinus@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 28 Dec 2021 08:59:02 +0000
Resent-Message-ID: <handler.46351.B46351.16406819327236 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 46351
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Sean Whitton <spwhitton@HIDDEN>
Cc: 46351 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 46351-submit <at> debbugs.gnu.org id=B46351.16406819327236
          (code B ref 46351); Tue, 28 Dec 2021 08:59:02 +0000
Received: (at 46351) by debbugs.gnu.org; 28 Dec 2021 08:58:52 +0000
Received: from localhost ([127.0.0.1]:45025 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n28Jo-0001sd-B8
	for submit <at> debbugs.gnu.org; Tue, 28 Dec 2021 03:58:52 -0500
Received: from mout.gmx.net ([212.227.17.20]:45129)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1n28Jl-0001sN-Ha
 for 46351 <at> debbugs.gnu.org; Tue, 28 Dec 2021 03:58:51 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1640681920;
 bh=fNP4mqnNYom7RU47GN2ZQbT6TurPTYTRJsAbs20emng=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=j5E9Btg+JaWHwBbryyMGL7y422NteZepiBAL+YnlKT541CiLIaCC3R8aj7m9V21Uz
 +SAFsvr2QZELFMrPQNCqKA/qnz1izpEpYyGwebyyIKiM+ZGGlpDtb1F6kfUhGvJAKd
 c1atEnZeEstJa/NPzVX8mjTIbrLd0xo/Ay3H4yok=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from gandalf.gmx.de ([79.140.124.170]) by mail.gmx.net (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MatRT-1mQKea3rml-00cQ1v; Tue, 28
 Dec 2021 09:58:40 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
References: <878s812c6a.fsf@HIDDEN> <87eehsz170.fsf@HIDDEN>
 <874kin1z2x.fsf@HIDDEN> <87ft26etuh.fsf@HIDDEN>
 <87tuex1yzo.fsf@HIDDEN> <87czlkbxnh.fsf@HIDDEN>
 <87ee601ey0.fsf@HIDDEN> <871r1yaz36.fsf@HIDDEN>
 <87y245zzjq.fsf@HIDDEN> <83fsqdnc0o.fsf@HIDDEN>
 <87r19xaoqe.fsf@HIDDEN> <87o851zwdq.fsf@HIDDEN>
 <87lf05algc.fsf@HIDDEN> <87ilv9zuv4.fsf@HIDDEN>
Date: Tue, 28 Dec 2021 09:58:38 +0100
In-Reply-To: <87ilv9zuv4.fsf@HIDDEN> (Sean Whitton's message
 of "Mon, 27 Dec 2021 12:54:39 -0700")
Message-ID: <87fsqd9kch.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:tf5oTqUtAKQGUV6U85CXc525usutLb9KNseYldtSUw1CSYpJWm2
 eRk1txEzuJCKSBlZVFrcg7NMgRONsh3Aq97xJb7cqnB8k+GWTtvXWuSnzXmpy8vCt46Y3kw
 wdYaU0HUD3gSG1Acn/reiWIsVF+4XojFn6agP/F8a57KAi81cUxQSKGgK7Lfs9PF1IuNJUp
 TrpaLgd0JFpRrTsVfeyxg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:4X1R8rNc+fE=:4uJA41EiNzm9CJJsaZ4msz
 T93sioVqNRYSVT9C5USP3uifE4AUfTpzlgyL+Sj+wlulfdnVsgymoxciZOGCX7nbUMBXVPJ1p
 fzKsrF6g3/vIpZOM+lSxNCbKThui9V5WokeiTLjBMRNqN6NpHSbZlTRO9o5JQUr4g7iddvYq9
 pYgcG7qf4fqtRjPmSVGl7WLZwgWQW10Y0BYJH/PFWo6Np3cWcRDhwww2LDcKPPCOG8hZ+p0O4
 tNn5AJltCAKe9nkoGWnSB7gxRB1XfAd7XaVdFbKvml9QzFD74oxNv86Vr1Gscj7hpVrsJnm+U
 MIPsiEkItlLrMSE03YnvuMIElwI88bsdu8LVfkwEK/k5d7Chbwafgj+ANLokGROYcYnQ14MCN
 f6zvDUed7/jX38Md8se1MbdpytLjeCj57CGMpnHaVORjh2uhZVbqrK/rsm0mez+N7cCAz9S0G
 E35dYFeV1zmZZZpiegnHI+zLIC4FNVciieki86A97gHVenCdnvMLX+VeCa4IogHQVcZkGkBPj
 +GNlx7SXUOHsqPWoXnk+N4CC2FwIcEiww5cTh5z4gc3zzIHT6f0PyoQm2JLRVvdWpSTXbYEmI
 oHWhEASE0puftZm0+zD4cTjNjnokVMYU3XFqXMHopaUE2v3S7e9fYgxGPwsjmhOD/VvxheIHH
 6jZV3EVqzDFueKc1IfEiunV0XMGz4D7P0LwqWaozB4UebeJaXSzbkLpQ0JkmzofjdvcvOKxdi
 ayqop/C+7GuEknHiNXQQr2IBx1cQdqgVYv6QEy+CefynS8yTS1FpAwk4QkENc1qJLCNhD+vsy
 DYtsF7RIYq22lEdQePFlEQ40pUjegVeLP9w7hQ4KpZKtbZmQ5GmoSj9YPZxuceLJ7NhmAmXXn
 zVR6ybvDDkcTF2FAyVCzr9c3KlfNauXV659C45FmbUjkB2jnoGeWHsy8jPP95aup5x0zqxADq
 7rHrlYMjOjNM9FN1/u843DR68QyMESq/9QR8vkKRrmWCGr/u+Ocfd8KlyYllJ0IUtwal5dUpN
 U+SRzO0vjn/KbdWCKsaKeVKlh99xeDqMkcvTDzP5dHZvWM5PyGTcEJVeQQnfkg2yr0ZnoRbKw
 oo2t6Y2vl7thoU=
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sean Whitton <spwhitton@HIDDEN> writes:

> Hello Michael,

Hi Sean,

>> If you want this complexity (external and internal pipelins and
>> stdin/stout redirection) in one command line, you must mark every single
>> such operator with an asterisk, which might be inconvenient. But you
>> have the eshell history, which gives you the command line including the
>> external asterisks, which let you edit the command prior reexecution.
>>
>> Personally, I could live with both approaches. Your proposal with a
>> leading "||" is similar to my "one rules them all", because it changes
>> the meaning of all pipelines etc in a command line to be external.
>
> Right.  I was thinking that the piecemeal approach was one of the
> advantages of your idea.

Yes, it would be. But it is more complex then. If you have an external
pipe *|, a built-in command on the LHS of the pipe must be external as
well. cat behaves already like this in pipelines, perhaps we shall
request this for all built-in commands.

> I'll see if I can implement this more complex thing and get back to you.

Yes, please do.

Best regards, Michael.





Last modified: Tue, 28 Dec 2021 09:00:02 UTC

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