From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.bugs Subject: bug#11254: 24.0.94; cannot find compilation-error locations for Java Date: Mon, 16 Apr 2012 11:22:15 -0400 Message-ID: <87mx6baehk.fsf@gnu.org> Reply-To: sds@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1334589978 4296 80.91.229.3 (16 Apr 2012 15:26:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2012 15:26:18 +0000 (UTC) To: 11254@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 16 17:26:15 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SJnok-00019e-61 for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Apr 2012 17:26:14 +0200 Original-Received: from localhost ([::1]:45932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJnoj-0005R7-Ho for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Apr 2012 11:26:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJnob-0005Ke-KA for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 11:26:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJnoV-0000CW-Kv for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 11:26:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJnoV-0000CK-DH for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 11:25:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SJnoX-0001FM-MF for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 11:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sam Steingold Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Apr 2012 15:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11254 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13345899554779 (code B ref -1); Mon, 16 Apr 2012 15:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Apr 2012 15:25:55 +0000 Original-Received: from localhost ([127.0.0.1]:37022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJnoQ-0001F1-NJ for submit@debbugs.gnu.org; Mon, 16 Apr 2012 11:25:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34108) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SJnoN-0001Eo-HV for submit@debbugs.gnu.org; Mon, 16 Apr 2012 11:25:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJnoA-0008SQ-2K for submit@debbugs.gnu.org; Mon, 16 Apr 2012 11:25:43 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:36144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJno9-0008PP-S3 for submit@debbugs.gnu.org; Mon, 16 Apr 2012 11:25:37 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJnlE-0004Aj-5q for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 11:22:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SJnl6-00075h-S5 for bug-gnu-emacs@gnu.org; Mon, 16 Apr 2012 11:22:35 -0400 Original-Received: from mail-qa0-f41.google.com ([209.85.216.41]:44758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJnky-00074B-SS; Mon, 16 Apr 2012 11:22:21 -0400 Original-Received: by qafl39 with SMTP id l39so7548637qaf.14 for ; Mon, 16 Apr 2012 08:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:return-receipt-to:reply-to:x-attribution :x-disclaimer:date:message-id:mime-version:content-type; bh=WLujsm5P8TesS635EjKfms0/tu3kAtqzAIkXnVG/PpM=; b=XFQcGvs/DjxuoGC+sRfYHljd/uMGwp4jDE0yaFHuU+8MiMBe67SeuqglEbjLhyf5lH 8ZUmKP3FsAC5+ptE3iY63G0rlSFa5C/LP4qnuDPljZAWrqMnnT5EyXEPTpg6zAhInFJg wLkPyz+ZEyAe1hbN6raMLkOdevWwh6s73indEDsnQC2YzbvX31m0aY+ci7EyEl2mf9WI 9n+T2XuNAs5IpkO9X+wboSavi/6LCyeXTR0zsX0HApL3YYV7P/DUoO29sJ+ukUaFs4Km UzM7CdYMe/dwh4jtQuBiTBqheqUeLvBe67oPNt6F8uWTqzYgaaaitgBYRhdZoSBICmgl fvEg== Original-Received: by 10.224.210.66 with SMTP id gj2mr15938559qab.3.1334589738618; Mon, 16 Apr 2012 08:22:18 -0700 (PDT) Original-Received: from t520sds ([74.113.160.197]) by mx.google.com with ESMTPS id dm8sm34762289qab.18.2012.04.16.08.22.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Apr 2012 08:22:17 -0700 (PDT) X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59120 Archived-At: When I work on a maven-managed java project, I add this to java-mode-hook: (set (make-local-variable 'compile-command) (concat "cd " (locate-dominating-file buffer-file-name "pom.xml") " && mvn compile test package")) i.e., M-x compile RET runs maven in a directory far above the location of the current file. The errors in the compilation buffer look like this: java.io.FileNotFoundException: null (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:137) at java.io.FileInputStream.(FileInputStream.java:96) at com.clearspring.research.classifier.ml.index.InMemoryDictionaryIndex.buildFeaturesIndex(InMemoryDictionaryIndex.java:151) at com.clearspring.research.classifier.ml.index.InMemoryDictionaryIndex.(InMemoryDictionaryIndex.java:57) at com.clearspring.research.classifier.Classifier.(Classifier.java:34) at com.clearspring.data.filter.bundle.BundleFilterClassify.initialize(BundleFilterClassify.java:49) at com.clearspring.data.filter.bundle.BundleFilter.initOnceOnly(BundleFilter.java:128) at com.clearspring.data.filter.bundle.BundleFilter.filter(BundleFilter.java:151) at com.clearspring.data.filter.bundle.TestBundleFilterClassify.testEmptyParamsConditions(TestBundleFilterClassify.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:119) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103) at $Proxy0.invoke(Unknown Source) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:150) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:91) at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:104) at org.apache.maven.plugin.surefire.SurefirePlugin.executeAfterPreconditionsChecked(SurefirePlugin.java:617) at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:102) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) where every single line in clickable in the most useless way possible: it asks _me_ for a directory where the file in (file.java:lineno) is located. Note that most error lines (e.g., org.apache.*) are _not_ in my tree at all, so making them clickable is a waste and a source of confusion. Also, note that the method name contains the directory path to the file (with "/" replaced with "." and some prefix like "main/java" missing). PROPOSAL: 1. new user variable `compilation-my-methods-regexp', which, when non-nil, prevents all other methods from being clickable. 2. new user variable `compilation-other-methods-regexp', which, when non-nil, prevents the specified methods from being clickable. 3. when I click on a line in the stack trace, find(1) is run in the `default-directory' of the compilation buffer like this: if I click on "org.codehaus.classworlds.Launcher.launch(Launcher.java:255)" `find . -path org/codehaus/classworlds/Launcher.java` and if that finds a single file, then that file is visited at the specified line, and if more than one file is found, a find-dired is run. PS. I am using JDEE, and it delegates error finding to the stock emacs facilities. In GNU Emacs 24.0.94.5 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars) of 2012-03-29 on t520sds Windowing system distributor `The X.Org Foundation', version 11.0.11004000 Configured using: `configure '--with-wide-int'' Major mode: Comint Minor modes in effect: semantic-minor-modes-format: ((:eval (if (or semantic-highlight-edits-mode semantic-show-unmatched-syntax-mode jde-bug-minor-mode jde-jdb-minor-mode jde-plugin-minor-mode semantic-idle-scheduler-mode) S))) diff-auto-refine-mode: t which-function-mode: t url-handler-mode: t show-paren-mode: t shell-dirtrack-mode: t compilation-shell-minor-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t -- Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000 http://www.childpsy.net/ http://www.memritv.org http://dhimmi.com http://mideasttruth.com http://truepeace.org http://iris.org.il http://ffii.org Yeah, yeah, I love cats too... wanna trade recipes?