From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#64424: [PATCH] Include a help-echo for flymake's modeline counters Date: Sun, 02 Jul 2023 16:12:06 +0000 (UTC) Message-ID: <873526i97u.fsf@catern.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15212"; mail-complaints-to="usenet@ciao.gmane.io" To: 64424@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 02 18:13:26 2023 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 1qFzhV-0003kH-GM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jul 2023 18:13:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFzhB-0001Fy-Ib; Sun, 02 Jul 2023 12:13:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFzh8-0001FY-Bi for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 12:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFzh8-000336-2u for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 12:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFzh7-00080t-ON for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 12:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jul 2023 16:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64424 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168831433830740 (code B ref -1); Sun, 02 Jul 2023 16:13:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Jul 2023 16:12:18 +0000 Original-Received: from localhost ([127.0.0.1]:60939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFzgP-0007zj-JY for submit@debbugs.gnu.org; Sun, 02 Jul 2023 12:12:17 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFzgM-0007zY-Dd for submit@debbugs.gnu.org; Sun, 02 Jul 2023 12:12:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFzgM-00016Z-0W for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 12:12:14 -0400 Original-Received: from s.wrqvtbkv.outbound-mail.sendgrid.net ([149.72.123.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFzgH-0002xw-Do for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 12:12:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:mime-version:to:content-type:cc:content-type:from: subject:to; s=s1; bh=XiqYjdDhNtLev5h2gSAUsULT2HvNn666ZrbbS424ccc=; b=fV1VWKdM6LCeUZqz0gIfMnpcMJfiqvCYX6VWizG4YNVZ3tgz3wJnd4+1xcpVBLwVZ6jM ROXB8Wa3U+sZmAHTTGsFGx33KBKlo8uHRwSbGsvKl6OnpD7vbahakeufDL1XTRJpARu73J Y3MiOKL8xXkYozSMRMsFSbsDt5tzmG+hxGL/3+bacKRREx4ysH7G1kMIukQ5IBf83jzts3 kB0IWLl0ekHJ9j6ueBZf5rUavKx62khNQ/LxN5pTy174nuNQO3xheh0fzqSPDSJxJiT/UB NPVgCGHRQoCCagiW0HYOGP0JN89+enPz6mzodZ0Ec7LZ2D6zjAw4mYYaLVsnTaUQ== Original-Received: by filterdrecv-66949dbc98-4lpsw with SMTP id filterdrecv-66949dbc98-4lpsw-1-64A1A1D6-20 2023-07-02 16:12:06.680296971 +0000 UTC m=+4552339.957439589 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-26 (SG) with ESMTP id Od1qFZaRQ1ughb3YHVwZMw for ; Sun, 02 Jul 2023 16:12:06.565 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver= Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 097F460087 for ; Sun, 2 Jul 2023 12:12:05 -0400 (EDT) X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbLeTrQ+l/WizRK9J2QWp3zl5jRh2SuqU+k6r7K/ON4yrkZ7fY/a/+O6pfffYas4nJ59IUfug9MwUOcD4qxiwDb+/ChDtLCtPvEsHQjWuBSyKTb4J+++ikI9qKkoybBodCeTy3fcwBhsIJUn1MXQLL9LbvQwChZk4CyKrhPLkO3S7g== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Received-SPF: pass client-ip=149.72.123.24; envelope-from=bounces+21787432-3678-bug-gnu-emacs=gnu.org@em8926.catern.com; helo=s.wrqvtbkv.outbound-mail.sendgrid.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264491 Archived-At: --=-=-= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Tags: patch This helps clarify what each of these numbers mean. This is inspired by compilation-mode-line-errors which does the same. * lisp/progmodes/flymake.el (flymake--mode-line-counter): Add help-echo to mode line properties. In GNU Emacs 29.0.92 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2023-07-01 built on earth Repository revision: b179926388ee76f7b3304535a7189f89bd7c7f8c Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: NixOS 22.11 (Raccoon) Configured using: 'configure --with-x-toolkit=lucid --with-tree-sitter CC=gcc' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Include-a-help-echo-for-flymake-s-modeline-counters.patch >From aa577647a91c295fedcff4c1357ebb1f6c0d1384 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Sun, 2 Jul 2023 12:11:09 -0400 Subject: [PATCH] Include a help-echo for flymake's modeline counters This helps clarify what each of these numbers mean. This is inspired by compilation-mode-line-errors which does the same. * lisp/progmodes/flymake.el (flymake--mode-line-counter): Add help-echo to mode line properties. --- lisp/progmodes/flymake.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 6f293acca5e..47dc32f9245 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1473,6 +1473,12 @@ flymake--mode-line-counter ,(format "%d" count) face ,face mouse-face mode-line-highlight + help-echo ,(format "Number of %s; scroll mouse to view." + (cond + ((eq type :error) "errors") + ((eq type :warning) "warnings") + ((eq type :note) "notes") + (t (format "%s diagnostics" type)))) keymap ,(let ((map (make-sparse-keymap))) (define-key map (vector 'mode-line -- 2.40.1 --=-=-=--