From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#33475: [Wish list]: Display line and column numbers in warnings with `compile-defun' Date: Wed, 28 Nov 2018 13:34:12 +0000 Message-ID: <20181128133412.GA18476@ACM> References: <20181123175839.GA14199@ACM> <20181127071531.GA5093@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1543412174 28566 195.159.176.226 (28 Nov 2018 13:36:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2018 13:36:14 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) To: 33475-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 28 14:36:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1gS00g-0007K4-2u for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2018 14:36:10 +0100 Original-Received: from localhost ([::1]:47798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gS02m-0004Iu-M2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2018 08:38:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gS02a-0004F4-6X for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 08:38:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gS02U-0007NC-Eh for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 08:38:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48701) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gS02U-0007Mv-8e for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 08:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gS02U-0006K3-0i for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 08:38:02 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Nov 2018 13:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 33475 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 33475@debbugs.gnu.org, acm@muc.de, acm@muc.de Original-Received: via spool by 33475-done@debbugs.gnu.org id=D33475.154341226924282 (code D ref 33475); Wed, 28 Nov 2018 13:38:01 +0000 Original-Received: (at 33475-done) by debbugs.gnu.org; 28 Nov 2018 13:37:49 +0000 Original-Received: from localhost ([127.0.0.1]:52959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gS02H-0006Ja-9t for submit@debbugs.gnu.org; Wed, 28 Nov 2018 08:37:49 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:60856 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1gS02E-0006JR-St for 33475-done@debbugs.gnu.org; Wed, 28 Nov 2018 08:37:47 -0500 Original-Received: (qmail 9148 invoked by uid 3782); 28 Nov 2018 13:37:45 -0000 Original-Received: from acm.muc.de (p2E5D5BA9.dip0.t-ipconnect.de [46.93.91.169]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 28 Nov 2018 14:37:44 +0100 Original-Received: (qmail 18509 invoked by uid 1000); 28 Nov 2018 13:34:12 -0000 Content-Disposition: inline In-Reply-To: <20181127071531.GA5093@ACM> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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: 208.118.235.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:152859 Archived-At: On Tue, Nov 27, 2018 at 07:15:31 +0000, Alan Mackenzie wrote: > On Fri, Nov 23, 2018 at 17:58:39 +0000, Alan Mackenzie wrote: > > Hello, Emacs. > > At the moment, if a warning is displayed for a compilation started by > > `compile-defun', it appears something like: > > Warning: assignment to free variable `foo' > > . This is all very well, but it lacks the line and column number of the > > place of the warning, meaning one must search through the source and > > guess where the warning is. > > Why not output this information, much like is done in a batch > > compilation? It would then look like: > > Buffer winkler2.el:3:14:Warning: assignment to free variable `foo' > > . This would save guessing and irritation. > > Here is a patch which achieves this: > [ .... ] > This patch was all very well, but was incomplete: hitting CR on such a > warning message in *Compile-Log* failed to move to the position in the > .el buffer, instead spuriously prompting for a file. > The following patch, incorporating the patch from my original post, > fixes this by amending compile.el to handle buffers as an alternative to > file names, creating emacs-lisp-compilation-mode, which extracts the > buffer from one of these warning messages, and calling this new mode > from byte-compile-log-file in place of compilation-mode. Committed to the master branch. Closing the bug. -- Alan Mackenzie (Nuremberg, Germany).