all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: Debug lisp code
Date: Tue, 30 Aug 2005 08:44:08 +0200	[thread overview]
Message-ID: <85ll2j9b5z.fsf@lola.goethe.zz> (raw)
In-Reply-To: mailman.5426.1125363742.20277.help-gnu-emacs@gnu.org

Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> writes:

> David Kastrup <dak@gnu.org> writes:
>
>> Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> 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

  parent reply	other threads:[~2005-08-30  6:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5387.1125339939.20277.help-gnu-emacs@gnu.org>
2005-08-29 18:35 ` Debug lisp code David Kastrup
2005-08-30  1:35   ` Michael Cadilhac
     [not found]   ` <mailman.5426.1125363742.20277.help-gnu-emacs@gnu.org>
2005-08-30  6:44     ` David Kastrup [this message]
2005-08-30 11:15       ` Michael Cadilhac
2005-08-29 19:18 Michael Cadilhac

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=85ll2j9b5z.fsf@lola.goethe.zz \
    --to=dak@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.