bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33740: [PATCH] Customizable flymake mode-line indicator


From: Lars Ingebrigtsen
Subject: bug#33740: [PATCH] Customizable flymake mode-line indicator
Date: Thu, 19 Sep 2019 17:39:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

João Távora <joaotavora@gmail.com> writes:

>  Well, it doesn't quite work yet, so it's a bit premature.  :-)
>
> I see, what's wrong with it? 

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.

> But flymake can work with annotations of arbitrary severities with some 
> user-specified meaning. Hence errors, warnings, notes etc are just
> annotations of severities 3, 2, 1, respectively. This was tied to 
> warning-numeric-level, which predates flymake.

Right, I see.  

> 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.

If we have

(defvar flymake-mode-line-indicator-format " Flymake%s[%e %w %n]")

then we've enumerated all the annotations the user will ever see, and
new ones won't appear.

So I think specifying it on this detailed level isn't the path to go,
but instead we'll have

(defvar flymake-mode-line-indicator-format " Flymake%s[%a]")

where "%a" is "all the annotations".  I think that's flexible enough --
it doesn't allow the user to change the order of the annotations
individually, but I don't think that's really needed, either...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]