From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2854 invoked by alias); 5 Oct 2016 05:39:18 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39562 Received: (qmail 10721 invoked from network); 5 Oct 2016 05:39:18 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f170.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.170):SA:0(0.0/5.0):. Processed in 0.324794 secs); 05 Oct 2016 05:39:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.170 as permitted sender) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CyAhHgZGG8VjAG2Fq9k+73T48v/lMUmM7O04w3O4A9M=; b=Y0sKj6pfk7FJjiCEgORxZmyEvwIVZ2y2AuvrvUiycZj3fWZZA8qnJWK85dP79i4Wcn u4slzWU7FWX8pZCgX0S3rNUI6fRN0z6QbYVuIR49lD0AcDPbqEIiTnk+bGUM0HXG+9n4 uZBPuFi0+feSmWGyBk1d9RAF2ViiFUZx1GN2Gm3PV3j4GaFKy/lxlAGMy+yN+kQEiHul gUkYyHVbYQdSZ8T99YPk1b14QMfCGujhilcsurWdWrxXYzx1aHY2NT7SjbMT4oEpcqzE DksJNg25QfctfFAnIYtg4MKNBi4prXUyiNzUUlhqb2si7MbJY7DkGNobjAri+aKAlDv7 ycuQ== X-Gm-Message-State: AA6/9RkRTDng/vk1LbW1kQiQAM07Bx25OAA1pAKtLBZ9aLCoZDQUfoBKtwA1OqHyJjDsZNMPtJF5bK8/9ym48A== X-Received: by 10.200.51.144 with SMTP id c16mr7602071qtb.74.1475645537597; Tue, 04 Oct 2016 22:32:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <160930134446.ZM17118@torch.brasslantern.com> References: <160924133140.ZM29034@torch.brasslantern.com> <160930134446.ZM17118@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Wed, 5 Oct 2016 07:31:57 +0200 Message-ID: Subject: Re: Where to start debugging zle recursive-edit? / Ctrl-C To: Bart Schaefer Cc: Zsh hackers list Content-Type: text/plain; charset=UTF-8 On 30 September 2016 at 22:44, Bart Schaefer 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