From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#70459: Flymake small improvements Date: Thu, 18 Apr 2024 20:23:09 +0300 Organization: LINKOV.NET Message-ID: <86ttjyr3jq.fsf@mail.linkov.net> 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="31504"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) To: 70459@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 18 19:36:30 2024 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 1rxVgS-00084H-VA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Apr 2024 19:36:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxVfs-0002xC-6H; Thu, 18 Apr 2024 13:35:52 -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 1rxVfq-0002we-5i for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 13:35:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxVfo-00054m-TV for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 13:35:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rxVg2-000634-F8 for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 13:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Apr 2024 17:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70459 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.171346173923100 (code B ref -1); Thu, 18 Apr 2024 17:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Apr 2024 17:35:39 +0000 Original-Received: from localhost ([127.0.0.1]:53654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxVfc-000609-Qu for submit@debbugs.gnu.org; Thu, 18 Apr 2024 13:35:38 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:58370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxVfF-0005vV-RR for submit@debbugs.gnu.org; Thu, 18 Apr 2024 13:35:15 -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 1rxVew-0002kw-2w for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 13:34:54 -0400 Original-Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxVeu-0004io-6P for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 13:34:53 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id B216760005 for ; Thu, 18 Apr 2024 17:34:49 +0000 (UTC) X-GND-Sasl: juri@linkov.net Received-SPF: pass client-ip=2001:4b98:dc4:8::223; envelope-from=juri@linkov.net; helo=relay3-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-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:283598 Archived-At: --=-=-= Content-Type: text/plain Tags: patch 1. clicking on flymake fringe indicator will show buffer diagnostics; 2. display diagnostics buffers at the bottom; 3. to do the above there is a need to swap the order of generating the buffer contents and displaying the buffer, i.e. the same as was done recently in info.el for bug#70213. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=flymake.patch diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 22a139d3045..f5bf68db574 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1331,7 +1331,10 @@ flymake-start nil)))))))) (defvar flymake-mode-map - (let ((map (make-sparse-keymap))) map) + (let ((map (make-sparse-keymap))) + (define-key map `[,flymake-fringe-indicator-position mouse-1] + #'flymake-show-buffer-diagnostics) + map) "Keymap for `flymake-mode'.") ;;;###autoload @@ -1972,8 +1975,12 @@ flymake-show-buffer-diagnostics (current-buffer))))) (with-current-buffer target (setq flymake--diagnostics-buffer-source source) - (display-buffer (current-buffer)) - (revert-buffer)))) + (revert-buffer) + (display-buffer (current-buffer) + `((display-buffer-reuse-window + display-buffer-below-selected) + (window-height . (lambda (window) + (fit-window-to-buffer window 10)))))))) ;;; Per-project diagnostic listing @@ -2073,8 +2080,11 @@ flymake-show-project-diagnostics (with-current-buffer buffer (flymake-project-diagnostics-mode) (setq-local flymake--project-diagnostic-list-project prj) - (display-buffer (current-buffer)) - (revert-buffer)))) + (revert-buffer) + (display-buffer (current-buffer) + `((display-buffer-reuse-window + display-buffer-at-bottom) + (window-height . fit-window-to-buffer)))))) (defun flymake--update-diagnostics-listings (buffer) "Update diagnostics listings somehow relevant to BUFFER." --=-=-=--