From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.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: Tue, 29 Dec 2020 14:18:29 +0000 Message-ID: <87tus4g0ga.fsf@gmail.com> References: <87bm4wjhgy.fsf@gmail.com> <87lfdhgy2p.fsf@gnus.org> <87bledgxql.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29728"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 33740@debbugs.gnu.org, Andrii Kolomoiets To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 29 15:19:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kuFqC-0007di-Eh for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 15:19:12 +0100 Original-Received: from localhost ([::1]:42704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuFqB-0004kf-HH for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Dec 2020 09:19:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuFq2-0004kT-Tn for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 09:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kuFq2-0003SE-Mq for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 09:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kuFq2-00051D-HJ for bug-gnu-emacs@gnu.org; Tue, 29 Dec 2020 09:19:02 -0500 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: Tue, 29 Dec 2020 14:19: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: fixed patch Original-Received: via spool by 33740-submit@debbugs.gnu.org id=B33740.160925152319260 (code B ref 33740); Tue, 29 Dec 2020 14:19:02 +0000 Original-Received: (at 33740) by debbugs.gnu.org; 29 Dec 2020 14:18:43 +0000 Original-Received: from localhost ([127.0.0.1]:38075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuFpi-00050a-QV for submit@debbugs.gnu.org; Tue, 29 Dec 2020 09:18:43 -0500 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:35045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kuFpd-00050K-Vr for 33740@debbugs.gnu.org; Tue, 29 Dec 2020 09:18:41 -0500 Original-Received: by mail-wr1-f52.google.com with SMTP id r3so14799769wrt.2 for <33740@debbugs.gnu.org>; Tue, 29 Dec 2020 06:18:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=rZDJLQQx8CZBY4tzLbV8n3hkV0GuVUfroCxcB0tvOHI=; b=WIeunH591sR8Q46XoCkAQVmbQz+meoUn45bkJi482RkSAq5/z2jzoThP+ZMrLghnln SgJlfO5i8WQKzx8SlghSo1Ee5aqDKXmuLLlctOWAyxISu3f7oRIvnGmLfQvJC40Tb/Qv j+Em01QIp+iSVLECSqFI/QluawuLfE0DD96cR54qpglhkxzx+jvC9d1l6BgdKjNDHak7 5A7x3uqDFfDVB9JOvIQTmbTwqWU9jQE2UtDEhOlSl3TKaksim4xr06V/K6cwLf1RhwAZ y1GNbLSA/iq51Rw3/dCdc3PKmycB9OG1sK2LxiVgRhqmKGueg0FllmaKS9T4VIEscgeZ Kbxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=rZDJLQQx8CZBY4tzLbV8n3hkV0GuVUfroCxcB0tvOHI=; b=OGHhkbAvI2cAX41b1PYzI7TPGKRjcuBhTEUXkzb8nXybKJqc0J5SWgVR2RFvSqkecs n7V37GWKK9IlCZCTqbVz3azpUYVh1GF1aLa04Zma4hgEU9D2prRTeoc+5uyF3XbP9cjW Q8861hLy9+mwZSDQNBdrpmqwD4dZPFPlYOTU12a380JMp0be3TE+W87vc4FwaKiDqTXN w+SoJsQ002ylP8EF1XoCxyXlCSOxAO5qRj/YWgFednshhd07TiQpiFGvChu497E1o5nP m9pLD/bIROMJc91LJaqYU1wXqfOJyJmQ1IGDKtJOW7Hf1rqIpm/uhHHDaU5kEtyl877q VkTg== X-Gm-Message-State: AOAM53356de5N5Tggs+rCuqiKFz+RfO+CztpR7+C0KAj9naayHVLECV7 ArAbqfR0bCxZgT2xOX3SCYw= X-Google-Smtp-Source: ABdhPJymvQXBQz6tU4xLyL1gDNhEitlXcA/Skq1tOv6EaIfUiCC/yy/5J7h3+++UcEFVJHmFvw0g+g== X-Received: by 2002:a05:6000:cc:: with SMTP id q12mr57198316wrx.335.1609251512113; Tue, 29 Dec 2020 06:18:32 -0800 (PST) Original-Received: from krug (222.201.137.78.rev.vodafone.pt. [78.137.201.222]) by smtp.gmail.com with ESMTPSA id r2sm61278190wrn.83.2020.12.29.06.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Dec 2020 06:18:31 -0800 (PST) In-Reply-To: <87bledgxql.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 29 Dec 2020 03:19:30 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196931 Archived-At: Lars Ingebrigtsen writes: > Lars Ingebrigtsen 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=C3=A3o, if you could have a look over the resulting code change (whic= h 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=C3=A3o