From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Incorrect byte compiler error/warning message positions. A possible fix. Date: Mon, 15 Nov 2021 13:29:23 +0800 Message-ID: <87sfvy0yx8.fsf@yahoo.com> References: <87sfvy2dsl.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2148"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: Alan Mackenzie , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 15 06:31:10 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmUaD-0000K2-Cj for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Nov 2021 06:31:09 +0100 Original-Received: from localhost ([::1]:53302 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmUaC-0005wj-5n for ged-emacs-devel@m.gmane-mx.org; Mon, 15 Nov 2021 00:31:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmUYi-00057Q-ID for emacs-devel@gnu.org; Mon, 15 Nov 2021 00:29:36 -0500 Original-Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]:41457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmUYg-0004KM-B2 for emacs-devel@gnu.org; Mon, 15 Nov 2021 00:29:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636954169; bh=X4+el90deqO3NQyjOMOG7IPho9ycUwx707Nu7gEghKA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=lF4rqfADeN3w8ovIViS3FA/rY2u+vwsAK1s6KGEBop4CvRdw2GYV04SIECV8DM9oy94efMBZNPD1OeQer0AO212N2dyYtHhs9hdUfpsofqTw7gMLjK+GUWd4VkY85JTj1Ye1hVI8Mf6Tpu0oYn7YB0GhnrczQCqtTC/cTxJrSgtQt2nn+8YM3XVvAhpJbuPcF7Deofc9kK6DtbGSiCcV/VRC+Ueg3ybAdz8tMhgkxdkq7OY08CPvI55rA5ZtcQ2YsDGVOsAnARTKgaLxqNMZk98eeuoTg0AUrM/wtGlvn+8EuPHwvI7LYVzMA4/yIFhitphu53OgnITXrGpElOxdFQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636954169; bh=+AFPrQ3fn2US16Bib1CCf/43DW8a36YYvOGp7LK5v2/=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=RUg006niQAvC9cSMuddiyoQKuazQ33qAJOxF9UonHOTx1adJzuyA2XrxqEf64KhYTsdLyYuh/Y1ew+LjaIDwZxKPzp3ZpqfX6Zkp+moPqCyn+Mnuia6amWk4MrHpH3qPcK4weXB03KgtyF3YZccwJFtYjHqyxYAm4I6jc86fVqRUYn7zxLrqmZbdr/49kG3KyMxSqB+FBrHSE0rroZG2zLBCa/VkcyZByk4Qqm+5uk4bxPhUOCZ70B6W+ug1fRLqJRJootipn1gL0b24Q3KheKBY41eSbpJuUuZWYk6AGW3qwhvdz63aMkbV8m0dMHcwkn7HxhNj4LEmxnwTqO/+oA== X-YMail-OSG: DGynU40VM1kEoO6ZuFV3XNyQ4UxD3m1AxLSEsabZay043ZOKYen0urg9pDP6kOY SHO2YpAicpqU7xUrDkImAaNDZJ1TE6rS8j6F3j.LLQnJpHFOQZ6xhvviVbHDrucADRx8YGOWPKB6 NyxKZGIOJymUAQLtz.Hmr_Kd9oIfrbDjI3IziphtK_yNA4qMZ3kzsEMW80HsvLm9SOwITnUx_BKM 4i.A0D8zc9JcNsS.Y40ksKIPNFWDAUpxDL2qFTmtBGBhuS2hmZGTvS9_Z1k9sFaeeiKiLTlccC_4 1Sn8AQOixpKVqcF_uNAGEz0FOxrLVfOncohI1_3L7GdpD5mqGkKWJhmW6pPcT5jbdGwLi_.FJfm7 SafolZb3Em5xiliOUpeE2n4_xkhEFRm4.Lwf3PBUIzf_5N2sgnexioiHOnTPeNpFS_IMapgi6yyH qlaiJVKrfEidI_15.SwRNySss28T8m566hGi1DTiH3UDq4_esUVx9oRyOD4CeUW7MQMeU7ajwXlD 5.lmHoe4Q662ofigul39NIF1rSaKtgBPJgn.QqboB_a5axSZeubfZ1KQXyfInHSD1GoetY8KP2JF 5_BWeJa84geAfHJBLScClmQn7KJQcN6.5KefkOtU8C6XlxrGnat1E27Pd6U6V3QQs2nSfHc7dgUj ce4leb1o35k0Vt3y1.jn0KRbewJkyEIqRATxoOeY54YdFQ_1ZFkJz9E.lbP4Fc.BYZTcnT7mfugX tZHXPO4Qbwu0hq.KqtK5piwkIzESJs5NNeRzHBkHa1GaU9fmsPo8oKWU_RX3oZqZip1G.2UNVDIX H4RyDdt7O88ZWd6o9eRHyfnHMdQvr.PJgnSgEZN1P8 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Mon, 15 Nov 2021 05:29:29 +0000 Original-Received: by kubenode504.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID bbb0ecb04abbd28b5e1eef4679663bae; Mon, 15 Nov 2021 05:29:27 +0000 (UTC) In-Reply-To: <87sfvy2dsl.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 15 Nov 2021 06:22:50 +0100") X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.33; envelope-from=luangruo@yahoo.com; helo=sonic308-10.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279467 Archived-At: Lars Ingebrigtsen writes: >> The byte compiler reports wrong source positions in its error and >> warning messages; not every time, but perhaps most of the time. There >> are currently at least six open bugs for this problem, e.g. bug #22288. > In my experience, the vast majority of the warning messages point to the > correct position. But, yes, it does sometimes give the wrong position. I wouldn't say the "correct position", but somewhere close to the correct position. It could be, for example, a few lines above where it should actually be, when giving diagnostics for unused lexical bindings. But it is usually close enough for people to quickly locate and solve the error.