GNU bug report logs - #1282
Improvement to gud.el error message

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Michael Ernst <mernst@HIDDEN>; dated Fri, 31 Oct 2008 05:05:04 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to `wishlist' from `normal' Request was from Glenn Morris <rgm@HIDDEN> to control@HIDDEN. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-9.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 1282) by emacsbugs.donarmstrong.com; 2 Nov 2008 15:40:51 +0000
Received: from hera.mpi-sb.mpg.de (infao0809.mpi-sb.mpg.de [139.19.1.49])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA2Felut012729
	for <1282@HIDDEN>; Sun, 2 Nov 2008 07:40:49 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=mpi-sb.mpg.de; s=mail200803; h=MIME-Version:Content-Type:
	Content-Transfer-Encoding:Message-ID:Date:To:Cc:Subject:
	In-Reply-To:References:From; bh=hPoemmsfi3nmFOnL+3spsJIjsDa0R2yB
	AVbSCuRQkno=; b=b5q33LSZ7QvqQ/FjzWeaqzNXIneh6uirHNKQMael4PMykBaD
	ZUVMgHaBqLG/z33rGCOigB0LSAD+3EeNMhqCMzjblPNFoJW+hr7ivbdQpQXFtRXV
	R9lFnyhz4c9Vtbcp+8IUAQcHZlFhsikirMK8R04deuf7X8mDrJq92Db7xpw=
Received: from infao0523.mpi-sb.mpg.de ([139.19.3.135]:52931 helo=maildist0.mpi-sb.mpg.de)
	by hera.mpi-sb.mpg.de (envelope-from <mernst@HIDDEN>) 
	with esmtp (Exim 4.69) id 1Kwf4E-0006P1-Dv; Sun, 02 Nov 2008 16:40:45 +0100
Received: from swsmde.ds.mpi-sws.mpg.de ([139.19.131.44]:42493)
	by maildist0.mpi-sb.mpg.de with esmtp (Exim 4.63)
	(envelope-from <mernst@HIDDEN>)
	id 1Kwf4D-0001Mz-To; Sun, 02 Nov 2008 16:40:41 +0100
Received: from mernst by swsmde.ds.mpi-sws.mpg.de with local (Exim 4.63)
	(envelope-from <mernst@HIDDEN>)
	id 1Kwf4D-0002Ki-S4; Sun, 02 Nov 2008 16:40:41 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <18701.51702.20676.817268@HIDDEN>
Date: Sun, 2 Nov 2008 16:40:38 +0100
To: Nick Roberts <nickrob@HIDDEN>
Cc: 1282 <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
Subject: Re: bug#1282: Improvement to gud.el error message
In-Reply-To: <18700.6349.912463.590432@HIDDEN>
References: <18698.36759.322749.276498@HIDDEN>
	<18700.6349.912463.590432@HIDDEN>
From: Michael Ernst <mernst@HIDDEN>

> If I have a file MyProg.java, with your patch I get:
> 
> Could not find source file MyProg
> 
> i.e. the class name not the filename.

OK.  Feel free to modify the patch based on your more intimate knowledge of
the source code.  The key point is that the error message with no
indication of anything (class name nor filename) is cryptic, and additional
information would be useful.  Thanks!

                    -Michael Ernst




Acknowledgement sent to Michael Ernst <mernst@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#1282; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-10.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 2 Nov 2008 15:41:32 +0000
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA2FfT5N012742
	for <submit@HIDDEN>; Sun, 2 Nov 2008 07:41:30 -0800
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Kwf4z-00048C-7e
	for bug-gnu-emacs@HIDDEN; Sun, 02 Nov 2008 10:41:29 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Kwf4x-00046Z-1K
	for bug-gnu-emacs@HIDDEN; Sun, 02 Nov 2008 10:41:28 -0500
