From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 02 17:51:14 2023 Received: (at submit) by debbugs.gnu.org; 2 Jul 2023 21:51:14 +0000 Received: from localhost ([127.0.0.1]:32853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qG4yP-0002bd-Lc for submit@debbugs.gnu.org; Sun, 02 Jul 2023 17:51:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:46938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qG4yK-0002bO-CL for submit@debbugs.gnu.org; Sun, 02 Jul 2023 17:51:11 -0400 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 1qG4yJ-0002a2-AX for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 17:51:08 -0400 Received: from s.wrqvtzvf.outbound-mail.sendgrid.net ([149.72.126.143]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qG4yG-0000JE-8J for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 17:51:07 -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=GctElYPMDpr3ri+FyzH7tIE/9oQSmfVHCg0SbMOdv04=; b=tZEuwDgO2stsrYyPGOix/zhuJwfHyyBvWPusla+RmSyjh2I/eEw5rSS+ZLFve5nNVupU VsYcbP1iQTuA8eakQkH5CdzQc6Ka0+H567ErIveDvseaYu+Cy5l5ck/WXipv30GnMP3La/ KkXsvwlg81yUAYJeM7vEg5IAG2br+TkKRqiYVsUw4OtyOg5Rr9Nm3J4eBXFePrNAKCC88a TeaZO+qoXtS5d/UYfvczAJJgshM4c//AGSNYm385nDVIZfhMyDt0VIEMprGiaJ1+UvU+f+ MAmzldYz9z0BBpzC7hD+XNhEHhqmhYmCOP6B75EwyBSkPTIWt+GjOStp4H6m7bxA== Received: by filterdrecv-8684c58db7-wf85l with SMTP id filterdrecv-8684c58db7-wf85l-1-64A1F145-17 2023-07-02 21:51:01.804762041 +0000 UTC m=+4572768.611346685 Received: from earth.catern.com (unknown) by geopod-ismtpd-30 (SG) with ESMTP id iSZgfaLCRD23zcAsWcDOBQ for ; Sun, 02 Jul 2023 21:51:01.612 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=gnu.org Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 155186001E for ; Sun, 2 Jul 2023 17:51:00 -0400 (EDT) From: sbaugh@catern.com Subject: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode Date: Sun, 02 Jul 2023 21:51:01 +0000 (UTC) Message-ID: <87zg4eq8xn.fsf@catern.com> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?ZgbRq7gjGrt0q=2FPjvxk7wM0yQFRdOkTJAtEbkjCkHbKGk3oyiVrTz2yiiCxopT?= =?us-ascii?Q?WGlSlisWiCVCI3GurRyFYYdc0ShTVKjL=2FVztCDE?= =?us-ascii?Q?wjXZvrs6KV=2Fkcszzv0ek5o8PdwzXoVQIPQ3OWqR?= =?us-ascii?Q?vE3PBnIhkARm1phkYFXtvEB9DfYI2182ikoj1=2FO?= =?us-ascii?Q?mpnlE=2FuBfCUcUhy4XD3UODUvvQwk7MuBNFw=3D=3D?= To: bug-gnu-emacs@gnu.org X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=149.72.126.143; envelope-from=bounces+21787432-3678-bug-gnu-emacs=gnu.org@em8926.catern.com; helo=s.wrqvtzvf.outbound-mail.sendgrid.net X-Spam_score_int: -7 X-Spam_score: -0.8 X-Spam_bar: / X-Spam_report: (-0.8 / 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_BL_SPAMCOP_NET=1.347, 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=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.1 (-) --=-=-= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Tags: patch This patch is based on the patch in bug#64425 (since I noticed this unrelated issue while working on that, and they touch the same code). When pixel-scroll-precision-mode is enabled, scrolling the mouse wheel will yield wheel-{up,down} events. flymake now binds the new events in addition to the old mouse-wheel-{up,down}-event. * lisp/progmodes/flymake.el:(flymake--mode-line-counter-scroll-prev, flymake--mode-line-counter-scroll-next, flymake--mode-line-counter-map): Add. (flymake--mode-line-counter): Use new keymap and include 'type as a property in the mode-line. In GNU Emacs 29.0.92 (build 8, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2023-07-02 built on earth Repository revision: c361966508e2da159b5e65c37dff7f78e87b3445 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: NixOS 23.05 (Stoat) Configured using: 'configure --with-x-toolkit=lucid --with-tree-sitter --with-xinput2' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Fix-flymake-mode-line-scrolling-with-pixel-scroll-pr.patch >From ead790ca0525472ed52314b8bab67e7d246cda4e Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Sun, 2 Jul 2023 17:49:23 -0400 Subject: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode When pixel-scroll-precision-mode is enabled, scrolling the mouse wheel will yield wheel-{up,down} events. flymake now binds the new events in addition to the old mouse-wheel-{up,down}-event. * lisp/progmodes/flymake.el:(flymake--mode-line-counter-scroll-prev, flymake--mode-line-counter-scroll-next, flymake--mode-line-counter-map): Add. (flymake--mode-line-counter): Use new keymap and include 'type as a property in the mode-line. --- lisp/progmodes/flymake.el | 43 +++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 47dc32f9245..a424b0b6c8d 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1449,6 +1449,32 @@ flymake--mode-line-exception (defun flymake--mode-line-counters () (when (flymake-running-backends) flymake-mode-line-counter-format)) +(defun flymake--mode-line-counter-scroll-prev (event) + (interactive "e") + (let* ((posn-string (posn-string (event-start event))) + (type (get-text-property (cdr posn-string) 'type (car posn-string)))) + (with-selected-window (posn-window (event-start event)) + (flymake-goto-prev-error 1 (list type) t)))) + +(defun flymake--mode-line-counter-scroll-next (event) + (interactive "e") + (let* ((posn-string (posn-string (event-start event))) + (type (get-text-property (cdr posn-string) 'type (car posn-string)))) + (with-selected-window (posn-window (event-start event)) + (flymake-goto-next-error 1 (list type) t)))) + +(setq flymake--mode-line-counter-map + (let ((map (make-sparse-keymap))) + (define-key map (vector 'mode-line mouse-wheel-down-event) + #'flymake--mode-line-counter-scroll-prev) + (define-key map [mode-line wheel-down] + #'flymake--mode-line-counter-scroll-prev) + (define-key map (vector 'mode-line mouse-wheel-up-event) + #'flymake--mode-line-counter-scroll-next) + (define-key map [mode-line wheel-up] + #'flymake--mode-line-counter-scroll-next) + map)) + (defun flymake--mode-line-counter (type &optional no-space) "Compute number of diagnostics in buffer with TYPE's severity. TYPE is usually keyword `:error', `:warning' or `:note'." @@ -1479,21 +1505,8 @@ flymake--mode-line-counter ((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 - mouse-wheel-down-event) - (lambda (event) - (interactive "e") - (with-selected-window (posn-window (event-start event)) - (flymake-goto-prev-error 1 (list type) t)))) - (define-key map (vector 'mode-line - mouse-wheel-up-event) - (lambda (event) - (interactive "e") - (with-selected-window (posn-window (event-start event)) - (flymake-goto-next-error 1 (list type) t)))) - map)))))) + type ,type + keymap ,flymake--mode-line-counter-map))))) ;;; Per-buffer diagnostic listing -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 06 03:37:28 2023 Received: (at 64428) by debbugs.gnu.org; 6 Jul 2023 07:37:28 +0000 Received: from localhost ([127.0.0.1]:39478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHJYK-0004TE-Uc for submit@debbugs.gnu.org; Thu, 06 Jul 2023 03:37:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHJYF-0004Sw-HL for 64428@debbugs.gnu.org; Thu, 06 Jul 2023 03:37:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHJY4-0003Ds-9X; Thu, 06 Jul 2023 03:37:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=p//noDIXI3FAYevvf4tPFCTot0iRfB5FZiWgB/mt+J4=; b=WE0ogANY+GTH I+r1v1y9SgYNLZOmAMxKhZLCE+/MgsrQf4lsLQAlKsMsdd/gkeiHJiR2zFWoIOOaYANMAN5B5fBpD BrO0ZPPALoOWyO/tq20qED+SBqCnM/SUNZ3yopn3lF/piYv0hnxAUVeriOp1sInQv7PDUjkNacWpm UW0UcSA7EJcXYi7O0RpKRSwDGRP9jh8ffeF6dx0ROkec+dflI/3DZNEVSqTXh4EnJgUXxFkYwx1Ku cIv9P9Rze10lMmf+f9oQQNGJYR6WGG4S6aF76aLPWlqUSZ7oftFBfw9MzUkDVhvexKEg6qn1iPvjz WcpiAEziALeq+sSnF0skVw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHJY3-0001JU-NF; Thu, 06 Jul 2023 03:37:08 -0400 Date: Thu, 06 Jul 2023 10:37:07 +0300 Message-Id: <83ilaxij8c.fsf@gnu.org> From: Eli Zaretskii To: sbaugh@catern.com In-Reply-To: <87zg4eq8xn.fsf@catern.com> (sbaugh@catern.com) Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode References: <87zg4eq8xn.fsf@catern.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64428 Cc: 64428@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: sbaugh@catern.com > Date: Sun, 02 Jul 2023 21:51:01 +0000 (UTC) > > This patch is based on the patch in bug#64425 (since I noticed this > unrelated issue while working on that, and they touch the same code). > > > > When pixel-scroll-precision-mode is enabled, scrolling the mouse wheel > will yield wheel-{up,down} events. flymake now binds the new events > in addition to the old mouse-wheel-{up,down}-event. > > * lisp/progmodes/flymake.el:(flymake--mode-line-counter-scroll-prev, > flymake--mode-line-counter-scroll-next, > flymake--mode-line-counter-map): Add. > (flymake--mode-line-counter): Use new keymap and include 'type as a > property in the mode-line. Thanks. Any reason you couldn't simply add more events to the existing code? From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 06 09:16:55 2023 Received: (at 64428) by debbugs.gnu.org; 6 Jul 2023 13:16:55 +0000 Received: from localhost ([127.0.0.1]:40390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHOqp-000831-7Q for submit@debbugs.gnu.org; Thu, 06 Jul 2023 09:16:55 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:37961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHOqk-00082l-4Z for 64428@debbugs.gnu.org; Thu, 06 Jul 2023 09:16:50 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode In-Reply-To: <83ilaxij8c.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 06 Jul 2023 10:37:07 +0300") References: <87zg4eq8xn.fsf@catern.com> <83ilaxij8c.fsf@gnu.org> Date: Thu, 06 Jul 2023 09:16:41 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64428 Cc: sbaugh@catern.com, 64428@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: sbaugh@catern.com >> Date: Sun, 02 Jul 2023 21:51:01 +0000 (UTC) >> >> This patch is based on the patch in bug#64425 (since I noticed this >> unrelated issue while working on that, and they touch the same code). >> >> >> >> When pixel-scroll-precision-mode is enabled, scrolling the mouse wheel >> will yield wheel-{up,down} events. flymake now binds the new events >> in addition to the old mouse-wheel-{up,down}-event. >> >> * lisp/progmodes/flymake.el:(flymake--mode-line-counter-scroll-prev, >> flymake--mode-line-counter-scroll-next, >> flymake--mode-line-counter-map): Add. >> (flymake--mode-line-counter): Use new keymap and include 'type as a >> property in the mode-line. > > Thanks. Any reason you couldn't simply add more events to the > existing code? Two reasons: 1. I initially did that but it made the code uglier. Also, this code is run every time the mode-line is updated, and adding more of that seems bad. 2. This makes describe-key work better and makes it possible for users to configure the scroll direction or add more bindings for different things. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 06 10:04:59 2023 Received: (at 64428) by debbugs.gnu.org; 6 Jul 2023 14:04:59 +0000 Received: from localhost ([127.0.0.1]:41659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHPbL-0001Fi-RC for submit@debbugs.gnu.org; Thu, 06 Jul 2023 10:04:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHPbH-0001FQ-Ih for 64428@debbugs.gnu.org; Thu, 06 Jul 2023 10:04:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHPb5-0007V5-Tj; Thu, 06 Jul 2023 10:04:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=s+TfYpOFTqyzdnt5qTUGTAWvZIk9QI0WpvWE8rzQ/bs=; b=dVoXXilvDMFnLASmqBkw 2Gl9CEit3mm+/toyr8if4R2RYTitJWBZ6wJF87KH8HtBjHwgHBOxWEqoHGEhLzHvE/1FrBnSGamuJ 7SpszMvxhoT5PBENSw3ZSiaAReA2rWrt2iPQhYvdgJQkwMpWqKN1Dpqk6/LAwMQYLRN6aKLjt4j77 BhhupisB6xkvkKfjzCuHI1kvuuy3Sk2dlSLz6++aljIqlSS2D+9OiHqtysMmNTRCdVxmKjUgYP2vO s1Eay1c+XzMM7pSWrNl0ayqMvfjmiTXAIMCx4XcnL3Qz6oUcEGlm+0qBFnP1HHlxmTyk9twJ22M5m jFrFt9a1jiONeA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHPb5-0001iu-Dr; Thu, 06 Jul 2023 10:04:39 -0400 Date: Thu, 06 Jul 2023 17:04:39 +0300 Message-Id: <833521i1ag.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh , =?iso-8859-1?Q?Jo=E3o_T=E1vora?= In-Reply-To: (message from Spencer Baugh on Thu, 06 Jul 2023 09:16:41 -0400) Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode References: <87zg4eq8xn.fsf@catern.com> <83ilaxij8c.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64428 Cc: sbaugh@catern.com, 64428@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Spencer Baugh > Cc: sbaugh@catern.com, 64428@debbugs.gnu.org > Date: Thu, 06 Jul 2023 09:16:41 -0400 > > Eli Zaretskii writes: > > >> * lisp/progmodes/flymake.el:(flymake--mode-line-counter-scroll-prev, > >> flymake--mode-line-counter-scroll-next, > >> flymake--mode-line-counter-map): Add. > >> (flymake--mode-line-counter): Use new keymap and include 'type as a > >> property in the mode-line. > > > > Thanks. Any reason you couldn't simply add more events to the > > existing code? > > Two reasons: > > 1. I initially did that but it made the code uglier. Also, this code is > run every time the mode-line is updated, and adding more of that seems > bad. > > 2. This makes describe-key work better and makes it possible for users > to configure the scroll direction or add more bindings for different > things. This means your changeset is actually two different loosely-related changes. The one that refactors the original code needs approval from Joćo (CC'ed). Once Joćo is happy with that refactoring, I'm okay with adding the extra events to it. From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 07 07:38:18 2023 Received: (at 64428) by debbugs.gnu.org; 7 Jul 2023 11:38:18 +0000 Received: from localhost ([127.0.0.1]:42684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHjmy-0001cX-B6 for submit@debbugs.gnu.org; Fri, 07 Jul 2023 07:38:18 -0400 Received: from mail-oo1-f54.google.com ([209.85.161.54]:47593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHjmj-0001bq-IL for 64428@debbugs.gnu.org; Fri, 07 Jul 2023 07:38:15 -0400 Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-558a79941c6so1247739eaf.3 for <64428@debbugs.gnu.org>; Fri, 07 Jul 2023 04:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688729876; x=1691321876; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VucNqITgwjW5avN4duLBawwGl8RFhb6aHTL6ufkhB18=; b=X9rehElB9UySeZP3sh0Hot5SuejnYJZXw654W5I2tb+aM8FJ6ISYJBpdldYx2dI4kw H7Y9M5L8ms2nu3k7vNTHCML37MyumVC/Hg3BdtJ673SC4LrsiWU68DoykSvyIA5amgOB 4tSEGteMNRBqzjujcZHZ5yPSvexmqguDurckt4qZ455K7ESMVzGpfDoANDhrbXhqgna8 786dE4hTrDrRm4c7wi5gX7T5JnCTw9CtoCx39bWwESrpFSxMplGKhFDtNWUUW9OzYR9o /wg49CxMVy7/IGp86Vt+YXMl+8KVBeaIkOlvT1yu4aNg0zCuU8Of9ntfU+6yR+pgRrZw Swng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688729876; x=1691321876; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VucNqITgwjW5avN4duLBawwGl8RFhb6aHTL6ufkhB18=; b=NhaALcsACgc0HxZoJMXCpj4TIdCN8uPdUzM3vjiE6BdDSPd9jIkqn5ZZAJtTGByfW4 IncRxDHg4VbWHjK6GngmmoA2MmzzQOIXMm+6rD9Lpt5v54Bn9YtfmhrVVfu9A08O9sGk 2tGNVVIm3cBRG7iU/6bZatsdL4QnusUTvi5e66/QIhmzMdbcEWH1GfgQx+a9AUOrBj85 P5Sz2vc+BFATvkSTBwIbedtZaQFzCqRoSCiOX9f4D1T7Pji8IvewqettgyWx+mZ1GJ9x /cqL6MrtIS5SUlG7UrQW5DdPOI9PRWb10OpxtWh+8wLhEH/bKmCZ12FxFi1Xw71PudfF fETg== X-Gm-Message-State: ABy/qLYzp8zJbyhfEqWdCgG22N+765540OBpoTbbGftzprGIf88/HpCH ++AJialg7n7Y7svSSHo4GYl5TB47K09gFen5wAs= X-Google-Smtp-Source: APBJJlHDmW29duEJ8QlodnxlQYwTLpm/gVvLKAVSf3wanetS2eyxYg5iJIhwOCFuF846v4wMaCt2vl6wg4UMlycsemo= X-Received: by 2002:a4a:334e:0:b0:560:befd:6d6a with SMTP id q75-20020a4a334e000000b00560befd6d6amr3341234ooq.7.1688729875749; Fri, 07 Jul 2023 04:37:55 -0700 (PDT) MIME-Version: 1.0 References: <87zg4eq8xn.fsf@catern.com> <83ilaxij8c.fsf@gnu.org> <833521i1ag.fsf@gnu.org> In-Reply-To: <833521i1ag.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Fri, 7 Jul 2023 12:37:44 +0100 Message-ID: Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64428 Cc: Spencer Baugh , 64428@debbugs.gnu.org, sbaugh@catern.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, Jul 6, 2023 at 3:04=E2=80=AFPM Eli Zaretskii wrote: > > > From: Spencer Baugh > > Cc: sbaugh@catern.com, 64428@debbugs.gnu.org > > Date: Thu, 06 Jul 2023 09:16:41 -0400 > > > > Eli Zaretskii writes: > > > > >> * lisp/progmodes/flymake.el:(flymake--mode-line-counter-scroll-prev, > > >> flymake--mode-line-counter-scroll-next, > > >> flymake--mode-line-counter-map): Add. > > >> (flymake--mode-line-counter): Use new keymap and include 'type as a > > >> property in the mode-line. > > > > > > Thanks. Any reason you couldn't simply add more events to the > > > existing code? > > > > Two reasons: > > > > 1. I initially did that but it made the code uglier. Also, this code i= s > > run every time the mode-line is updated, and adding more of that seems > > bad. > > > > 2. This makes describe-key work better and makes it possible for users > > to configure the scroll direction or add more bindings for different > > things. > > This means your changeset is actually two different loosely-related > changes. The one that refactors the original code needs approval from > Jo=C3=A3o (CC'ed). Once Jo=C3=A3o is happy with that refactoring, I'm ok= ay with > adding the extra events to it. Hi Eli, Spencer, I've reviewed the code. I understand Spencer's rationale for the small refactoring and I'm OK with it. However I didn't test. I'd say it's better for this new capability to go to master, though with some minimal testing (say, at least in tty as well as graphical mode) it shouldn't be really dangerous for emacs-29 either. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 07 07:47:32 2023 Received: (at 64428) by debbugs.gnu.org; 7 Jul 2023 11:47:32 +0000 Received: from localhost ([127.0.0.1]:42688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHjvw-0001qg-1G for submit@debbugs.gnu.org; Fri, 07 Jul 2023 07:47:32 -0400 Received: from mail-oi1-f172.google.com ([209.85.167.172]:44231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHjvr-0001qM-Ke for 64428@debbugs.gnu.org; Fri, 07 Jul 2023 07:47:30 -0400 Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-3a1d9b64837so1626106b6e.0 for <64428@debbugs.gnu.org>; Fri, 07 Jul 2023 04:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688730441; x=1691322441; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bwF4ZCF65oQj2ZKyP9a+CuJQ+2bDrk3WZ3tljQFv5W8=; b=IapezcgzdBcGPOuyjPgE3XtuvBf9p+bbfX3v3zN6o9Q6z0HXPzG2fIoSwf0k9S9vun 7YI1iB/geeWL4a26qkEFtfPEIVKwTOngOGXXUWnrCwqBfGzO4dIy9kpGh7HIyACyJpqy tKOGe917C5yHk3p40ZjPminMX1LLtX2SHqJdZjvw5rCwtC2+B/SQGRFhdzW5pXGnVxmj l5dms5giWAh9ei2+/w1+qX9vVhAtxWC35c+MNCykvPK6XHjGeoUe40gqkiKlcqCFbdtc RDrsiAoWUHY41ho32hTxzf+sZPZPu25wrkW2g9RGT9V4tj8pykPvVrUEM1Qof2kQSxgc Ieqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688730441; x=1691322441; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bwF4ZCF65oQj2ZKyP9a+CuJQ+2bDrk3WZ3tljQFv5W8=; b=cccVC3egqaafsQg/CmwWgHPa3Eoq9OkJBFOf0OrZYdzZphqReXNhKUI5W8m0tC6gUk E6J0GYeUMbDldBiy7Sf+sAUPb/vFNICKf4RI6A8jkBvJ8SMaq0xQeFI7d9vOqGcrdH+s OJ/dx5J7HIbagOVp/MEZWe4ujjpYNs1MIY3qjjePrJf5NhnnEPG5PF+xozExuLeW7vjx lAkXPm7UGLJtRSwsKZS4iMVJGkv4E/NOK53C2U/bFlLqZSMyIXDViZGoqgdTshhHwo3l 6NC0ToXxOZ07iZRCom6Wz/LHHwUoIoCExefzwbw8oZB0Tpk5RgWGhcZu02j/PBH8qBKm y5nw== X-Gm-Message-State: ABy/qLZBzeF5/yRVl/mDhtL3diJJtD8vkE2Woqz1865hU4Yi4cSNsU5J y/+GewxhDszNwu1mQag9/ObmjVNwNU1Nz4AEE7w= X-Google-Smtp-Source: APBJJlFuCGbENtxdHaYOB4wvx/6krzjtOZlm6qatQG59egecpdTOPmnh30TOyzqAulO0Uztb9gwkCoG8gwRzoYZt0zQ= X-Received: by 2002:a05:6808:3008:b0:3a3:f289:8205 with SMTP id ay8-20020a056808300800b003a3f2898205mr89785oib.35.1688730440933; Fri, 07 Jul 2023 04:47:20 -0700 (PDT) MIME-Version: 1.0 References: <87zg4eq8xn.fsf@catern.com> <83ilaxij8c.fsf@gnu.org> <833521i1ag.fsf@gnu.org> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Fri, 7 Jul 2023 12:47:10 +0100 Message-ID: Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64428 Cc: Spencer Baugh , 64428@debbugs.gnu.org, sbaugh@catern.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On second thought, here are some comments that I think should be improved in Spencer's patch: > @@ -1479,21 +1505,8 @@ flymake--mode-line-counter > ((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 > - mouse-wheel-down-event) > - (lambda (event) > - (interactive "e") > - (with-selected-window (posn-window (event-start event)) > - (flymake-goto-prev-error 1 (list type) t)))) > - (define-key map (vector 'mode-line > - mouse-wheel-up-event) > - (lambda (event) > - (interactive "e") > - (with-selected-window (posn-window (event-start event)) > - (flymake-goto-next-error 1 (list type) t)))) > - map)))))) > + type ,type Spencer, here you are recording the value of the `type` in a `type` text-property of the affected text. Generally, though this rule isn't enforced or always followed (at least by me), it's better to give these package-specific properties some longer package-specific name like `flymake--diagnostic-type`. This will prevent any clashes if the less-qualified `type` is ever defined to mean something else as a text-property. > + (interactive "e") > + (let* ((posn-string (posn-string (event-start event))) > + (type (get-text-property (cdr posn-string) 'type (car posn-stri= ng)))) > + (with-selected-window (posn-window (event-start event)) > + (flymake-goto-prev-error 1 (list type) t)))) And here, you could consider saving the value of (event-start event) by adding another early binding to that `let*`, maybe call it `estart`. This is much less important than the first comment though. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 07 08:12:57 2023 Received: (at 64428) by debbugs.gnu.org; 7 Jul 2023 12:12:57 +0000 Received: from localhost ([127.0.0.1]:42693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHkKR-0002ad-Hj for submit@debbugs.gnu.org; Fri, 07 Jul 2023 08:12:57 -0400 Received: from s.wrqvwxzv.outbound-mail.sendgrid.net ([149.72.154.232]:29144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHkKE-0002aA-EN for 64428@debbugs.gnu.org; Fri, 07 Jul 2023 08:12:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: cc:content-type:from:subject:to; s=s1; bh=di0zrwpFNjz7Nouk71Lf7m72A/DKIcixYaZFS/ZX9BQ=; b=cSoTxPzLAwqIFudAKx8WZ+z+IV0V95rlkChOZ+ATUI7mTZoS4AcEOIuj0JTsih7Nm8Om iQGZQY9AcNoJMMdGWSCpjMYZD7Mw12qUiOoVDWFmXgQ3S1rv7U13/SH7u4cn4kUG88yy1y Vcq2C1M3CSrBL81XoDomMhZ1PXGDvM5c006ld1W7b6MUi2DYwk4yy737dLMjZavdJwe6Lp ALXdfWCqRa7VPCMm72Cu4CB5bmN0z+pNnZxnR/apMvRjHtpn0iWt4+7Qlbh10/keVAABdC COhPBVkGfydywp+gUa1W98jEMguQGawz4cp3VG4aG/uZEHHePotDvtptpqHq7QpQ== Received: by filterdrecv-84b96456cb-zd4xh with SMTP id filterdrecv-84b96456cb-zd4xh-1-64A80130-6 2023-07-07 12:12:32.118821027 +0000 UTC m=+4970058.743608104 Received: from earth.catern.com (unknown) by geopod-ismtpd-15 (SG) with ESMTP id T4T7SMNwTyi1Suwzu8eOeA Fri, 07 Jul 2023 12:12:31.956 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=gmail.com Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 11C1B62568; Fri, 7 Jul 2023 08:12:31 -0400 (EDT) From: sbaugh@catern.com Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Fri, 7 Jul 2023 12:47:10 +0100") References: <87zg4eq8xn.fsf@catern.com> <83ilaxij8c.fsf@gnu.org> <833521i1ag.fsf@gnu.org> Date: Fri, 07 Jul 2023 12:12:32 +0000 (UTC) Message-ID: <87y1jrncnl.fsf@catern.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?ZgbRq7gjGrt0q=2FPjvxk7wM0yQFRdOkTJAtEbkjCkHbJtFQAarA1wi9IzsbpUbY?= =?us-ascii?Q?uqi4BmWnynmXELmi5I=2F907kwZWlJVkjYdAdGk4I?= =?us-ascii?Q?lwYZjCk0KMkYRwkSvpgqfqsAdu+JW2t3GddQS0=2F?= =?us-ascii?Q?LCtsx4vDHl0Ia2Be2dEUL4C=2FnaCtSGuZ8hpeBag?= =?us-ascii?Q?a0xcxpU3tHFDYN+4SuvgXlgxam+Wm7FwWMQ=3D=3D?= To: =?iso-8859-1?b?Sm/jbyBU4XZvcmE=?= X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Joćo Tįvora writes: > On second thought, here are some comments that I think should be > improved in Spencer's patch: > >> @@ -1479,21 +1505,8 @@ flymake--mode-line-counter >> ((eq type :warning) "warnings") >> ((eq type [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [149.72.154.232 listed in wl.mailspike.net] 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-Debbugs-Envelope-To: 64428 Cc: Spencer Baugh , Eli Zaretskii , 64428@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Jo=E3o T=E1vora writes: > On second thought, here are some comments that I think should be > improved in Spencer's patch: > >> @@ -1479,21 +1505,8 @@ flymake--mode-line-counter >> ((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 >> - mouse-wheel-down-event) >> - (lambda (event) >> - (interactive "e") >> - (with-selected-window (posn-window (event-start event)) >> - (flymake-goto-prev-error 1 (list type) t)))) >> - (define-key map (vector 'mode-line >> - mouse-wheel-up-event) >> - (lambda (event) >> - (interactive "e") >> - (with-selected-window (posn-window (event-start event)) >> - (flymake-goto-next-error 1 (list type) t)))) >> - map)))))) >> + type ,type > > Spencer, here you are recording the value of the `type` in a `type` > text-property of the affected text. Generally, though this rule > isn't enforced or always followed (at least by me), it's better > to give these package-specific properties some longer > package-specific name like `flymake--diagnostic-type`. This will > prevent any clashes if the less-qualified `type` is ever defined > to mean something else as a text-property. > >> + (interactive "e") >> + (let* ((posn-string (posn-string (event-start event))) >> + (type (get-text-property (cdr posn-string) 'type (car posn-str= ing)))) >> + (with-selected-window (posn-window (event-start event)) >> + (flymake-goto-prev-error 1 (list type) t)))) > > And here, you could consider saving the value of (event-start event) > by adding another early binding to that `let*`, maybe call it `estart`. > This is much less important than the first comment though. > > Jo=E3o Fixed. I have tested in both graphical and tty Emacs. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-flymake-mode-line-scrolling-with-pixel-scroll-pr.patch >From c369c3b99ef1e5f9eab29f99a9d4f354352ef05b Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Sun, 2 Jul 2023 17:49:23 -0400 Subject: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode When pixel-scroll-precision-mode is enabled, scrolling the mouse wheel will yield wheel-{up,down} events. flymake now binds the new events in addition to the old mouse-wheel-{up,down}-event. * lisp/progmodes/flymake.el:(flymake--mode-line-counter-scroll-prev, flymake--mode-line-counter-scroll-next, flymake--mode-line-counter-map): Add. (flymake--mode-line-counter): Use new keymap and include flymake--diagnostic-type as a property in the mode-line. --- lisp/progmodes/flymake.el | 47 ++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 47dc32f9245..17154b646d7 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1449,6 +1449,36 @@ flymake--mode-line-exception (defun flymake--mode-line-counters () (when (flymake-running-backends) flymake-mode-line-counter-format)) +(defun flymake--mode-line-counter-scroll-prev (event) + (interactive "e") + (let* ((event-start (event-start event)) + (posn-string (posn-string event-start)) + (type (get-text-property + (cdr posn-string) 'flymake--diagnostic-type (car posn-string)))) + (with-selected-window (posn-window event-start) + (flymake-goto-prev-error 1 (list type) t)))) + +(defun flymake--mode-line-counter-scroll-next (event) + (interactive "e") + (let* ((event-start (event-start event)) + (posn-string (posn-string event-start)) + (type (get-text-property + (cdr posn-string) 'flymake--diagnostic-type (car posn-string)))) + (with-selected-window (posn-window event-start) + (flymake-goto-next-error 1 (list type) t)))) + +(defvar flymake--mode-line-counter-map + (let ((map (make-sparse-keymap))) + (define-key map (vector 'mode-line mouse-wheel-down-event) + #'flymake--mode-line-counter-scroll-prev) + (define-key map [mode-line wheel-down] + #'flymake--mode-line-counter-scroll-prev) + (define-key map (vector 'mode-line mouse-wheel-up-event) + #'flymake--mode-line-counter-scroll-next) + (define-key map [mode-line wheel-up] + #'flymake--mode-line-counter-scroll-next) + map)) + (defun flymake--mode-line-counter (type &optional no-space) "Compute number of diagnostics in buffer with TYPE's severity. TYPE is usually keyword `:error', `:warning' or `:note'." @@ -1479,21 +1509,8 @@ flymake--mode-line-counter ((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 - mouse-wheel-down-event) - (lambda (event) - (interactive "e") - (with-selected-window (posn-window (event-start event)) - (flymake-goto-prev-error 1 (list type) t)))) - (define-key map (vector 'mode-line - mouse-wheel-up-event) - (lambda (event) - (interactive "e") - (with-selected-window (posn-window (event-start event)) - (flymake-goto-next-error 1 (list type) t)))) - map)))))) + flymake--diagnostic-type ,type + keymap ,flymake--mode-line-counter-map))))) ;;; Per-buffer diagnostic listing -- 2.41.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 07 08:53:07 2023 Received: (at 64428) by debbugs.gnu.org; 7 Jul 2023 12:53:07 +0000 Received: from localhost ([127.0.0.1]:42744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHkxO-0003fp-TA for submit@debbugs.gnu.org; Fri, 07 Jul 2023 08:53:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHkxM-0003fL-9N for 64428@debbugs.gnu.org; Fri, 07 Jul 2023 08:53:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHkxE-0003wz-Cl; Fri, 07 Jul 2023 08:52:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=DRXfYocBLqCGxyHGY0Lc7XcLJY5mSQTGAA9FRKTapzU=; b=n7l4GCKi21g7+uge1//I 1Chuy2BLwu5CNATkx1kaEHlAGMEvZ4oOxvu5x4THgloAVM+LszbbYpbzgz3ejoOq8RJ62Bbzq4NJj FaoKMzOapwhmNdUUA/rQK8bIwV8Sn+DI0J7Tsa2AzzvB1gAKIR0i38G7iuqTluRrgZQ3DqNh0C+Ww 8U8qVYJvQZ/ujLZMCQ0jJzWaOK3ZCP1yI4JmRG8oJ48l9ieQlPnuZGolAKq8TJFptEpiQJv5deuAI tKxIBsLSWeE2BkpMJMiLTYHKRw7/vZitEPlGpAjZ+WuRzNdJRYoBkd7cq0Z3DdNZyPwDyFSlDX3TN Qoz2r/StYIjTJg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHkxD-0007nM-Sx; Fri, 07 Jul 2023 08:52:56 -0400 Date: Fri, 07 Jul 2023 15:52:59 +0300 Message-Id: <83mt07g9xw.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Fri, 7 Jul 2023 12:37:44 +0100) Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode References: <87zg4eq8xn.fsf@catern.com> <83ilaxij8c.fsf@gnu.org> <833521i1ag.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64428 Cc: sbaugh@janestreet.com, 64428@debbugs.gnu.org, sbaugh@catern.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: JoĆ£o TĆ”vora > Date: Fri, 7 Jul 2023 12:37:44 +0100 > Cc: Spencer Baugh , sbaugh@catern.com, 64428@debbugs.gnu.org > > I've reviewed the code. I understand Spencer's rationale for the > small refactoring and I'm OK with it. > > However I didn't test. I'd say it's better for this new capability to > go to master, though with some minimal testing (say, at least in tty > as well as graphical mode) it shouldn't be really dangerous for > emacs-29 either. Thanks. It will definitely go to master, not to emacs-29. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 13 01:56:40 2023 Received: (at 64428) by debbugs.gnu.org; 13 Jul 2023 05:56:40 +0000 Received: from localhost ([127.0.0.1]:53198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJpJg-0007Kq-8S for submit@debbugs.gnu.org; Thu, 13 Jul 2023 01:56:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJpJd-0007Ka-Jz for 64428@debbugs.gnu.org; Thu, 13 Jul 2023 01:56:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJpJW-00067U-6v; Thu, 13 Jul 2023 01:56:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=XX1ZRLcnrnyVfOOm7OneOlmTk9Rc7kz20T6pe52pEUI=; b=V9GOLMOHq7FDP0ngWCep lve2vkrG5w2gTOh3Z986WqaPghgqBisxG+JTlEtOwNnNgynTp4xjRg3PqBr2VqvUsR6aPCgAdsYcA pC30KcgJkj/nFuYM6UQBuHdnpPRThZY8+ZmpyUaABHcYWaQRj5CExVysJjqWV7aMGCOaVaHFSqGwq PR3/Qt3Rtb4kqwFFbr5AuG1yoH4sDKNjMN+DRtruS7OA9APpN+ES0WNZFz3Akz89RxQX0Qrd3qggH mFUgWtNQUBZNfyNEgH94+2ZTVwhwgWFntftggzfYrzHW00wKsP5z4zPgEfIrqaJ9sUoLr5qDGoaTT KR8QU0rYxcMK0A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJpJT-0005dU-OK; Thu, 13 Jul 2023 01:56:29 -0400 Date: Thu, 13 Jul 2023 08:56:44 +0300 Message-Id: <83edlc5p7n.fsf@gnu.org> From: Eli Zaretskii To: joaotavora@gmail.com, sbaugh@catern.com In-Reply-To: <87y1jrncnl.fsf@catern.com> (sbaugh@catern.com) Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode References: <87zg4eq8xn.fsf@catern.com> <83ilaxij8c.fsf@gnu.org> <833521i1ag.fsf@gnu.org> <87y1jrncnl.fsf@catern.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64428 Cc: sbaugh@janestreet.com, 64428@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: sbaugh@catern.com > Date: Fri, 07 Jul 2023 12:12:32 +0000 (UTC) > Cc: Eli Zaretskii , Spencer Baugh , > 64428@debbugs.gnu.org > > Joćo Tįvora writes: > > > On second thought, here are some comments that I think should be > > improved in Spencer's patch: > > > >> @@ -1479,21 +1505,8 @@ flymake--mode-line-counter > >> ((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 > >> - mouse-wheel-down-event) > >> - (lambda (event) > >> - (interactive "e") > >> - (with-selected-window (posn-window (event-start event)) > >> - (flymake-goto-prev-error 1 (list type) t)))) > >> - (define-key map (vector 'mode-line > >> - mouse-wheel-up-event) > >> - (lambda (event) > >> - (interactive "e") > >> - (with-selected-window (posn-window (event-start event)) > >> - (flymake-goto-next-error 1 (list type) t)))) > >> - map)))))) > >> + type ,type > > > > Spencer, here you are recording the value of the `type` in a `type` > > text-property of the affected text. Generally, though this rule > > isn't enforced or always followed (at least by me), it's better > > to give these package-specific properties some longer > > package-specific name like `flymake--diagnostic-type`. This will > > prevent any clashes if the less-qualified `type` is ever defined > > to mean something else as a text-property. > > > >> + (interactive "e") > >> + (let* ((posn-string (posn-string (event-start event))) > >> + (type (get-text-property (cdr posn-string) 'type (car posn-string)))) > >> + (with-selected-window (posn-window (event-start event)) > >> + (flymake-goto-prev-error 1 (list type) t)))) > > > > And here, you could consider saving the value of (event-start event) > > by adding another early binding to that `let*`, maybe call it `estart`. > > This is much less important than the first comment though. > > > > Joćo > > Fixed. > > I have tested in both graphical and tty Emacs. Thanks. Joćo, is this good to go, from your POV? I admit I consider it a bit strange to have commands that are "internal" and don't have a doc string: > +(defun flymake--mode-line-counter-scroll-prev (event) > + (interactive "e") > + (let* ((event-start (event-start event)) > + (posn-string (posn-string event-start)) > + (type (get-text-property > + (cdr posn-string) 'flymake--diagnostic-type (car posn-string)))) > + (with-selected-window (posn-window event-start) > + (flymake-goto-prev-error 1 (list type) t)))) > + > +(defun flymake--mode-line-counter-scroll-next (event) > + (interactive "e") > + (let* ((event-start (event-start event)) > + (posn-string (posn-string event-start)) > + (type (get-text-property > + (cdr posn-string) 'flymake--diagnostic-type (car posn-string)))) > + (with-selected-window (posn-window event-start) > + (flymake-goto-next-error 1 (list type) t)))) Any reasons not to make them public and add doc strings? From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 13 04:12:55 2023 Received: (at 64428) by debbugs.gnu.org; 13 Jul 2023 08:12:55 +0000 Received: from localhost ([127.0.0.1]:53320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJrRW-0002Vr-RQ for submit@debbugs.gnu.org; Thu, 13 Jul 2023 04:12:55 -0400 Received: from mail-ot1-f54.google.com ([209.85.210.54]:54350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJrRU-0002Ve-0C for 64428@debbugs.gnu.org; Thu, 13 Jul 2023 04:12:53 -0400 Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-6b886456f66so243717a34.0 for <64428@debbugs.gnu.org>; Thu, 13 Jul 2023 01:12:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689235966; x=1691827966; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/PE/DN1qhEX+N0DNTZxb6X+gVuMGvc1Yl1Q6SHMK+N0=; b=WjrE1ZJsAo7JElzMaqNhV3WORHd8m2l3WJnOMOP9a+LTNiwryNkQ+lDeYsK2Of2hwo xb7/67rygfjuvDIDGz6Z6tcanF7AWUSwigUdPw91ZHOyQhHrpqTAqURxTRJDet/Zhnvf 7lmH2R+MhImOqJkHbxVeQXrvwJQ5fHQtbLN7v/X4ZxudwkFH8aocN/kwOwF2SxB6uP4w q4K9Xb+QxeMlafJYRNoDHHU6TimVeEbD6QKHdmgVh55qjs1lUU5cHzdk98rItxrLNvMT QJLyCAohKnUOjGpxjzmFLgGAyC5EWxSWBkEu5wuNOmbYE8eEURVDkuEIdLuF2ED0qW28 9V6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689235966; x=1691827966; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/PE/DN1qhEX+N0DNTZxb6X+gVuMGvc1Yl1Q6SHMK+N0=; b=TTM1NMy1nJwUd2woGrGk8dDMkNkBwtjebeE/ahybGv+hnJ+R2Ilz8G2g5pgEBNAl3D agfUIPYjQx5znymtVLC3in1TQdIrTrAsR8iWY5fFtAtfPEoacC0OFBc7ZyVWu/fRJqhG KV4XtAOUNX3HC8rKcq4A2bHHYFVhqtLDl5OLzVeqghQaMnADebG6ewoGp2kgiIXkcesZ qrkvd/jTxHklQRtLxg8d8IzmMFH6d3jrlVYyn3g9jWoTPiStXPFrTs93J7TVEK6OD+kQ XnLM0zN+mRjacAEf505F/TYlhFpf7eRSf/2zNQBeQJd7tL+T58H0RXY8nhcF8bsocdFj aVZQ== X-Gm-Message-State: ABy/qLa0mFU5r3i2Jj653mqy8cH8bK6TfvoImEbIGsFmrtPQvF2cNl+k 7OWCufmUdvIOpR5ZeD5QdRan8OzE4tpjLA9XiuU= X-Google-Smtp-Source: APBJJlEkANFoKrrsetuFqtRyRdhksQSYWH3wVBmSijzXuFvpX0EpB/Tkq6DW6033aS9IZ/hRqqWmMDzLqOBfwHi60P0= X-Received: by 2002:a05:6870:934a:b0:1a2:c181:5c85 with SMTP id j10-20020a056870934a00b001a2c1815c85mr1397139oak.9.1689235965780; Thu, 13 Jul 2023 01:12:45 -0700 (PDT) MIME-Version: 1.0 References: <87zg4eq8xn.fsf@catern.com> <83ilaxij8c.fsf@gnu.org> <833521i1ag.fsf@gnu.org> <87y1jrncnl.fsf@catern.com> <83edlc5p7n.fsf@gnu.org> In-Reply-To: <83edlc5p7n.fsf@gnu.org> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Thu, 13 Jul 2023 09:12:33 +0100 Message-ID: Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000aea60b060059e5d4" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 64428 Cc: sbaugh@catern.com, 64428@debbugs.gnu.org, Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000aea60b060059e5d4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jul 13, 2023, 06:56 Eli Zaretskii wrote: > > From: sbaugh@catern.com > > Date: Fri, 07 Jul 2023 12:12:32 +0000 (UTC) > > Cc: Eli Zaretskii , Spencer Baugh = , > > 64428@debbugs.gnu.org > > > > Jo=C3=A3o T=C3=A1vora writes: > > > > > On second thought, here are some comments that I think should be > > > improved in Spencer's patch: > > > > > >> @@ -1479,21 +1505,8 @@ flymake--mode-line-counter > > >> ((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 > > >> - mouse-wheel-down-event) > > >> - (lambda (event) > > >> - (interactive "e") > > >> - (with-selected-window (posn-window (event-start > event)) > > >> - (flymake-goto-prev-error 1 (list type) t)))) > > >> - (define-key map (vector 'mode-line > > >> - mouse-wheel-up-event) > > >> - (lambda (event) > > >> - (interactive "e") > > >> - (with-selected-window (posn-window (event-start > event)) > > >> - (flymake-goto-next-error 1 (list type) t)))) > > >> - map)))))) > > >> + type ,type > > > > > > Spencer, here you are recording the value of the `type` in a `type` > > > text-property of the affected text. Generally, though this rule > > > isn't enforced or always followed (at least by me), it's better > > > to give these package-specific properties some longer > > > package-specific name like `flymake--diagnostic-type`. This will > > > prevent any clashes if the less-qualified `type` is ever defined > > > to mean something else as a text-property. > > > > > >> + (interactive "e") > > >> + (let* ((posn-string (posn-string (event-start event))) > > >> + (type (get-text-property (cdr posn-string) 'type (car > posn-string)))) > > >> + (with-selected-window (posn-window (event-start event)) > > >> + (flymake-goto-prev-error 1 (list type) t)))) > > > > > > And here, you could consider saving the value of (event-start event) > > > by adding another early binding to that `let*`, maybe call it `estart= `. > > > This is much less important than the first comment though. > > > > > > Jo=C3=A3o > > > > Fixed. > > > > I have tested in both graphical and tty Emacs. > > Thanks. Jo=C3=A3o, is this good to go, from your POV? > > I admit I consider it a bit strange to have commands that are > "internal" and don't have a doc string: > > > +(defun flymake--mode-line-counter-scroll-prev (event) > > + (interactive "e") > > + (let* ((event-start (event-start event)) > > + (posn-string (posn-string event-start)) > > + (type (get-text-property > > + (cdr posn-string) 'flymake--diagnostic-type (car > posn-string)))) > > + (with-selected-window (posn-window event-start) > > + (flymake-goto-prev-error 1 (list type) t)))) > > + > > +(defun flymake--mode-line-counter-scroll-next (event) > > + (interactive "e") > > + (let* ((event-start (event-start event)) > > + (posn-string (posn-string event-start)) > > + (type (get-text-property > > + (cdr posn-string) 'flymake--diagnostic-type (car > posn-string)))) > > + (with-selected-window (posn-window event-start) > > + (flymake-goto-next-error 1 (list type) t)))) > > Any reasons not to make them public and add doc strings? > If you can give a reasonable example of sonething the general public would want to do with them, ok. Until then, I think public interfaces should be kept small. Yes, it's good for pushing. Jo=C3=A3o > --000000000000aea60b060059e5d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Jul 13, 2023, 06:56 Eli Zaretskii <eliz@gnu.org> wrote:
> From: sbaugh@catern.com
> Date: Fri, 07 Jul 2023 12:12:32 +0000 (UTC)
> Cc: Eli Zaretskii <eliz@gnu.org>, Spencer Baugh <sbaugh@jane= street.com>,
>=C2=A0 =C2=A0 =C2=A0 =C2=A064428@debbugs.gnu.org
>
> Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> writes:
>
> > On second thought, here are some comments that I think should be<= br> > > improved in Spencer's patch:
> >
> >> @@ -1479,21 +1505,8 @@ flymake--mode-line-counter
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((eq type :warning) "= warnings")
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((eq type :note) "not= es")
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(t (format "%s diagno= stics" type))))
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0keymap
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0,(let ((map (make-sparse-k= eymap)))
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (define-key map (v= ector 'mode-line
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mouse-wh= eel-down-event)
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (lambda (ev= ent)
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (int= eractive "e")
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (wit= h-selected-window (posn-window (event-start event))
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (flymake-goto-prev-error 1 (list type) t))))
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (define-key map (v= ector 'mode-line
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mouse-wh= eel-up-event)
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (lambda (ev= ent)
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (int= eractive "e")
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (wit= h-selected-window (posn-window (event-start event))
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 (flymake-goto-next-error 1 (list type) t))))
> >> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 map))))))
> >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0type ,type
> >
> > Spencer, here you are recording the value of the `type` in a `typ= e`
> > text-property of the affected text.=C2=A0 Generally, though this = rule
> > isn't enforced or always followed (at least by me), it's = better
> > to give these package-specific properties some longer
> > package-specific name like `flymake--diagnostic-type`.=C2=A0 This= will
> > prevent any clashes if the less-qualified `type` is ever defined<= br> > > to mean something else as a text-property.
> >
> >> +=C2=A0 (interactive "e")
> >> +=C2=A0 (let* ((posn-string (posn-string (event-start event))= )
> >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(type (get-text-property (= cdr posn-string) 'type (car posn-string))))
> >> +=C2=A0 =C2=A0 (with-selected-window (posn-window (event-star= t event))
> >> +=C2=A0 =C2=A0 =C2=A0 (flymake-goto-prev-error 1 (list type) = t))))
> >
> > And here, you could consider saving the value of (event-start eve= nt)
> > by adding another early binding to that `let*`, maybe call it `es= tart`.
> > This is much less important than the first comment though.
> >
> > Jo=C3=A3o
>
> Fixed.
>
> I have tested in both graphical and tty Emacs.

Thanks.=C2=A0 Jo=C3=A3o, is this good to go, from your POV?

I admit I consider it a bit strange to have commands that are
"internal" and don't have a doc string:

> +(defun flymake--mode-line-counter-scroll-prev (event)
> +=C2=A0 (interactive "e")
> +=C2=A0 (let* ((event-start (event-start event))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(posn-string (posn-string event-sta= rt))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(type (get-text-property
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cdr posn-str= ing) 'flymake--diagnostic-type (car posn-string))))
> +=C2=A0 =C2=A0 (with-selected-window (posn-window event-start)
> +=C2=A0 =C2=A0 =C2=A0 (flymake-goto-prev-error 1 (list type) t))))
> +
> +(defun flymake--mode-line-counter-scroll-next (event)
> +=C2=A0 (interactive "e")
> +=C2=A0 (let* ((event-start (event-start event))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(posn-string (posn-string event-sta= rt))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(type (get-text-property
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cdr posn-str= ing) 'flymake--diagnostic-type (car posn-string))))
> +=C2=A0 =C2=A0 (with-selected-window (posn-window event-start)
> +=C2=A0 =C2=A0 =C2=A0 (flymake-goto-next-error 1 (list type) t))))

Any reasons not to make them public and add doc strings?

If you can give a r= easonable example of sonething the general public would want to do with the= m, ok.=C2=A0 Until then, I think public interfaces should be kept small.

Yes, it's good for pus= hing.

Jo=C3=A3o
--000000000000aea60b060059e5d4-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 13 10:00:39 2023 Received: (at 64428-done) by debbugs.gnu.org; 13 Jul 2023 14:00:39 +0000 Received: from localhost ([127.0.0.1]:54822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJws3-0003u8-0U for submit@debbugs.gnu.org; Thu, 13 Jul 2023 10:00:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJwry-0003U4-D6 for 64428-done@debbugs.gnu.org; Thu, 13 Jul 2023 10:00:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJwrs-0003VH-FU; Thu, 13 Jul 2023 10:00:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=7YmF06z/vbzE9B96LRYhMrrOThAIVcM8fuykryMC0eY=; b=BxMF1Qoyq6utuTXGVoj8 Hf9HxQtPXYK4oCrWTiWEnOwnyAjHds/3SopoubzHZeueySOsD7YZU5i6pb3TqWZjefZdaW3FP+FSi w3Tx6V3iow88mU+3rBTiIn5sNSe5aPy5EbPXJNhC6lTrN0pPuE0zO3dyXHJM5J/jA84e5O8e8hlVR r2bnHNpLzDFB7rwBHGRkoJJpolHNTsvi5o2tzhlYNXwI+au6P10oBZfnE+iFh+FGmJsJWBEzWpC6T 8ZnHLYXg1XiEtZjt3zV5MsxKfDay6BTNzuAVpio6DKNy0okv66YMjhaRsNVJijl4oSV5kjbagHnS+ T6RjYaEm1QYxHA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJwrr-0002lI-V7; Thu, 13 Jul 2023 10:00:28 -0400 Date: Thu, 13 Jul 2023 17:00:43 +0300 Message-Id: <83sf9r52t0.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Thu, 13 Jul 2023 09:12:33 +0100) Subject: Re: bug#64428: [PATCH] Fix flymake mode line scrolling with pixel-scroll-precision-mode References: <87zg4eq8xn.fsf@catern.com> <83ilaxij8c.fsf@gnu.org> <833521i1ag.fsf@gnu.org> <87y1jrncnl.fsf@catern.com> <83edlc5p7n.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64428-done Cc: sbaugh@catern.com, 64428-done@debbugs.gnu.org, sbaugh@janestreet.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: João TÔvora > Date: Thu, 13 Jul 2023 09:12:33 +0100 > Cc: sbaugh@catern.com, Spencer Baugh , 64428@debbugs.gnu.org > > Any reasons not to make them public and add doc strings? > > If you can give a reasonable example of sonething the general public would want to do with them, ok. > Until then, I think public interfaces should be kept small. > > Yes, it's good for pushing. Thanks, installed on master, and closing the bug. Spencer, please in the future try to follow closer our conventions of formatting commit log messages. From unknown Sun Aug 17 22:02:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 11 Aug 2023 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator