From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9413 invoked by alias); 5 Oct 2016 12:12:37 -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: 39570 Received: (qmail 6253 invoked from network); 5 Oct 2016 12:12:37 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f182.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.220.182):SA:0(0.0/5.0):. Processed in 0.362103 secs); 05 Oct 2016 12:12:37 -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.220.182 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=gv5yYra70vjw56H4jhF+OHDVuAxkMhjSC2zJgGzU3+0=; b=ChJaAawk/NsF6zNuGs4zmJ83BXNNoDwEhWNO/RJDedD8OwnpUqnuG9jBbvtGjZItN3 MRzgGCFmAj+eGqIhnZ4DFcO7L70f8R8pKoiV99p05F4ppT8/vEA6s6nILKWXyXS2sck4 tW4IQiZOCDSN99hkyzq8kPSq2HjHgS7jcNb3+52a+pSBBHAZwzEvnP2v9n1DBiC2H4q9 7iFuoXRgU9hGRNGeDkRhV4N4/jMcfGefMVilXIDvAFO43MGZxV7AkBxqg4lKZL0Rt74d 6kxmE9pG9fFDsQUtxtT3rDcK76d8oYBvKIXICoru1bnIJi588QE/aUAiV+QG+jRC8J0G WOhQ== 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=gv5yYra70vjw56H4jhF+OHDVuAxkMhjSC2zJgGzU3+0=; b=g9ZjUho3sNlVzCHzDykxKPho48lzDre7RqExsUrP3gKaVjC46+SLl3X+eB40SyWRpa ia6RwUsKDaXVgeEUiQBjanjEnFpftPMtRJmAIqVXyGcxTo1LHIKGw8++tJZUFPiVDy0l v1nCn5SN6h1uB9wyr7qwWmspPHhJsi0CvJpN75vK1OctoZGjIr7M/2IeD0HKBVWFAB6g RxfWRJoE9sVBilw7M4gxlwX08HN74xxPOyj9UC2BaIbD6H8xGU3zK9h+w9Zsw8/tkH3u NIeweZEtoYXQz7T60HE+7EU5CIM+/PIlCLJuLKU3nx55D5iNIZpGKkwjvL4MFrnGsbUX Jk9A== X-Gm-Message-State: AA6/9Rlcvdv+zK9vR6Jgj6fbEcEFH2Vcg5VhH5rfctEY08q3/0zvnkaTKj9uJ9yC8nrmVPhWcSnjynAjDJ0i7Q== X-Received: by 10.55.39.145 with SMTP id n139mr8086737qkn.103.1475663296466; Wed, 05 Oct 2016 03:28:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <161004231456.ZM10640@torch.brasslantern.com> References: <160924133140.ZM29034@torch.brasslantern.com> <160930134446.ZM17118@torch.brasslantern.com> <161004231456.ZM10640@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Wed, 5 Oct 2016 12:27:56 +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 5 October 2016 at 08:14, Bart Schaefer wrote: > 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. Had some obstacles to use the precmd but really not recalling them now. > } Wrapper around recursive-edit would solve Ctrl-C problems, or you > } meant something about rescheduling? > > I meant something about scheduling. Hmm, could you reveal? I thought about trapping INT when detected that in .recursive-edit, but directly that's "Ctrl-C problems" stuff > } > 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. So no need to parse sched output at all, as I once wrote > Either open a named pipe file (mknod p filename), or use the zsh/tcp > module as in the example that appears in the documentation. That are rather heavy-implementation things > 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. Thanks for info that this trap doesn't cause problems, I would be definitely anxious about using it (expecting things like e.g. the pick-up of z-sy-h state, but that's maybe plain simple lack of opt localoptions), don't want to serve users heavy-implementation stuff, but if the trap is proven to be robust, then.. Best regards, Sebastian Gniazdowski