all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Debug lisp code
       [not found] <mailman.5387.1125339939.20277.help-gnu-emacs@gnu.org>
@ 2005-08-29 18:35 ` David Kastrup
  2005-08-30  1:35   ` Michael Cadilhac
       [not found]   ` <mailman.5426.1125363742.20277.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: David Kastrup @ 2005-08-29 18:35 UTC (permalink / raw)


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

>   Hi !
>
>   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))))

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Debug lisp code
@ 2005-08-29 19:18 Michael Cadilhac
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Cadilhac @ 2005-08-29 19:18 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 686 bytes --]


  Hi !

  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)))
  ?

  Thanks.

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |  Please note that you should
  2 rue de la Convention | 01.46.70.90.75 |  s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Debug lisp code
  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>
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Cadilhac @ 2005-08-30  1:35 UTC (permalink / raw)
  Cc: help-gnu-emacs

David Kastrup <dak@gnu.org> writes:

> Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> writes:
>
>>   Hi !
>>
>>   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 ?

  Thanks.

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |  Please note that you should
  2 rue de la Convention | 01.46.70.90.75 |  s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Debug lisp code
       [not found]   ` <mailman.5426.1125363742.20277.help-gnu-emacs@gnu.org>
@ 2005-08-30  6:44     ` David Kastrup
  2005-08-30 11:15       ` Michael Cadilhac
  0 siblings, 1 reply; 5+ messages in thread
From: David Kastrup @ 2005-08-30  6:44 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Debug lisp code
  2005-08-30  6:44     ` David Kastrup
@ 2005-08-30 11:15       ` Michael Cadilhac
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Cadilhac @ 2005-08-30 11:15 UTC (permalink / raw)
  Cc: help-gnu-emacs

David Kastrup <dak@gnu.org> writes:

> Did you actually read what I wrote above?  Bind inhibit-quit to nil in
> the function, and it will be interruptible.

  Thanks  for your explanation  and for  the hint,  and sorry  for the
  misunderstanding :-)

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |  Please note that you should
  2 rue de la Convention | 01.46.70.90.75 |  s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-08-30 11:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2005-08-30 11:15       ` Michael Cadilhac
2005-08-29 19:18 Michael Cadilhac

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.