[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18342: 24.3.93; jumping to compilation error location gives the wron
From: |
Filipp Gunbin |
Subject: |
bug#18342: 24.3.93; jumping to compilation error location gives the wrong column |
Date: |
Fri, 06 Mar 2015 02:41:30 +0300 |
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
- bug#18342: 24.3.93; jumping to compilation error location gives the wrong column,
Filipp Gunbin <=