[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37633: Column part interpreted wrong in compilation mode
From: |
Bernd Paysan |
Subject: |
bug#37633: Column part interpreted wrong in compilation mode |
Date: |
Sat, 05 Oct 2019 21:24:17 +0200 |
Am Samstag, 5. Oktober 2019, 21:14:38 CEST schrieb Eli Zaretskii:
> > From: Bernd Paysan <bernd@net2o.de>
> > Cc: 37633@debbugs.gnu.org, anton@mips.complang.tuwien.ac.at
> > Date: Sat, 05 Oct 2019 20:54:38 +0200
> >
> > > We cannot use 'exact' here because there's no file per se: we only
> > > have the compiler output. We must use 'approximate'.
> >
> > The buffer that matters is not the compiler output, it's the buffer of the
> > source code.
>
> But the column numbers are counted in the compiler output, and no one
> said that the compiler output must be encoded the same as the source
> file.
The column numbers are written as decimal digits in the compiler output. They
are not even calculated, they are just extracted.
Indeed, the compiler output can be in a different encoding, but it doesn't
matter. The navigation that needs to change is in the source code file. This
is compiler output from compiling an iso-latin encoded file, the compiler
output itself is utf-8:
test-iso.c:3:23: error: ‘c’ undeclared (first use in this function)
3 | printf("test��� %i", c);
| ^
The 23(-1) are the numbers of bytes to get from the start of line to the
missing variable 'c'. The three � are there, because the compilation buffer
contains invalid characters now. They are iso-latin characters, invalid in
utf-8. But this is irrelevant. All the compilation mode does is extract the
test-iso.c (file name), 3 (line number) and 23 (byte index). Navigation
happens in test-iso.c, it's a file (the C compiler can't access emacs
buffers), autodetection is pretty reliable.
There might be some corner cases, where the suggested solution is not perfect,
but it's much better than what we have now.
--
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o id: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
https://net2o.de/
signature.asc
Description: This is a digitally signed message part.
- bug#37633: Column part interpreted wrong in compilation mode, Bernd Paysan, 2019/10/05
- bug#37633: Column part interpreted wrong in compilation mode, Eli Zaretskii, 2019/10/05
- bug#37633: Column part interpreted wrong in compilation mode, Eli Zaretskii, 2019/10/05
- bug#37633: Column part interpreted wrong in compilation mode, Bernd Paysan, 2019/10/05
- bug#37633: Column part interpreted wrong in compilation mode, Eli Zaretskii, 2019/10/05
- bug#37633: Column part interpreted wrong in compilation mode, Bernd Paysan, 2019/10/05
- bug#37633: Column part interpreted wrong in compilation mode, Eli Zaretskii, 2019/10/05
- bug#37633: Column part interpreted wrong in compilation mode,
Bernd Paysan <=
- bug#37633: Column part interpreted wrong in compilation mode, Eli Zaretskii, 2019/10/06
- bug#37633: Column part interpreted wrong in compilation mode, Bernd Paysan, 2019/10/06
- bug#37633: Column part interpreted wrong in compilation mode, Eli Zaretskii, 2019/10/06
- bug#37633: Column part interpreted wrong in compilation mode, Bernd Paysan, 2019/10/06
- bug#37633: Column part interpreted wrong in compilation mode, Bernd Paysan, 2019/10/05
- bug#37633: Column part interpreted wrong in compilation mode, Anton Ertl, 2019/10/06
- bug#37633: Column part interpreted wrong in compilation mode, Eli Zaretskii, 2019/10/06
- bug#37633: Column part interpreted wrong in compilation mode, Bernd Paysan, 2019/10/06
- bug#37633: Column part interpreted wrong in compilation mode, Eli Zaretskii, 2019/10/06
- bug#37633: Column part interpreted wrong in compilation mode, Bernd Paysan, 2019/10/06