From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#33740: [PATCH] Customizable flymake mode-line indicator Date: Wed, 18 Sep 2019 14:59:08 +0100 Message-ID: References: <87bm4wjhgy.fsf@gmail.com> <87h85bq3u7.fsf@gnus.org> <87lfullo2r.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000515a990592d43e3b" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="79799"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 33740@debbugs.gnu.org, Andrii Kolomoiets To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 18 16:01:21 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 1iAaWH-000KSR-Cy for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Sep 2019 16:01:21 +0200 Original-Received: from localhost ([::1]:59366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAaWF-00065m-Vf for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Sep 2019 10:01:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36948) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAaV3-0005Pd-Lv for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2019 10:00:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAaV2-00050W-8O for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2019 10:00:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iAaV2-00050H-0y for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2019 10:00:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iAaV0-0002Wi-5a for bug-gnu-emacs@gnu.org; Wed, 18 Sep 2019 10:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Sep 2019 14:00:02 +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.15688151709638 (code B ref 33740); Wed, 18 Sep 2019 14:00:02 +0000 Original-Received: (at 33740) by debbugs.gnu.org; 18 Sep 2019 13:59:30 +0000 Original-Received: from localhost ([127.0.0.1]:54671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAaUT-0002VN-Ju for submit@debbugs.gnu.org; Wed, 18 Sep 2019 09:59:30 -0400 Original-Received: from mail-io1-f51.google.com ([209.85.166.51]:37597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iAaUP-0002V3-HX for 33740@debbugs.gnu.org; Wed, 18 Sep 2019 09:59:26 -0400 Original-Received: by mail-io1-f51.google.com with SMTP id b19so16408780iob.4 for <33740@debbugs.gnu.org>; Wed, 18 Sep 2019 06:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E0Yb62viBahwNBZLB4RUWmQwwFTIB4HUygLjdsDL6nc=; b=Ne5kaz4KehF/2ZiZdxvijC4P1bJc+oiD9i+mWaNCKywMjw+Q6FYV/r3f7Sz6j1P/OM swCTRs5zHtet0+tMQ5RVTfve8P3AttcVHhBCHzs7K+ItGnOgOmP2UhTLVnaHSL9FEZXE VoecxQsjeLzuTs6HH3xH+d3OQTaeOdXGY+RoI9IN5pWD5duCTaEhDohfXxMzheOhRuS+ Mz2FEI48NCxJF80kW0F8WP9HmSgPo+skHrN/Rt1ftpeYm3tTgUmL23R5xEbEvGnhA4MS OQGcEsl2MYWBZa+qw4qcrUw901C67xqp7AYNgI9GdW0/6hY2ZyxT+EccbWqkwJz0uJGn baNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E0Yb62viBahwNBZLB4RUWmQwwFTIB4HUygLjdsDL6nc=; b=XtB6Nvf5E86oV7NoJbO7cQxSSxObCVpbGyPf2VO0CvdvgpMGQffj2VJNLdBUyJfhqg MIwy9B2go0iBAJTlXplUx1I2+7Ost6I+VZAF39EPF/Ug53W3sAKGLoQyGjtLG2WTTQ5q qs6DWK5qzCOq7SARZEn8183QUEmRB7EXfp5gsfiGKR/cR3gZGmH9SV/of5mJV8bIUbJK 2fQhyu/ERPlQln4HqzYgC/G/C3lU8hPW8lFxrWObn4+kU5yY0BS7+qujjF+D8kFMXC77 2TRBqKQjpd54IBOAbL8VhdTVYb08wcGF3HtJYq5NvFDRfl1hiK5dhG5bf5CsobwfK3Dv 8aUA== X-Gm-Message-State: APjAAAUD4P31/vXMhqiFSbGSbtLV0t8nn5Zq5+qZ23NKGMcC9yCXpC6K brXLCeDF/77QPoFaCkzX9cJOv/x5boYLdH2WH0o= X-Google-Smtp-Source: APXvYqwvShcYcEXukGU7Q3MaYDHC6dmkqGVi/6BKPfbzMK8DWfKUuETDhBHl35pWmrLwbqdmbReFjrLRQv01ByceqPQ= X-Received: by 2002:a6b:b643:: with SMTP id g64mr5056034iof.149.1568815159792; Wed, 18 Sep 2019 06:59:19 -0700 (PDT) In-Reply-To: <87lfullo2r.fsf@gnus.org> 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:166678 Archived-At: --000000000000515a990592d43e3b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Sep 18, 2019 at 2:40 PM Lars Ingebrigtsen wrote: > Jo=C3=A3o T=C3=A1vora writes: > > > Thanks, Lars. I'm away from my emacs dev machine so I can't read the > > diff very carefully, but if you want to risk it, go ahead and push, > > because I like the defcustom spec and I see you've kept the default. A > > short entry in NEWS and the Flymake manual is probably worth it (but > > you can skip the latter). > > Well, it doesn't quite work yet, so it's a bit premature. :-) > I see, what's wrong with it? > > There are arbitrary errors levels in this flymake (not just error > warning > > and note). But those are the main ones and anyway we can always > > add more format machinery later. > > Hm, is there a list of all the error levels? If not, I think the > approach I took in the patch is probably misguided (what with %e for > "error" and stuff). > There isn't a list of error levels, there are just severities. There are some built-in flymake _categories_ linked to the symbols :error, :warning and :note that connect these symbols with some preset severity. 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. 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... > > I see a lot of changed lines, but most of them are probably whitespace. > > Yes, it's mostly whitespace due to rearranging the way the strings are > computed. > > > Is there some diff format which elides those? > > I'm not sure? > I think git diff -w does something to that effect. Jo=C3=A3o T=C3=A1vora --000000000000515a990592d43e3b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Sep 18, 2019 at 2:40 PM Lars Inge= brigtsen <larsi@gnus.org> wrote= :
Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> writes:

> Thanks, Lars.=C2=A0 I'm away from my emacs dev machine so I can= 9;t read the
> diff very carefully, but if you want to risk it, go ahead and push, > because I like the defcustom spec and I see you've kept the defaul= t. A
> short entry in NEWS and the Flymake manual is probably worth it (but > you can skip the latter).

Well, it doesn't quite work yet, so it's a bit premature.=C2=A0 :-)=

I see, what's wrong with it?
<= /div>
=C2=A0
> There are arbitrary errors levels in this flymake (not just error warn= ing
> and note). But those are the main ones and anyway we can always
> add more format machinery later.

Hm, is there a list of all the error levels?=C2=A0 If not, I think the
approach I took in the patch is probably misguided (what with %e for
"error" and stuff).=C2=A0

Th= ere isn't a list of error levels, there are just severities. There are<= /div>
some built-in flymake _categories_ linked to the symbols :error, = :warning and
:note that connect these symbols with some preset se= verity.

But flymake can work with annotations of a= rbitrary 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.

So I see "%e" a= s a shortcut for, say, "%3a" (number of annotations
of severity 3), which is no problem imo. "%na" is the thing tha= t could
be implemented later...
=C2=A0
> I see a lot of changed lines, but most of them are probably whitespace= .

Yes, it's mostly whitespace due to rearranging the way the strings are<= br> computed.

> Is there some diff format which elides those?

I'm not sure?

I think git diff -w d= oes something to that effect.

Jo=C3=A3o T=C3=A1vora
--000000000000515a990592d43e3b--