[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33475: [Wish list]: Display line and column numbers in warnings with
bug#33475: [Wish list]: Display line and column numbers in warnings with `compile-defun'
Wed, 28 Nov 2018 13:34:12 +0000
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).