all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sean Whitton <spwhitton@spwhitton.name>
To: Jim Porter <jporterbugs@gmail.com>, emacs-devel@gnu.org
Subject: Re: Eshell's external pipe module interferes with other argument parsing hooks
Date: Sat, 16 Apr 2022 14:04:34 -0700	[thread overview]
Message-ID: <877d7okae5.fsf@melete.silentflame.com> (raw)
In-Reply-To: <0ac470ac-87e2-f3e9-7e23-28a6622ef082@gmail.com>

Hello,

On Thu 31 Mar 2022 at 04:11PM -07, Jim Porter wrote:

> In practice, yes. However, the implementation could allow the other
> parsers to run, but then discard their parsed results during the rewrite
> phase if applicable. This is probably subject to a different set of
> unusual corner cases, but would allow other parsers to consume the parts
> of the command that they care about so that extpipe can just look for
> `*|' and friends. (A `*|' sequence inside quotes or something similar
> would already have been consumed by the time extpipe sees it.)

Okay, I think I see what you mean.  Worth keeping in mind.

> For the purposes of parsing, having the token that activates the extpipe
> module be at the beginning of the relevant portion would make things a
> lot easier. Then `eshell-parse-external-pipeline' can just check if
> that's the next token and if so, read until the end of the extpipe
> portion. That would eliminate all the complexity of trying to identify
> unquoted/literal `*|' operators.
>
> In practice though, I'm happy with any syntax so long as the
> implementation is robust. If the current implementation using `*|'
> operators is significantly nicer to use (I don't have an opinion either
> way since I haven't used it enough), then we should stick with it, even
> if it makes it harder to implement.

I think it's pretty nice to use, indeed.  But one thing that isn't so
easy that I would additionally like to have is just converting a single
command, with no pipes or redirection, to use the external shell.  You
can do something like append "*| cat" to your command but that's not
nice.  One possibility discussed previously was to support putting || at
the very beginning of the command to request that the whole thing be
sent to the external shell.  I'm still thinking I might add that.

-- 
Sean Whitton



  reply	other threads:[~2022-04-16 21:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28  2:21 bug#54603: 29.0.50; [PATCH] Eshell's external pipe module interferes with other argument parsing hooks Jim Porter
2022-03-31 11:46 ` Lars Ingebrigtsen
2022-03-31 16:26   ` Jim Porter
2022-03-31 16:50     ` Eli Zaretskii
2022-03-31 17:35     ` Michael Albinus
2022-03-31 22:55   ` Sean Whitton
2022-03-31 18:26 ` Sean Whitton
2022-03-31 20:58   ` Jim Porter
2022-03-31 21:55     ` Sean Whitton
2022-03-31 22:19       ` Jim Porter
2022-03-31 22:48         ` Sean Whitton
2022-03-31 23:31           ` Jim Porter
2022-04-01 21:16             ` Sean Whitton
2022-04-02  1:31               ` Jim Porter
2022-04-02 14:09                 ` Lars Ingebrigtsen
2022-04-02 15:52                   ` Sean Whitton
2022-03-31 21:56     ` Sean Whitton
2022-03-31 23:11       ` Jim Porter
2022-04-16 21:04         ` Sean Whitton [this message]
2022-05-23  4:34         ` Jim Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877d7okae5.fsf@melete.silentflame.com \
    --to=spwhitton@spwhitton.name \
    --cc=emacs-devel@gnu.org \
    --cc=jporterbugs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.