Received: from [199.232.76.173] (port=55475 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1Kwf4w-00046P-Pa
	for bug-gnu-emacs@HIDDEN; Sun, 02 Nov 2008 10:41:26 -0500
Received: from hera.mpi-sb.mpg.de ([139.19.1.49]:35432)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <mernst@HIDDEN>)
	id 1Kwf4w-00081D-El
	for bug-gnu-emacs@HIDDEN; Sun, 02 Nov 2008 10:41:26 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=mpi-sb.mpg.de; s=mail200803; h=MIME-Version:Content-Type:
	Content-Transfer-Encoding:Message-ID:Date:To:Cc:Subject:
	In-Reply-To:References:From; bh=hPoemmsfi3nmFOnL+3spsJIjsDa0R2yB
	AVbSCuRQkno=; b=b5q33LSZ7QvqQ/FjzWeaqzNXIneh6uirHNKQMael4PMykBaD
	ZUVMgHaBqLG/z33rGCOigB0LSAD+3EeNMhqCMzjblPNFoJW+hr7ivbdQpQXFtRXV
	R9lFnyhz4c9Vtbcp+8IUAQcHZlFhsikirMK8R04deuf7X8mDrJq92Db7xpw=
Received: from infao0523.mpi-sb.mpg.de ([139.19.3.135]:52931 helo=maildist0.mpi-sb.mpg.de)
	by hera.mpi-sb.mpg.de (envelope-from <mernst@HIDDEN>) 
	with esmtp (Exim 4.69) id 1Kwf4E-0006P1-Dv; Sun, 02 Nov 2008 16:40:45 +0100
Received: from swsmde.ds.mpi-sws.mpg.de ([139.19.131.44]:42493)
	by maildist0.mpi-sb.mpg.de with esmtp (Exim 4.63)
	(envelope-from <mernst@HIDDEN>)
	id 1Kwf4D-0001Mz-To; Sun, 02 Nov 2008 16:40:41 +0100
Received: from mernst by swsmde.ds.mpi-sws.mpg.de with local (Exim 4.63)
	(envelope-from <mernst@HIDDEN>)
	id 1Kwf4D-0002Ki-S4; Sun, 02 Nov 2008 16:40:41 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <18701.51702.20676.817268@HIDDEN>
Date: Sun, 2 Nov 2008 16:40:38 +0100
To: Nick Roberts <nickrob@HIDDEN>
Cc: 1282 <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
Subject: Re: bug#1282: Improvement to gud.el error message
In-Reply-To: <18700.6349.912463.590432@HIDDEN>
References: <18698.36759.322749.276498@HIDDEN>
	<18700.6349.912463.590432@HIDDEN>
From: Michael Ernst <mernst@HIDDEN>
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3)
X-CrossAssassin-Score: 2

> If I have a file MyProg.java, with your patch I get:
> 
> Could not find source file MyProg
> 
> i.e. the class name not the filename.

OK.  Feel free to modify the patch based on your more intimate knowledge of
the source code.  The key point is that the error message with no
indication of anything (class name nor filename) is cryptic, and additional
information would be useful.  Thanks!

                    -Michael Ernst





Acknowledgement sent to Michael Ernst <mernst@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#1282; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-9.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_MED autolearn=ham
	version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 1 Nov 2008 09:14:41 +0000
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA19EbhR003794
	for <submit@HIDDEN>; Sat, 1 Nov 2008 02:14:39 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1KwCZ0-000352-Qg
	for bug-gnu-emacs@HIDDEN; Sat, 01 Nov 2008 05:14:35 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1KwCYx-00033t-2J
	for bug-gnu-emacs@HIDDEN; Sat, 01 Nov 2008 05:14:32 -0400
Received: from [199.232.76.173] (port=33513 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1KwCYw-00033R-9x
	for bug-gnu-emacs@HIDDEN; Sat, 01 Nov 2008 05:14:30 -0400
Received: from viper.snap.net.nz ([202.37.101.25]:46450)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <nickrob@HIDDEN>)
	id 1KwCYv-0005pd-JA
	for bug-gnu-emacs@HIDDEN; Sat, 01 Nov 2008 05:14:30 -0400
Received: from kahikatea.snap.net.nz (241.61.255.123.dynamic.snap.net.nz [123.255.61.241])
	by viper.snap.net.nz (Postfix) with ESMTP id 1EB023DA508;
	Sat,  1 Nov 2008 21:52:37 +1300 (NZDT)
