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 #77 received at 33740 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 33740 <at> debbugs.gnu.org, Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Subject: Re: bug#33740: [PATCH] Customizable flymake mode-line indicator
Date: Sat, 21 Sep 2019 09:54:13 +0200
João Távora <joaotavora <at> gmail.com> writes:

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

Yes, and it doesn't seem like looks very positively on the possibility
of allowing the minor mode lighters of being strings with text
properties, so my suggested rewrite is a no-go.  But if we move the
status from the minor mode lighter to mode-line-process, then it'd
work...  And perhaps that's a more logical place, anyway?

> 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]"

`format-spec' doesn't allow two-character specs, but %E/%e would work...

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

Having a spec for "all the rest of the annotations" is possible, but
seems a bit odd, interface wise...

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

Only slightly.  :-)

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




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.