From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#34294: 27.0.50; flymake-start-on-save-buffer has no effect Date: Wed, 27 Mar 2019 23:38:18 +0200 Organization: LINKOV.NET Message-ID: <87d0mct2ut.fsf@mail.linkov.net> References: <87lg2x6fox.fsf@mail.linkov.net> <87h8dkk3ho.fsf@mail.linkov.net> <87y36w8qvy.fsf@gmail.com> <87o97ruu06.fsf@mail.linkov.net> <87bm3rxjkd.fsf@gmail.com> <87k1hy19ug.fsf@mail.linkov.net> <87d0mn3op7.fsf@mail.linkov.net> <878sxak3ew.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="16682"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 34294@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 27 22:48:51 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9GPi-0004D7-MC for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Mar 2019 22:48:51 +0100 Original-Received: from localhost ([127.0.0.1]:54239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9GPh-0002HW-Ep for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Mar 2019 17:48:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9GOx-0001xu-Qn for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 17:48:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9GOw-0001S3-0e for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 17:48:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48304) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h9GOv-0001Rt-Pr for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 17:48:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h9GOv-0006wg-MJ for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 17:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Mar 2019 21:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34294 X-GNU-PR-Package: emacs Original-Received: via spool by 34294-submit@debbugs.gnu.org id=B34294.155372326526663 (code B ref 34294); Wed, 27 Mar 2019 21:48:01 +0000 Original-Received: (at 34294) by debbugs.gnu.org; 27 Mar 2019 21:47:45 +0000 Original-Received: from localhost ([127.0.0.1]:33612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9GOf-0006vy-5t for submit@debbugs.gnu.org; Wed, 27 Mar 2019 17:47:45 -0400 Original-Received: from palegreen.birch.relay.mailchannels.net ([23.83.209.140]:15432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9GOc-0006vm-Ph for 34294@debbugs.gnu.org; Wed, 27 Mar 2019 17:47:43 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id DBE32124ECF; Wed, 27 Mar 2019 21:47:39 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a76.g.dreamhost.com (unknown [100.96.39.118]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 8143E125551; Wed, 27 Mar 2019 21:47:39 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a76.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Wed, 27 Mar 2019 21:47:39 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Eight-Celery: 0f671da50990de18_1553723259724_1694993626 X-MC-Loop-Signature: 1553723259724:3069674128 X-MC-Ingress-Time: 1553723259723 Original-Received: from pdx1-sub0-mail-a76.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a76.g.dreamhost.com (Postfix) with ESMTP id 00144804C4; Wed, 27 Mar 2019 14:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=9tVAJu DKb2f+3I5ZOHN4oR4GBcQ=; b=HH3nBzuWLGCDFTwCqdsOlSUUmrH9HLd8KkxPnw 8VJQ3WX/iXQ6hh/SN6BXSFo1CF8HMSUWAstVXNx1+cxnjUNEyqvwWL/rAxhaeDmR D4KGkT5PMfSWM97mM6TCgbvVu8sNs4mmPOE0f/UlwEs3jQdPE3Wp9NQGS69Y6NEj bK70U= Original-Received: from mail.jurta.org (m91-129-108-250.cust.tele2.ee [91.129.108.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a76.g.dreamhost.com (Postfix) with ESMTPSA id E07C48093F; Wed, 27 Mar 2019 14:47:37 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a76 In-Reply-To: <878sxak3ew.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 19 Mar 2019 22:46:07 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedutddrkeefgddtvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderudenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdekrddvhedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtkedrvdehtddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehjohgrohhtrghvohhrrgesghhmrghilhdrtghomhenucevlhhushhtvghrufhiiigvpedt 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:156871 Archived-At: Hi Jo=E3o, >> It looks good to me. I just have a suggestion and would like >> to see the commit msg, too. > > Please see the patch with the commit msg attached. Could you please also push an additional patch that fixes a race condition in flymake. The problem is that currently flymake starts even when flymake-mode is disabled. Having such customization in ~/.emacs to not enable flymake-mode in read-only buffers: (add-hook 'ruby-mode-hook (lambda () (flymake-mode 1) (add-hook 'view-mode-hook (lambda () (flymake-mode (if view-mode -1 1))) nil t))) It still runs flymake in read-only buffers because it disregards the fact that flymake-mode becomes disabled before starting flymake from post-command-hook or window-configuration-change-hook. The fix is to check for flymake-mode again after hooks are finished: diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index d6cd370dac..1c7823cb85 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -900,7 +904,7 @@ flymake-start (add-hook 'window-configuration-change-hook #'start-on-display 'append 'local)) - (t + (flymake-mode (setq flymake-check-start-time (float-time)) (let ((backend-args (and