GNU bug report logs - #33740
[PATCH] Customizable flymake mode-line indicator

Previous Next

Package: emacs;

Reported by: Andrii Kolomoiets <andreyk.mad <at> gmail.com>

Date: Fri, 14 Dec 2018 09:21:01 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #71 received at 33740 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 33740 <at> debbugs.gnu.org, Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Subject: Re: bug#33740: [PATCH] Customizable flymake mode-line indicator
Date: Fri, 20 Sep 2019 14:07:30 +0100
[Message part 1 (text/plain, inline)]
On Thu, Sep 19, 2019 at 4:39 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

>
> I'm not sure -- there's something about the way Emacs renders the minor
> mode lighters that doesn't quite preserve the text properties.  That'll
> have to be fixed first...  if indeed that's the problem and I'm not just
> doing something stupid here somehow.
>

OK. And this is what you're discussing with Eli in the side thread, I
suppose.


> > So I see "%e" as a shortcut for, say, "%3a" (number of annotations
> > of severity 3), which is no problem imo. "%na" is the thing that could
> > be implemented later...
>
> But the problem I see here is that the "unknown" annotations can't
> really be specified in the format string and will therefore not be
> shown.
>

...unless he sets flymake-mode-line-indicator-format buffer-locally
or globally or something.

And to be clear, he may not see them _summarized_ in the mode line,
which is not the same as saying he is not seeing them.

I think using non-standard severities should be possible
(that's why I added them), but reasonably rare, so I think the extra effort
of
changing flymake-mode-line-indicator-format for those cases is in
proportion.

But read to the end of the mail for another idea.

it doesn't allow the user to change the order of the annotations
> individually, but I don't think that's really needed, either...


On the contrary, I think this is what is requested. Not only change
the order,  but the display paraphernalia around it, for mode-line
loving users.

There is something that we might be forgetting, and which might bridge the
gap between our views.

Currently, notes (diagnostics of severity 1) are only shown in the mode-line
summary if they total >= 0. This is hardcoded, but the behaviour should be
configurable, too.

So, along with "%e" we should probably have something like "%!e". The
former would mean "replace with number of errors if this number is greater
than 0", the latter being "replace with number of errors, even if 0".

The default value for the proposed defcustom would be

"Flymake[%!e %!w %n]"

which mirrors the current behaviour. Now, supposing there are some
new annotations with arbitrary severities, we could use the non-! form
to include them and keep the default value working. Maybe "%>e"
could mean "put all annotations more severe than 3 here".  Or something
like that.

We should also do something about whitespace.  I lean towards
somehow(TM) munching whitespace so that "Flymake[%!e %!w %n]"
becomes "Flymake[42 42<no whitespace here>]" if there are 0 notes.

Hope this isn't becoming very complicated.

João.
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 139 days ago.

Previous Next


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