From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Getting the correct line/column numbers on byte compilation error/warning messages Date: Mon, 17 Jul 2017 19:56:54 +0000 Message-ID: <20170717195654.GB3647@acm> References: <20170716134429.GA3013@acm> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1500321513 23992 195.159.176.226 (17 Jul 2017 19:58:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Jul 2017 19:58:33 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 17 21:58:29 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXC9v-0005jT-PD for ged-emacs-devel@m.gmane.org; Mon, 17 Jul 2017 21:58:23 +0200 Original-Received: from localhost ([::1]:52303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXCA1-0002CQ-DJ for ged-emacs-devel@m.gmane.org; Mon, 17 Jul 2017 15:58:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXC9p-0002Am-AT for emacs-devel@gnu.org; Mon, 17 Jul 2017 15:58:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXC9m-0002oF-IO for emacs-devel@gnu.org; Mon, 17 Jul 2017 15:58:17 -0400 Original-Received: from ocolin.muc.de ([193.149.48.4]:14898 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1dXC9m-0002nZ-6M for emacs-devel@gnu.org; Mon, 17 Jul 2017 15:58:14 -0400 Original-Received: (qmail 79132 invoked by uid 3782); 17 Jul 2017 19:58:12 -0000 Original-Received: from acm.muc.de (p548C6FE5.dip0.t-ipconnect.de [84.140.111.229]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 17 Jul 2017 21:58:11 +0200 Original-Received: (qmail 4072 invoked by uid 1000); 17 Jul 2017 19:56:54 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.4 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216797 Archived-At: Hello, Stefan. On Mon, Jul 17, 2017 at 15:42:00 -0400, Stefan Monnier wrote: > Stefan "who'd actually prefer a «real» solution rather than > another hack, but beggars can't be choosers" I've been thinking about this for nearly a year, and I can't conceive of a "real" solution which doesn't involve redesigning the byte compiler from scratch (or even one which does). Lisp source code doesn't seem to lend itself to keeping track of source positions as the forms are manipulated, taken apart, and put together again. Can you conceive of some better scheme by which accurate line/column numbers can be output by error messages, and which doesn't involve rewriting the byte compiler? What I do anticipate about my hack is, assuming I ever get it working, it will produce the correct source code positions all the time, not just most of the time. -- Alan Mackenzie (Nuremberg, Germany).