From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.bugs Subject: bug#18342: 24.3.93; jumping to compilation error location gives the wrong column Date: Fri, 06 Mar 2015 02:41:30 +0300 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1425598944 25774 80.91.229.3 (5 Mar 2015 23:42:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2015 23:42:24 +0000 (UTC) To: 18342@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 06 00:42:11 2015 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 1YTfP9-0004dQ-7m for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Mar 2015 00:42:11 +0100 Original-Received: from localhost ([::1]:55497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTfP8-0000GW-Fz for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Mar 2015 18:42:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTfP4-0000BK-0C for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 18:42:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTfP0-0004ay-QU for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 18:42:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTfP0-0004au-Hc for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 18:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YTfP0-0004xu-0d for bug-gnu-emacs@gnu.org; Thu, 05 Mar 2015 18:42:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Filipp Gunbin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Mar 2015 23:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18342 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18342-submit@debbugs.gnu.org id=B18342.142559890019051 (code B ref 18342); Thu, 05 Mar 2015 23:42:01 +0000 Original-Received: (at 18342) by debbugs.gnu.org; 5 Mar 2015 23:41:40 +0000 Original-Received: from localhost ([127.0.0.1]:36599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YTfOd-0004xD-Pv for submit@debbugs.gnu.org; Thu, 05 Mar 2015 18:41:40 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:52730) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YTfOa-0004x1-7s for 18342@debbugs.gnu.org; Thu, 05 Mar 2015 18:41:36 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5ED022072A for <18342@debbugs.gnu.org>; Thu, 5 Mar 2015 18:41:34 -0500 (EST) Original-Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Thu, 05 Mar 2015 18:41:35 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= x-sasl-enc:from:to:subject:date:message-id:mime-version :content-type; s=mesmtp; bh=Uiu7i/CEFTdxUEoZ32jLaHs+zlg=; b=U7aZ RvWLtYvoMu7BVedt9uGHtBzPotzVKHtRhGo8tRcgXyIkSFpkrNh8KECYSNh5e78L zzwBbFQdeHe9tmMyZu0iJwY7uUzbRjwYoeIYbkxsbVJKQ9ZRarkQMtT5+jZgI5OB HtEyNjZyzKDcGIrvfX8asGQiVuw2gUG/Tv6bKm8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:subject:date :message-id:mime-version:content-type; s=smtpout; bh=Uiu7i/CEFTd xUEoZ32jLaHs+zlg=; b=s6N+eKNyNBldXVhiopl3Ho7Vu4ww5qwTM5DNZJd7hV0 OLm6N8QPBMizseci/y+n13HLTJ6L6njlNdr4bqwbqxhcJvazouCeWjOyXk1ciIuJ ny4I/M6wriVPDedSxJpo9vASd0mcYq+vGqNN2Ob3ymjES/DE+JCT3crvtmetkYdg = X-Sasl-enc: Tp4Q8pUDUsU4fTsHc4iulu4NXZrZotFvtI72ZOB8fJix 1425598895 Original-Received: from fgunbin.local (unknown [178.66.178.221]) by mail.messagingengine.com (Postfix) with ESMTPA id 2166A680081 for <18342@debbugs.gnu.org>; Thu, 5 Mar 2015 18:41:34 -0500 (EST) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:100120 Archived-At: Ok, I fixed it by adding the following to the java-mode-hook: (set (make-local-variable 'compilation-first-column) 0) But the problem of the common (lack of?) knowledge between emacs and the compiler continues to exist. However, if we set aside the TAB problem (everywhere I worked nobody used TAB in source code), there doesn't seem to be a big problem: The column numbers emitted by the compiler most probably mean "screen columns" - just where you made an error in the source file. I don't know of compilers which do differently (I usually work only with Oracle's Java compiler so I'm not the best person to state that). If emacs and the compiler agree on source file encoding (and they should be tuned to agree), then emacs just needs to go that count of chars forward from the beginning of line. The only things that remains - whether to start from 0 or from 1 - is already handled by looking at `compilation-first-column'. Regarding `compilation-error-regexp-alist', the `compilation-first-column' probably could be there, but then it should be something like `compilation-compiler-var-alist' instead :) There are unclear cases e.g. with maven: what if we use Oracle JDK which outputs columns beginning with 0 and then change to another JDK which outputs beginning with 1? Would maven correct it's output? I doubt so. Then we should have two items in the alist: maven-oracle and maven-smth. It'd be good to mention `compilation-first-column' in the manual. Filipp