From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Bernd Paysan via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#37633: Column part interpreted wrong in compilation mode Date: Sat, 05 Oct 2019 21:24:17 +0200 Message-ID: <1734660.yQRGRn46K7@daiyu> References: <2282407.NbK4RY0fEn@daiyu> <4972654.EqVlIXum5b@daiyu> <83pnjb2ee9.fsf@gnu.org> Reply-To: Bernd Paysan Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8679054.kqHN69lPoH"; micalg="pgp-sha256"; protocol="application/pgp-signature" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="204810"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37633@debbugs.gnu.org, anton@mips.complang.tuwien.ac.at To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 05 21:25:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iGpg0-000qzl-St for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Oct 2019 21:25:13 +0200 Original-Received: from localhost ([::1]:58526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGpfy-0004ox-UU for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Oct 2019 15:25:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35759) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGpfr-0004ng-7g for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 15:25:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGpfp-0000VX-Ty for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 15:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36456) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGpfp-0000VT-RZ for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 15:25:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iGpfp-0006gg-MS for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 15:25:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bernd Paysan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Oct 2019 19:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37633 X-GNU-PR-Package: emacs Original-Received: via spool by 37633-submit@debbugs.gnu.org id=B37633.157030346525652 (code B ref 37633); Sat, 05 Oct 2019 19:25:01 +0000 Original-Received: (at 37633) by debbugs.gnu.org; 5 Oct 2019 19:24:25 +0000 Original-Received: from localhost ([127.0.0.1]:45277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGpfF-0006fg-3P for submit@debbugs.gnu.org; Sat, 05 Oct 2019 15:24:25 -0400 Original-Received: from mail.net2o.de ([185.183.156.191]:48160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGpfD-0006fW-4S for 37633@debbugs.gnu.org; Sat, 05 Oct 2019 15:24:23 -0400 Original-Received: from daiyu.localnet (200116b8262f8d00cce002de63b8a600.dip.versatel-1u1.de [IPv6:2001:16b8:262f:8d00:cce0:2de:63b8:a600]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by mail.net2o.de (Postfix) with ESMTPSA id 88AF0400A5; Sat, 5 Oct 2019 21:24:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=net2o.de; s=mail; t=1570303461; bh=vvjPKDPkhT1vTtf0gfvQnh7EhjcyoPoXrwTKSzmarVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E+fq/WAY2OYnAm+kx0gcQqCACKZsRdVNvo0OmbplgPqzYhWAA4lzg6l54auUatluA oZbi3vuYHqWTx5Fbbsa9O/0xmVVoI2spMe+yVtDakOS/7OYiXXBTtBZYAPf0E/XqVI 3ryRqWfpjFDaRjOdgNfw0OCZv/5sWmVzxvVAa0I8= In-Reply-To: <83pnjb2ee9.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:168397 Archived-At: --nextPart8679054.kqHN69lPoH Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Am Samstag, 5. Oktober 2019, 21:14:38 CEST schrieb Eli Zaretskii: > > From: Bernd Paysan > > Cc: 37633@debbugs.gnu.org, anton@mips.complang.tuwien.ac.at > > Date: Sat, 05 Oct 2019 20:54:38 +0200 > >=20 > > > We cannot use 'exact' here because there's no file per se: we only > > > have the compiler output. We must use 'approximate'. > >=20 > > The buffer that matters is not the compiler output, it's the buffer of = the > > source code. >=20 > 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. T= hey=20 are not even calculated, they are just extracted. Indeed, the compiler output can be in a different encoding, but it doesn't= =20 matter. The navigation that needs to change is in the source code file. T= his=20 is compiler output from compiling an iso-latin encoded file, the compiler=20 output itself is utf-8: test-iso.c:3:23: error: =E2=80=98c=E2=80=99 undeclared (first use in this f= unction) 3 | printf("test=EF=BF=BD=EF=BF=BD=EF=BF=BD %i", c); | ^ The 23(-1) are the numbers of bytes to get from the start of line to the=20 missing variable 'c'. The three =EF=BF=BD are there, because the compilati= on buffer=20 contains invalid characters now. They are iso-latin characters, invalid in= =20 utf-8. But this is irrelevant. All the compilation mode does is extract t= he=20 test-iso.c (file name), 3 (line number) and 23 (byte index). Navigation=20 happens in test-iso.c, it's a file (the C compiler can't access emacs=20 buffers), autodetection is pretty reliable. There might be some corner cases, where the suggested solution is not perfe= ct,=20 but it's much better than what we have now. =2D-=20 Bernd Paysan "If you want it done right, you have to do it yourself" net2o id: kQusJzA;7*?t=3Duy@X}1GWr!+0qqp_Cn176t4(dQ* https://net2o.de/ --nextPart8679054.kqHN69lPoH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEERJ1NDqPQRwYnwBjr9y2Uk5MtoGcFAl2Y7eEACgkQ9y2Uk5Mt oGcF8A//WwIiLs2O7toTiaFxoh4zeufk71werrJsB3uAeVifk2qij/zRa7ZF2azb zlfYhcOfZKtf/fpwqxvmUhsvf7xZYTFJRy/a+k9CDv1A3o08nawnazLkJOghBtXz cmXn046GxwJstZ+2geqGMGltxaqCUwCvM+0vLg9SAqzIiRFMb3tQWi+3qvSTm5Nn ye2nku2gUPKxChJBfmDlz9eTUce1ILddnpIZG6pLPaH14PNTTClMOrTyFRvJB4T3 0ZSXRR9cJCpfDdGgMxang2OFyW6+z/R8hjMeUOmrQn2KC31zxVd8prOWYON1h1LA SvH287s766uJZywEyGd8YY8vHGtSx8k3RebuX5Ye/nHCGJLF5acHNIuFDp/hwFMn 92G9MIbr+pa0QFl5E/07FwRe81aDK88+AmNy9vIOquCl3a3c8z0EMYdbDObTXubO 5ZbSMGB/+yw+dkVQtcCHMDU1jv3p5N9WVgAORRq8w3iqdmcb7f8Erb4n6te6cG3P ett4j2/4VwL8rIb90cXRDMs0bb8dabvl3Nh6VMiSDjMGU0a8Ihwj78z8Ch5S6Pn1 1+jH1OegNBNeaNWANB7Ylci/xUpf8OmQs7o+cquRWZHI+tuUScnjQWSc7SAgXcK/ zc6enl3vGyfO77ybpwevPk0WWRRjfBcFCe7lQ9DZZKuhJHaOjyY= =D7sz -----END PGP SIGNATURE----- --nextPart8679054.kqHN69lPoH--