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

From: João Távora <[email-masked]>
Date: Tue, 29 Dec 2020 14:18:29 +0000

Lars Ingebrigtsen <[email-masked]> writes:

> Lars Ingebrigtsen <[email-masked]> writes:
>
>> I've now altered format-spec to (optionally) return a list of strings,
>> which makes the previously proposed patch work, so I've now pushed it
>> (after rebasing it).  It seems to work fine in my test cases, but it
>> hasn't been tested extensively.
>
> (João, if you could have a look over the resulting code change (which is
> mostly just indentation changes, but also changes a lot of the quoting),
> that'd be nice.)

I've just reverted the patch: it is seriously flawed.  I don't know if
"format-spec" allows this, but the previous indicators semantics were to
omit some counters (notably the notes counter) completely if the count
was 0.  This is why when opening the *scratch* buffer, which has 0
notes, the function you touched now exits non-locally with an error.

I'm not sure you've taken these details into account, and they're quite
an important feature that I don't think we can afford to lose.

So better put the patch in a side branch and decide if we want to
overhaul format-spec to allow for these things, or maybe just use the
more powerful existing mode-line language for this, perhaps breaking up
that big function into well-behaved pieces that users can compose.

Thanks,
João