From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: Inhibit more keyboard event during execution of function Date: Tue, 29 Dec 2009 12:03:50 -0800 (PST) Organization: http://groups.google.com Message-ID: <8099faf2-367b-4e4e-b55e-d9c8710806c4@m25g2000yqc.googlegroups.com> References: <87skauojkb.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1262119329 24713 80.91.229.12 (29 Dec 2009 20:42:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Dec 2009 20:42:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 29 21:42:02 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NPitD-0006n3-AR for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Dec 2009 21:41:59 +0100 Original-Received: from localhost ([127.0.0.1]:39399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NPitD-0004DV-QB for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Dec 2009 15:41:59 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!m25g2000yqc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: 83.183.114.227 Original-X-Trace: posting.google.com 1262117030 14579 127.0.0.1 (29 Dec 2009 20:03:50 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 29 Dec 2009 20:03:50 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m25g2000yqc.googlegroups.com; posting-host=83.183.114.227; posting-account=JZUL_goAAACG6LHeukNrrFi20WGR0noj User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.43 Safari/532.5, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:175867 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70941 Archived-At: > I don't know if this will work, but you could try let-binding > unread-command-events to nil while the sound is being played. > The idea is that any input events would be added to the queue, > but when the sound is done the queued events would be discarded > and the command loop wouldn't see them. Thanks! It sounded like a good idea but it did not work. This is what I did: (defun esb-play (thing) "Play sound and display image for THING." (let ((unread-command-events nil)) (esb-display-image (concat esb-data-dir thing ".jpg")) (play-sound-file ... ... If I keep a key pressed or type it repeatedly it will still "record" (queue?) what is pressed during play. Any other ideas? /Mathias