zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Bart Schaefer <schaefer@brasslantern.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: The curious incident of the feep in the night-time
Date: Wed, 28 Apr 2021 11:15:20 -0700	[thread overview]
Message-ID: <CAH+w=7bdTmKabguJ7Hjndc4TX7PjS+WicxspGS1pXwr-DQ_mkQ@mail.gmail.com> (raw)
In-Reply-To: <20210428072605.rznyqipd2kuv2vig@chazelas.org>

On Wed, Apr 28, 2021 at 12:26 AM Stephane Chazelas
<stephane@chazelas.org> wrote:
>
> That reminds me of
> https://www.zsh.org/mla/workers/2020/msg00229.html
> (X-seq: zsh-workers 45404)

Following that back to
https://www.zsh.org/mla/workers/2015/msg00843.html
(workers/34919)
> ... using a different [errflag] bit ... we could abort back to
> the top of ZLE rather than out of ZLE and back in again

That idea is actually impossible because of the aforementioned
handshake with the parser.  Unwinding the recursive-descent parse
requires leaving and re-entering ZLE.

> which would
> mean you finally had the ability to embed push-line in other widgets

(This means "push-input", push-line actually already can be embedded
because it doesn't reset the prebuffer.)

I think the best we can do without completely restructuring the
interactive shell input** is to avoid treating push-input /
push-line-or-edit as an error condition, which might make it possible
to fix the "vared kills the shell" problem from workers/45404.

** Roughly, we'd have to invert the entry chain so that ZLE drives the
parser instead of the other way around, and change accept-line so that
it doesn't leave ZLE at all until the parser says it has a complete
expression, with attendant changes to managing PREBUFFER and BUFFER
and the printing (or not) of PS2, etc.  That in turn means that
interactive input is handled a lot differently from script input,
whereas right now those differences are all restricted to the I/O
layer.


  reply	other threads:[~2021-04-28 18:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 21:35 Bart Schaefer
2021-04-28  7:26 ` Stephane Chazelas
2021-04-28 18:15   ` Bart Schaefer [this message]
2021-04-29  1:04 ` Bart Schaefer
2021-04-29 18:27   ` Bart Schaefer
2021-05-02 22:20     ` Bart Schaefer

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='CAH+w=7bdTmKabguJ7Hjndc4TX7PjS+WicxspGS1pXwr-DQ_mkQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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 public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).