From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Newsgroups: gmane.emacs.help Subject: Re: Mode for files visited by GUD Date: Fri, 18 Jul 2008 01:54:59 +0200 Message-ID: <200807180154.59785.juanma_bellon@yahoo.es> References: <200807170135.53892.juanma_bellon@yahoo.es> <18558.36526.630474.990664@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216338950 23479 80.91.229.12 (17 Jul 2008 23:55:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jul 2008 23:55:50 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Nick Roberts Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 18 01:56:37 2008 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 1KJdKq-0000PQ-PA for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Jul 2008 01:56:33 +0200 Original-Received: from localhost ([127.0.0.1]:60411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJdJx-0006jl-Dz for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Jul 2008 19:55:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJdJg-0006jT-7n for help-gnu-emacs@gnu.org; Thu, 17 Jul 2008 19:55:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJdJa-0006gT-60 for help-gnu-emacs@gnu.org; Thu, 17 Jul 2008 19:55:19 -0400 Original-Received: from [199.232.76.173] (port=33056 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJdJZ-0006gO-Tp for help-gnu-emacs@gnu.org; Thu, 17 Jul 2008 19:55:14 -0400 Original-Received: from n17.bullet.mail.mud.yahoo.com ([68.142.206.144]:35898) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KJdJY-00053u-Hx for help-gnu-emacs@gnu.org; Thu, 17 Jul 2008 19:55:13 -0400 Original-Received: from [68.142.200.226] by n17.bullet.mail.mud.yahoo.com with NNFMP; 17 Jul 2008 23:55:05 -0000 Original-Received: from [68.142.201.243] by t7.bullet.mud.yahoo.com with NNFMP; 17 Jul 2008 23:55:05 -0000 Original-Received: from [127.0.0.1] by omp404.mail.mud.yahoo.com with NNFMP; 17 Jul 2008 23:55:05 -0000 X-Yahoo-Newman-Id: 795382.39677.bm@omp404.mail.mud.yahoo.com Original-Received: (qmail 9633 invoked from network); 17 Jul 2008 23:55:05 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.es; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Subject:Date:User-Agent:References:In-Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id; b=pX5QikQ6JVoM6BimG9bFmQLU8pNV70zL096/INGzJigq378SIvNc65X/CJKThBzjot0fY5VT/ceEjYiP40YrcbO+zRESiQ17WlFMMp/GkmdqucceQMl/0kBpDkKP8vC4EzyvbhaFR8kH/FHSlT+NG6qNd68lbAx1IF+a3lVaN50= ; Original-Received: from unknown (HELO 212251168194.customer.cdi.no) (juanma_bellon@212.251.168.194 with plain) by smtp117.plus.mail.mud.yahoo.com with SMTP; 17 Jul 2008 23:55:01 -0000 X-YMail-OSG: nh08AfoVM1lSot9J7mns0SmQNeXsJ3zeJmIUax7H1zCRd9eMn2zo_WK1rkBXJKQPC16ayw2beU8_uhPzJI9ntmQdHffj5n_9Yksa7wbKqf23Kl9TZvKXvbipEOrKfDAKLzw- X-Yahoo-Newman-Property: ymail-3 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) In-Reply-To: <18558.36526.630474.990664@kahikatea.snap.net.nz> Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) 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:55682 Archived-At: Hello, Nick. Thanks for your help. > = Nick Roberts > > = Juan Bellon > > Is there any mode (and it's hook) run when GUD visits a source code file > > during debugging? > > gdb-find-file-hook is run when GUD visits a source code file. You could > advise that function Great, it worked. This is sort of peculiar way to do it. I mean, hooks are normally variables, and one uses add-hook with them. But in this case it is a function, documented on a user level, while the variable was not. Maybe the variable was created by my mistake only, as I hooked my function on it? So, yes, I can advice that function, but, anything against using a hook variable instead? Another question: is there an "exit hook", for the time when debugging goes into a different file? I guess it doesn't make a lot of sense, but I'm curious. > or create your own hook using find-file-hook (see the Elisp manual). I'm also curious about this. What did you mean? Why should I create my own hook instead of hooking my minor mode or function into that existing hook? And how can I tell if the file is being found by GUD and not by user request? Best regards, -- Juanma "Having a smoking section in a restaurant is like having a peeing section in a swimming pool." -- Edward Burr