zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Where to start debugging zle recursive-edit? / Ctrl-C
Date: Tue, 4 Oct 2016 23:14:56 -0700	[thread overview]
Message-ID: <161004231456.ZM10640@torch.brasslantern.com> (raw)
In-Reply-To: <CAKc7PVCQ2iLFS5J9BpVVk05AxJDG2Qbnp9cwt8-iO_zAVy9Xvw@mail.gmail.com>

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 <schaefer@brasslantern.com> 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.


  reply	other threads:[~2016-10-05  6:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23 16:26 Sebastian Gniazdowski
2016-09-24 20:31 ` Bart Schaefer
2016-09-24 20:58   ` Sebastian Gniazdowski
2016-09-25  7:09     ` Daniel Shahaf
2016-09-26 22:16   ` Sebastian Gniazdowski
2016-09-27 16:09     ` Bart Schaefer
2016-09-29  9:30       ` Sebastian Gniazdowski
2016-09-29 17:07         ` Bart Schaefer
2016-09-30  9:04   ` Sebastian Gniazdowski
2016-09-30 11:28   ` Sebastian Gniazdowski
2016-09-30 13:30     ` Sebastian Gniazdowski
2016-09-30 20:44       ` Bart Schaefer
2016-10-02 16:26         ` Sebastian Gniazdowski
2016-10-02 17:37           ` Sebastian Gniazdowski
2016-10-05  5:31         ` Sebastian Gniazdowski
2016-10-05  6:14           ` Bart Schaefer [this message]
2016-10-05 10:27             ` Sebastian Gniazdowski
2016-10-05 18:31               ` Bart Schaefer
2016-10-05 20:36                 ` Sebastian Gniazdowski
2016-09-30 21:45     ` Bart Schaefer
2016-09-30 21:54       ` Sebastian Gniazdowski

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=161004231456.ZM10640@torch.brasslantern.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).