From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#33740: [PATCH] Customizable flymake mode-line indicator Date: Sat, 21 Sep 2019 09:54:13 +0200 Message-ID: <877e622ifu.fsf@gnus.org> References: <87bm4wjhgy.fsf@gmail.com> <87h85bq3u7.fsf@gnus.org> <87lfullo2r.fsf@gnus.org> <877e64jnwl.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="84030"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33740@debbugs.gnu.org, Andrii Kolomoiets To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 21 09:55:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iBaEc-000Lkr-Pk for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Sep 2019 09:55:14 +0200 Original-Received: from localhost ([::1]:39992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBaEb-00049N-Mu for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Sep 2019 03:55:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33399) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBaEU-000493-4h for bug-gnu-emacs@gnu.org; Sat, 21 Sep 2019 03:55:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBaES-0002Kh-4m for bug-gnu-emacs@gnu.org; Sat, 21 Sep 2019 03:55:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50182) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBaEP-0002JE-VZ for bug-gnu-emacs@gnu.org; Sat, 21 Sep 2019 03:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iBaEP-0004v8-Pn for bug-gnu-emacs@gnu.org; Sat, 21 Sep 2019 03:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Sep 2019 07:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33740 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33740-submit@debbugs.gnu.org id=B33740.156905246118861 (code B ref 33740); Sat, 21 Sep 2019 07:55:01 +0000 Original-Received: (at 33740) by debbugs.gnu.org; 21 Sep 2019 07:54:21 +0000 Original-Received: from localhost ([127.0.0.1]:59003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBaDl-0004u9-5H for submit@debbugs.gnu.org; Sat, 21 Sep 2019 03:54:21 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:48368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iBaDj-0004u0-LG for 33740@debbugs.gnu.org; Sat, 21 Sep 2019 03:54:20 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iBaDe-0007hd-JF; Sat, 21 Sep 2019 09:54:18 +0200 In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Fri, 20 Sep 2019 14:07:30 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166841 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > On Thu, Sep 19, 2019 at 4:39 PM Lars Ingebrigtsen 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 sup= pose.=20 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-l= ine > summary if they total >=3D 0. This is hardcoded, but the behaviour should= be > configurable, too. > > So, along with "%e" we should probably have something like "%!e". The=20 > former would mean "replace with number of errors if this number is greate= r=20 > 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"=20 > 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=20 > somehow(TM) munching whitespace so that "Flymake[%!e %!w %n]" > becomes "Flymake[42 42]" if there are 0 notes. > > Hope this isn't becoming very complicated. Only slightly. :-) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no