From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1247 invoked by alias); 5 Oct 2016 06:14:36 -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: 39565 Received: (qmail 19528 invoked from network); 5 Oct 2016 06:14:36 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-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.192.170):SA:0(0.0/5.0):. Processed in 0.631355 secs); 05 Oct 2016 06:14:36 -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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=UG6dB+HWE/nsWMu+i71bD09uUHSFuJA2HtTgBB50dc4=; b=QUU/yDY07WTXd+rAiRxle00PPh1ybApZ2Nlque5MZzop+3C5eISpxucDMMGvTILVzl fCk9CYJywhyOcFWPqfppuIl4SDA0dJ1gkahByjzJI98Z4ObUxXfVh3Z0vql7BiajbAby YiayJjyvevB1pjMij1TQvzS1xcqO846oeyROSpzMZ1LRg4qtRjl6tvkMAhnv+qz75aSU rE9yFzfpUgJmiHAqyZ8Z2p98IDNILBGtX8Q71uKcBUWrFy+l91KZv+Pi8rR9Alg4BxN5 +jmhnVjA9KerZqLyQ2AdEzuWsqaPkBYNzrUHUVFJM5lM9oTjm9Uf3HwBPKon9l5nm8CT 4/Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=UG6dB+HWE/nsWMu+i71bD09uUHSFuJA2HtTgBB50dc4=; b=M+yQ33F+orQdK/VdFgIOIcT8xxLCUu4ole5TZ3Zy/eZgEd4F0uy8/uEEPdB/KwnYBL DkJZGC5DN1I4AXsvsPIEvvYWFU6NbGm24DhrE3scjy/iF1EBta8i1dfHstkm3RGkoCPL a2d5xRQHQFKm7Sdhl56T+EasY4zj1LwsO5npbSrsxHc8xhmBcJ3iq74/uzQUG+oH85L0 VDqVI+8ixeOptFRDpiwZlhUue2O46xFYSDIlZC0CnJftlKkxfY+3yNlckrQmuePITujQ lNeNQHPnDS6VKSRjCw0zbOD7WVukGQ9/I9Qzek23jIIN9+8hdFEeN4yOTB7BKU+9kcMa 8QbQ== X-Gm-Message-State: AA6/9RldCiMJ06uHTrjjrtuxrBt08jFk+yRgp/UidN3fR3UYmhn//D/W63jldNNnJQKWaQ== X-Received: by 10.98.26.196 with SMTP id a187mr12765280pfa.167.1475648068549; Tue, 04 Oct 2016 23:14:28 -0700 (PDT) From: Bart Schaefer Message-Id: <161004231456.ZM10640@torch.brasslantern.com> Date: Tue, 4 Oct 2016 23:14:56 -0700 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: Where to start debugging zle recursive-edit? / Ctrl-C" (Oct 5, 7:31am) References: <160924133140.ZM29034@torch.brasslantern.com> <160930134446.ZM17118@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: Where to start debugging zle recursive-edit? / Ctrl-C MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 5, 7:31am, Sebastian Gniazdowski wrote: } Subject: Re: Where to start debugging zle recursive-edit? / Ctrl-C } } 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. For your purposes, the trouble with periodic is that it only executes right before a prompt. Unless there's more to what you're saying than I'm understanding. } However periodic hook rather suffers too from no-timeout select()? I wouldn't expect so, no. It's not related to the select at all. } Wrapper around recursive-edit would solve Ctrl-C problems, or you } meant something about rescheduling? I meant something about scheduling. } > Either way you'd want to examine $zle_scheduled_events } } Tried accessing the variable from zle widget and no luck My typo, it's $zsh_scheduled_events. It's in the documentation for the sched module. } 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? Either open a named pipe file (mknod p filename), or use the zsh/tcp module as in the example that appears in the documentation. Another thing I've done quite successfully for a very long time is to assign to the TMOUT variable and use TRAPALRM() to take some action (such as update the time in my prompt). This is close to the same behavior as sched but uses the alarm() system function so doesn't rely on zle read timeouts.