Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Where to start debugging zle recursive-edit? / Ctrl-C
- X-seq: zsh-workers 39562
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Where to start debugging zle recursive-edit? / Ctrl-C
- Date: Wed, 5 Oct 2016 07:31:57 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CyAhHgZGG8VjAG2Fq9k+73T48v/lMUmM7O04w3O4A9M=; b=xUqyO0G/ANJdXTjtkQaUUuKnC+txjB3Edypw2g3MLPUzs3izMIDw/jwyghaNAch17p IbymURKZK3qz+q19ZPMJ8OPuvfl937OMI0R4Qwvd6Pztl8WQ9XzO2fLhEnBCSjbZYCSB Y5u1jux+E5XRspFMPjnVziFMR+7lJcY4fMWRUyP/EtPId1XDcjNaSvlE+BjcmoWaBdEo WnA3d30C4jxsx7/4C7VWASDhKBVw63JABd1XvJVW/Xnxv3N+2Rjnr8JRD7YxR1m95crw HVmmD0ieKRL2gjc+D9ZwwYoPzUWOYThzO3xcdT1XvLtsZRD2m2ldp4yhKZSDhlzOsqOF ciGg==
- In-reply-to: <160930134446.ZM17118@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBvm+u5QQQZo+6QEQw4bRHx1br5K-A6y_6pAuP8+KCbcQ@mail.gmail.com> <160924133140.ZM29034@torch.brasslantern.com> <CAKc7PVCvear=ZCOYB+ODYcw+qV8YGbcsLH_arXCFdNMRgJ4O2Q@mail.gmail.com> <CAKc7PVCEbqF7KudsZDEadTM4988Ega3dFS7cEPCcYv=mNfntLg@mail.gmail.com> <160930134446.ZM17118@torch.brasslantern.com>
On 30 September 2016 at 22:44, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> You may need to find a more aggressive place to reset the timer, such
> as in the zle-line-pre-redraw hook, or else create a wrapper widget
> for recursive-edit.
Was going to do this with periodic hook. Now as 5.3 is fixed I could
say: "Share PERIOD with this plugin, set it to value 6...10, best is
10. And if you really want to own PERIOD, then use latest Zsh".
However periodic hook rather suffers too from no-timeout select()?
Wrapper around recursive-edit would solve Ctrl-C problems, or you
meant something about rescheduling?
> Either way you'd want to examine $zle_scheduled_events to see if the
> timer is still pending, before scheduling it again.
Tried accessing the variable from zle widget and no luck. I must be
doing something wrong as even ack '.*zle.*sched.*eve.*' doesn't return
results.
> Or possibly you could switch from doing this with a timer scheduled
> function to using a "zle -F" handler function.
Cool thing the zle -F, thanks for the tip. It would obviously install
where main symptom of problem occurs, at the select(). But how could I
periodically change state of the FD, without forking background
process for each instance of Zsh?
A half-ready solution is to schedule no-op function 24 hours ahead
(saw something about that maximum schedule time), this should make
calc_timeout() always return ZTM_FUNC. But this requires something
more, as the main scheduled function might still stop running because
of errflag. Maybe this should be done together with periodic hook.
select() would not block (ZTM_FUNC), and periodic hook is maybe immune
to errflag rescheduling-break?
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author