unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: a bug of read-passwd
Date: Mon, 24 Jul 2006 00:54:19 -0400	[thread overview]
Message-ID: <87vepn61s4.fsf@stupidchicken.com> (raw)
In-Reply-To: <E1G49Gc-0005Et-4Q@fencepost.gnu.org> (Richard Stallman's message of "Sat, 22 Jul 2006 00:39:06 -0400")

Richard Stallman <rms@gnu.org> writes:

> One solution is to set up a mechanism for the sit-for timer
> to determine that it has been called inside a filter.
> Then it needs to be able to set up for a certain function to be
> called when the filter returns.
>
> Another solution would be, don't use a timer.
> read-event works by calling wait_reading_process_output.
> It should be feasible to give it a new argument
> which specifies a maximum time delay.

OK, I looked into this.  I think that fixing read-event to give it a
new argument specifying a max delay turns out to be not simple to
implement.

(The detailed situation is this: the old sit-for called
wait_reading_process_output for a given duration, but that's
problematic since wait_reading_process_output can return due to fake
events.  The new sit-for solves this by calling read-event, which
relies on read_char, which loops calling wait_reading_process_output
with zero duration and discarding fake events [using
kbd_buffer_get_event, which does some complicated processing to figure
out if the event is fake or not].  The new sit-for interrupts this
loop using a timer.  If we want to hack read_char to accept a new arg
specifying the max delay, there would be two sets of timing code:
inside read_char, and inside wait_reading_process_output.  This is
very inelegant.)

Another possibility is to implement a `inhibit-timers' variable and
set it to t by default inside filter functions (similar to how
`inhibit-quit' is bound to t in filter functions.)  This is probably
easier to implement.  What do you think?

  parent reply	other threads:[~2006-07-24  4:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-15 17:16 [kazu@iij.ad.jp: a bug of read-passwd] Richard Stallman
2006-07-16  3:54 ` Chong Yidong
2006-07-19  0:49   ` Kazu Yamamoto
2006-07-21  0:57     ` a bug of read-passwd Kazu Yamamoto
2006-07-21 19:08       ` Chong Yidong
2006-07-21 19:33         ` Chong Yidong
2006-07-24  2:24           ` Kazu Yamamoto
2006-07-22  4:39         ` Richard Stallman
2006-07-24  4:18           ` Chong Yidong
2006-07-24  4:54           ` Chong Yidong [this message]
2006-07-24 13:22             ` Stefan Monnier
2006-07-24 14:17               ` Chong Yidong
2006-07-24 14:38                 ` Stefan Monnier
2006-07-25  3:09             ` Richard Stallman
2006-07-26 18:33               ` Chong Yidong
2006-07-27  0:25                 ` Richard Stallman
2006-07-27  0:34                   ` Yidong Chong
2006-07-28  3:39                   ` Kazu Yamamoto
  -- strict thread matches above, loose matches on Subject: below --
2006-07-15  4:49 Kazu Yamamoto

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vepn61s4.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.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.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).