From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: Debug lisp code Date: Tue, 30 Aug 2005 08:44:08 +0200 Organization: Organization?!? Message-ID: <85ll2j9b5z.fsf@lola.goethe.zz> References: <85y86ka8w3.fsf@lola.goethe.zz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1125384560 21763 80.91.229.2 (30 Aug 2005 06:49:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 30 Aug 2005 06:49:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 30 08:49:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E9zuX-0007yw-J5 for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Aug 2005 08:47:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E9zye-0005x2-Ka for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Aug 2005 02:52:12 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:C1hVPnQDVQUODCblp/LIpPcgzNo= Original-Lines: 37 Original-NNTP-Posting-Date: 30 Aug 2005 08:44:10 MEST Original-NNTP-Posting-Host: f54bbe64.newsread4.arcor-online.net Original-X-Trace: DXC=S@G\2UFl^=_jYMQID6OnPX:ejgIfPPldTjW\KbG]kaMXea\9g\; 7NmU3>CCgGNBKjT1_LiI6ENVa]3>5MOK` 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:29081 Archived-At: Michael Cadilhac writes: > David Kastrup writes: > >> Michael Cadilhac writes: >> >>> I've some kind of a freeze in a function being a process filter. My >>> problem is that I can't figure out where the infinite loop is and >>> it's a random thing, so I can't use debug-on-entry. >>> >>> This function not being called by the user, C-g is not canceling it, >>> so set debug-on-quit to t is useless. >>> >>> So, is there a way to debug things like >>> (run-with-idle-timer 1 nil (lambda () (while t))) >>> ? >> >> (run-with-idle-timer 1 nil (lambda nil (let (inhibit-quit) >> (while t)))) > > Maybe I wasn't clear enough :-) > > Let's say I have a function runed with `run-with-idle-timer'. This > function has an infinite loop somewhere in it. > > Now, this function is called, asynchronously. The call being > asynchronous, I don't know how I can stop this function and have a > backtrace, in order to know where the infinite loop is. > > I mean... with (run-with-idle-timer 1 nil (lambda () (while t))), > how do you unblock emacs ? Did you actually read what I wrote above? Bind inhibit-quit to nil in the function, and it will be interruptible. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum