GNU bug report logs - #21681
[PATCH] Fix formatting of lexical-binding at eof warning

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> gmail.com>

Date: Tue, 13 Oct 2015 22:54:02 UTC

Severity: wishlist

Tags: patch

Merged with 17518, 21307

Found in versions 24.4.50, 25.0.50

Fixed in version 25.0.91

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 21681 <at> debbugs.gnu.org
Subject: bug#21681: [PATCH] Fix formatting of lexical-binding at eof warning
Date: Sat, 31 Oct 2015 18:36:40 -0400
On Wed, Oct 14, 2015 at 1:47 PM, Noam Postavsky
<npostavs <at> users.sourceforge.net> wrote:
> On Wed, Oct 14, 2015 at 1:42 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>>> Date: Wed, 14 Oct 2015 12:56:28 -0400
>>> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
>>> own, but display-warning only prints the 1st symbol of the list so the
>>> warning text itself wouldn't change.
>>
>> I find "files" no more explanatory that "warning".  If we lack
>> infrastructure to display meaningful messages that unequivocally point
>> to the nature of the problem, let's add the missing infrastructure.
>
> How about making display-warning print all TYPE symbols then?

I've been playing a bit more with display-warning, and I think the
part in brackets is not supposed to be part of the warning's
explanation, but rather it tells you how to block it. Like gcc's
"[-Wfoo]". The problem with printing all the symbols is that it would
make the warnings using TYPE lists longer, pushing the actual warning
text to the right, and discourage use of more specific TYPEs.

Another possiblity is still to truncate to a single item, but show a
"..." button to expand it, like `eval-last-sexp' does for long lists.

Another thing I've been experimenting with is including buttons with
an action to resolve the problem in the warning text. It seems to work
pretty well, except that because *Warnings* is in special-mode <tab>
isn't bound to forward-button. It could be nice to have a
warnings-mode which does that. It could also bind e.g. `i' to
something like ignore-warning-at-point (which would customize
warning-suppress-types). But I know Emacs supposed to be in feature
freeze so maybe now is not the time to be adding new modes.




This bug report was last modified 9 years and 108 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.