From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: A Soare Newsgroups: gmane.emacs.devel Subject: kill-buffer during *debugging* Date: Thu, 15 Feb 2007 11:31:54 +0100 (CET) Message-ID: <14662106.236271171535514626.JavaMail.www@wwinf4103> Reply-To: alinsoar@voila.fr NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_19771_2043246.1171535514625" X-Trace: sea.gmane.org 1171535543 27069 80.91.229.12 (15 Feb 2007 10:32:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Feb 2007 10:32:23 +0000 (UTC) To: "Emacs Dev [emacs-devel]" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 15 11:32:14 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HHduO-0007sA-OW for ged-emacs-devel@m.gmane.org; Thu, 15 Feb 2007 11:32:13 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHduO-0004cX-9s for ged-emacs-devel@m.gmane.org; Thu, 15 Feb 2007 05:32:12 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HHduA-0004a4-AE for emacs-devel@gnu.org; Thu, 15 Feb 2007 05:31:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HHdu9-0004ZA-KT for emacs-devel@gnu.org; Thu, 15 Feb 2007 05:31:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HHdu9-0004Z1-8b for emacs-devel@gnu.org; Thu, 15 Feb 2007 05:31:57 -0500 Original-Received: from smtp2.voila.fr ([193.252.22.175] helo=smtp1.voila.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HHdu8-0004KR-Mq for emacs-devel@gnu.org; Thu, 15 Feb 2007 05:31:57 -0500 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf4107.voila.fr (SMTP Server) with ESMTP id A62A11C0050C for ; Thu, 15 Feb 2007 11:31:54 +0100 (CET) Original-Received: from wwinf4103 (wwinf4103 [172.22.152.30]) by mwinf4107.voila.fr (SMTP Server) with ESMTP id 9C1FD1C00563 for ; Thu, 15 Feb 2007 11:31:54 +0100 (CET) X-ME-UUID: 20070215103154639.9C1FD1C00563@mwinf4107.voila.fr X-Originating-IP: [89.34.170.37] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-REPLYTO: |~| X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:66415 Archived-At: ------=_Part_19771_2043246.1171535514625 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello. > If I kill the buffer where the lisp debugger was running, The *Debugging*= mode is still active on the line mode, even I press C-j. I reported a few days ago a bug on bug.emacs list (the upper line). I have = been asked by a few persons to report it again , using the format of a bug-= report from etc/ directory. Here it is: 1. instrument with edebug a lisp function. For example, this very simple au= tomaton: (defun build-automaton (s alphabet-length first-char &optional start-pos) "this preprocessing state builds an automaton" (let* ((number-of-states (1+ (length s))) (matrix (make-vector number-of-states nil)) (last-state 0)) (dotimes (i number-of-states) (aset matrix i (make-vector alphabet-length 0)) (dotimes (j alphabet-length) (aset (aref matrix i) j (if (and (/=3D i (1- number-of-states)) (equal (aref s i) (+ j first-char= ))) (1+ i) (aref (aref matrix last-state) j)))) (if (and (/=3D i (1- number-of-states)) (not (zerop i))) (set 'last-state (aref (aref matrix last-state) (- (aref s i) first-char))))= ) matrix)) 2. Call this function, for example like this: (build-automaton "emacs" 27 ?a) 3. WITHOUT STOPPING the debugger kill the buffer using C-x k. Here is the bug. The *debugging* mode is still active. More, if I want to d= ebug another instrumented function, impossible. We must run by hand M-: (to= p-level) to come back normally to command-loop. --------------------------------- I tried first this code in lisp/emacs-lisp/edebug.el: (define-key map "\C-xk" (lambda () (interactive) (unwind-protect (top-level) (kill-buffer (current-buffer))))) But this code does not work here. Can somebody explain me why, please? I do= not understant why: Debugger entered: nil edebug-display() edebug(error (error "Selecting deleted buffer")) signal(error ("Selecting deleted buffer")) edebug-signal(error ("Selecting deleted buffer")) ---------------------- Quand j'ai eu essay=C3=A9 cette possibilit=C3=A9 et vu que =C3=A7a ne roule= pas, il vallait le mieux que je demande sur help.emacs list. Il y a quelqu= 'un qui m'a repondu. Son code marche. Donc voici ci-dessous: 1. the output from cvs -d:pserver:anonymous@cvs.gnu.org:/sources/emacs diff= -c emacs/lisp/emacs-lisp/edebug.el. 2. a Change-log-file attached. ###########################################################################= ######################## Index: emacs/lisp/emacs-lisp/edebug.el =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/lisp/emacs-lisp/edebug.el,v retrieving revision 3.94 diff -c -r3.94 edebug.el *** emacs/lisp/emacs-lisp/edebug.el=0921 Jan 2007 02:44:24 -0000=093.94 --- emacs/lisp/emacs-lisp/edebug.el=0915 Feb 2007 10:23:13 -0000 *************** *** 3820,3825 **** --- 3820,3833 ---- (define-key map "Q" 'edebug-top-level-nonstop) (define-key map "a" 'abort-recursive-edit) (define-key map "S" 'edebug-stop) + (define-key map "\C-xk" (lambda () + (interactive) + (run-with-idle-timer 0 nil + (lambda() + (kill-buffer + (current-buffer)) + )) + (top-level))) =20 ;; breakpoints (define-key map "b" 'edebug-set-breakpoint) ###########################################################################= ############################# ------=_Part_19771_2043246.1171535514625 Content-Type: application/octet-stream; name="/changelog" content-transfer-encoding: base64 Content-Disposition: attachment; filename="/changelog" MjAwNy0wMi0xNSAgQWxpbiBDLiBTb2FyZSAgPGFsaW5zb2FyQHZvaWxhLmZyPiAgKHRpbnkgY2hh bmdlKQoKCSogbGlzcC9lbWFjcy1saXNwL2VkZWJ1Zy5lbCAoZWRlYnVnLW1vZGUtbWFwKTogQWRk ZWQgY29kZSBmb3IKCWtpbGwtYnVmZmVyIGtleWJpbmRpbmcgaW4gKmRlYnVnZ2luZyogbW9kZQo= ------=_Part_19771_2043246.1171535514625 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ------=_Part_19771_2043246.1171535514625--