Received: by kahikatea.snap.net.nz (Postfix, from userid 1000)
	id 9B7F08FC6D; Sat,  1 Nov 2008 21:52:31 +1300 (NZDT)
From: Nick Roberts <nickrob@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <18700.6349.912463.590432@HIDDEN>
Date: Sat, 1 Nov 2008 21:52:29 +1300
To: Michael Ernst <mernst@HIDDEN>, 1282 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Subject: Re: bug#1282: Improvement to gud.el error message
In-Reply-To: <18698.36759.322749.276498@HIDDEN>
References: <18698.36759.322749.276498@HIDDEN>
X-Mailer: VM 7.19 under Emacs 22.3.1
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6
X-CrossAssassin-Score: 2

 > This patch improves an error message in gud.el, by indicating the name of
 > the file that cannot be found.
 > 
 >                     -Michael Ernst

If I have a file MyProg.java, with your patch I get:

Could not find source file MyProg

i.e. the class name not the filename.

Have you read this comment in gud.el?

       ;; The first group matches <fully-qualified-class>,
       ;; the second group matches <class> and the third group
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       ;; matches <line-number>.  We don't care about using

Generally, if there is more than one (non-public) class in the file, the
class name needn't match the filename.

-- 
Nick                                           http://www.inet.net.nz/~nickrob





Acknowledgement sent to Nick Roberts <nickrob@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#1282; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-7.1 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at 1282) by emacsbugs.donarmstrong.com; 1 Nov 2008 08:52:50 +0000
Received: from viper.snap.net.nz (viper.snap.net.nz [202.37.101.25])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA18qkas030646
	for <1282@HIDDEN>; Sat, 1 Nov 2008 01:52:48 -0700
Received: from kahikatea.snap.net.nz (241.61.255.123.dynamic.snap.net.nz [123.255.61.241])
	by viper.snap.net.nz (Postfix) with ESMTP id 1EB023DA508;
	Sat,  1 Nov 2008 21:52:37 +1300 (NZDT)
Received: by kahikatea.snap.net.nz (Postfix, from userid 1000)
	id 9B7F08FC6D; Sat,  1 Nov 2008 21:52:31 +1300 (NZDT)
From: Nick Roberts <nickrob@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <18700.6349.912463.590432@HIDDEN>
Date: Sat, 1 Nov 2008 21:52:29 +1300
To: Michael Ernst <mernst@HIDDEN>, 1282 <at> debbugs.gnu.org
Cc: bug-gnu-emacs@HIDDEN
Subject: Re: bug#1282: Improvement to gud.el error message
In-Reply-To: <18698.36759.322749.276498@HIDDEN>
References: <18698.36759.322749.276498@HIDDEN>
X-Mailer: VM 7.19 under Emacs 22.3.1

 > This patch improves an error message in gud.el, by indicating the name of
 > the file that cannot be found.
 > 
 >                     -Michael Ernst

If I have a file MyProg.java, with your patch I get:

Could not find source file MyProg

i.e. the class name not the filename.

Have you read this comment in gud.el?

       ;; The first group matches <fully-qualified-class>,
       ;; the second group matches <class> and the third group
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       ;; matches <line-number>.  We don't care about using

Generally, if there is more than one (non-public) class in the file, the
class name needn't match the filename.

-- 
Nick                                           http://www.inet.net.nz/~nickrob




Acknowledgement sent to Nick Roberts <nickrob@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#1282; Package emacs. Full text available.

Message received at (unknown):


Received: (at unknown) by unknown; unknown
X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02
	(2007-08-08) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,MURPHY_DRUGS_REL8,
	RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02
Received: (at submit) by emacsbugs.donarmstrong.com; 31 Oct 2008 04:55:49 +0000
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9V4tjin029836
	for <submit@HIDDEN>; Thu, 30 Oct 2008 21:55:46 -0700
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Kvm2z-0003gr-1q
	for bug-gnu-emacs@HIDDEN; Fri, 31 Oct 2008 00:55:45 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Kvm2v-0003fk-DX
	for bug-gnu-emacs@HIDDEN; Fri, 31 Oct 2008 00:55:42 -0400
Received: from [199.232.76.173] (port=59293 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1Kvm2v-0003fh-BR
	for bug-gnu-emacs@HIDDEN; Fri, 31 Oct 2008 00:55:41 -0400
Received: from hera.mpi-sb.mpg.de ([139.19.1.49]:35503)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60)
	(envelope-from <mernst@HIDDEN>)
	id 1Kvm2v-0003GV-3e
	for bug-gnu-emacs@HIDDEN; Fri, 31 Oct 2008 00:55:41 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=mpi-sb.mpg.de; s=mail200803; h=MIME-Version:Content-Type:
	Content-Transfer-Encoding:Message-ID:Date:From:To:Subject; bh=bN
	woeX8a0CixOKUPsthlIO7wwKCcNxVSah01ES2Rww8=; b=BZbZtIg7nH5yBusqCm
	C8Vf6cgf+2GlxE2yL3/kZLx00/T0U+FCVEV3hP6GsztI7ZjWING0gvkMWSggF+pZ
	BbQvAP9/X+D9pwUmyExPxacuPltANWN09FbAkKejubO0QWGMeR7IJJ00X73Yudz5
	TN5RRcnOYVsmDUmj9oTlSYvL0=
Received: from maildist0.mpi-sb.mpg.de ([139.19.3.135]:40710)
	by hera.mpi-sb.mpg.de (envelope-from <mernst@HIDDEN>) 
	with esmtp (Exim 4.69) id 1Kvm28-0004EO-1x; Fri, 31 Oct 2008 05:55:04 +0100
Received: from swsao0713.ds.mpi-sws.mpg.de ([139.19.131.44]:58737 helo=swsmde.ds.mpi-sws.mpg.de)
	by maildist0.mpi-sb.mpg.de with esmtp (Exim 4.63)
	(envelope-from <mernst@HIDDEN>)
	id 1Kvm27-0000SP-Mp; Fri, 31 Oct 2008 05:54:51 +0100
Received: from mernst by swsmde.ds.mpi-sws.mpg.de with local (Exim 4.63)
	(envelope-from <mernst@HIDDEN>)
	id 1Kvm27-00063F-LK; Fri, 31 Oct 2008 05:54:51 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <18698.36759.322749.276498@HIDDEN>
Date: Fri, 31 Oct 2008 05:54:47 +0100
From: Michael Ernst <mernst@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Improvement to gud.el error message
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3)

This patch improves an error message in gud.el, by indicating the name of
the file that cannot be found.

                    -Michael Ernst


diff -u -b -r --exclude=CVS --exclude=.bzr --exclude=.hg --exclude=.hgtags --exclude=.svn /DS/home-0/mernst/.synchronized/gud.el-orig /DS/home-0/mernst/.synchronized/gud.el-patched
--- /DS/home-0/mernst/.synchronized/gud.el-orig	2008-10-25 11:28:35.918786020 +0200
+++ /DS/home-0/mernst/.synchronized/gud.el-patched	2008-10-25 11:28:12.635390729 +0200
@@ -2223,8 +2223,9 @@
 		(if (< n gud-jdb-lowest-stack-level)
 		    (progn (setq gud-jdb-lowest-stack-level n) t)))
 	    t)
+	  (let ((filename (match-string 2 gud-marker-acc)))
 	  (if (setq file-found
-		    (gud-jdb-find-source (match-string 2 gud-marker-acc)))
+		      (gud-jdb-find-source filename))
 	      (setq gud-last-frame
 		    (cons file-found
 			  (string-to-number
@@ -2233,7 +2234,7 @@
                              (if (string-match "[.,]" numstr)
                                  (replace-match "" nil nil numstr)
                                numstr)))))
-	    (message "Could not find source file.")))
+	      (message "Could not find source file %s" filename))))
 
       ;; Set the accumulator to the remaining text.
       (setq gud-marker-acc (substring gud-marker-acc (match-end 0))))

Diff finished.  Fri Oct 31 05:54:35 2008





Acknowledgement sent to Michael Ernst <mernst@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#1282; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.