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: Mon, 06 May 2019 23:15:16 +0300 Organization: LINKOV.NET Message-ID: <87lfzjqqzv.fsf@mail.linkov.net> References: <87lg2x6fox.fsf@mail.linkov.net> <87a7g0vf4k.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="181908"; 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 Mon May 06 22:18:19 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 1hNk3z-000lB0-Oi for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 May 2019 22:18:16 +0200 Original-Received: from localhost ([127.0.0.1]:33536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNk3y-0000xF-Ne for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 May 2019 16:18:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNk3o-0000x3-0v for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 16:18:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNk3m-0003IS-Uy for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 16:18:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44004) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNk3m-0003IG-K7 for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 16:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hNk3m-0000qg-Ed for bug-gnu-emacs@gnu.org; Mon, 06 May 2019 16:18: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: Mon, 06 May 2019 20:18:02 +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.15571738293185 (code B ref 34294); Mon, 06 May 2019 20:18:02 +0000 Original-Received: (at 34294) by debbugs.gnu.org; 6 May 2019 20:17:09 +0000 Original-Received: from localhost ([127.0.0.1]:57546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNk2u-0000pJ-Sn for submit@debbugs.gnu.org; Mon, 06 May 2019 16:17:09 -0400 Original-Received: from orchid.birch.relay.mailchannels.net ([23.83.209.137]:38180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hNk2r-0000p7-J5 for 34294@debbugs.gnu.org; Mon, 06 May 2019 16:17:07 -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 0ACDA2C2D8F; Mon, 6 May 2019 20:16:59 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a44.g.dreamhost.com (100-96-80-14.trex.outbound.svc.cluster.local [100.96.80.14]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 77D562C2DB3; Mon, 6 May 2019 20:16:58 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a44.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Mon, 06 May 2019 20:16:58 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Ski-Thoughtful: 3d468457275847cc_1557173818802_532044328 X-MC-Loop-Signature: 1557173818802:1994308823 X-MC-Ingress-Time: 1557173818801 Original-Received: from pdx1-sub0-mail-a44.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a44.g.dreamhost.com (Postfix) with ESMTP id A7E2782A11; Mon, 6 May 2019 13:16:54 -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; s=linkov.net; bh=ENzzUrFdjqVzzjyjA7PMxWZwNCo=; b= EJUC6ITToulevOSAcqa4xrGM/kDV4AyuQCm5z7yLGA1SoNNFuNZyOmd4T8Q3xBlR 8+gNmYtuKKVxR5QHrl4OUf60qdrKX9aA7LjVRNuPCn9YbFhCQi4opA3HFSQSqq1X zu1iJM19wv9dPPMvtZ98Cq2SB75XpkTMUGwcypdwHLc= Original-Received: from mail.jurta.org (m91-129-97-211.cust.tele2.ee [91.129.97.211]) (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-a44.g.dreamhost.com (Postfix) with ESMTPSA id E48A882A22; Mon, 6 May 2019 13:16:52 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a44 In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Mon, 6 May 2019 00:02:38 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddrjeekgdehtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleejrddvuddunecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleejrddvuddupdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepjhhorghothgrvhhorhgrsehgmhgrihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd 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:158843 Archived-At: --=-=-= Content-Type: text/plain > Anyway, your initiative got my attention. Do you remember what I > wrote previously? > >> [jt] I would even go as far as obsoleting the variable entirely, and >> use make-obsolete-variable instead: there's no real reason >> why newline should be given special treatment. And users >> that need this for some obscure reason can probably plug it >> in post-self-insert-hook. > >> If you obsolete the variable, you can remove it from the >> manual, too. > > I still think this is the best option, so if you didn't already push that, > I would be thankful that you do. It should solve your issue and make > the code and manual simpler. I had doubts about removing it, but since you are sure about this, then please see the following patch attached. If basically this is ok, I'll also change the manual, NEWS, etc. > And maybe consider opening different bugs for the other issues? I'll try to keep one report per bug. So I opened a separate bug#35592 for Martin with a complete scenario to reproduce another bug. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=obsolete-flymake-start-syntax-check-on-newline.patch diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index abe2933c10..82d65c1d76 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -38,9 +38,9 @@ ;; The main interactive entry point is the `flymake-mode' minor mode, ;; which periodically and automatically initiates checks as the user ;; is editing the buffer. The variables `flymake-no-changes-timeout', -;; `flymake-start-on-newline' and `flymake-start-on-flymake-mode' -;; give finer control over the events triggering a check, as does the -;; interactive command `flymake-start', which immediately starts a check. +;; `flymake-start-on-flymake-mode' give finer control over the events +;; triggering a check, as does the interactive command `flymake-start', +;; which immediately starts a check. ;; ;; Shortly after each check, a summary of collected diagnostics should ;; appear in the mode-line. If it doesn't, there might not be a @@ -177,17 +177,13 @@ flymake-fringe-indicator-position (const right-fringe) (const :tag "No fringe indicators" nil))) -(define-obsolete-variable-alias 'flymake-start-syntax-check-on-newline - 'flymake-start-on-newline "27.1") - -(defcustom flymake-start-on-newline t - "Start syntax check if newline char was added/removed from the buffer." - :type 'boolean) +(make-obsolete-variable 'flymake-start-syntax-check-on-newline + "can probably plug it in post-self-insert-hook" + "27.1") (defcustom flymake-no-changes-timeout 0.5 "Time to wait after last change before automatically checking buffer. -If nil, never start checking buffer automatically like this. -You may also want to disable `flymake-start-on-newline'." +If nil, never start checking buffer automatically like this." :type '(choice (number :tag "Timeout in seconds") (const :tag "No check on timeout" nil))) @@ -947,9 +943,8 @@ flymake-mode Flymake performs these checks while the user is editing. The customization variables `flymake-start-on-flymake-mode', -`flymake-no-changes-timeout' and `flymake-start-on-newline' -determine the exact circumstances whereupon Flymake decides -to initiate a check of the buffer. +`flymake-no-changes-timeout' determine the exact circumstances +whereupon Flymake decides to initiate a check of the buffer. The commands `flymake-goto-next-error' and `flymake-goto-prev-error' can be used to navigate among Flymake @@ -1043,9 +1038,6 @@ flymake-after-change-function START and STOP and LEN are as in `after-change-functions'." (let((new-text (buffer-substring start stop))) (push (list start stop new-text) flymake--recent-changes) - (when (and flymake-start-on-newline (equal new-text "\n")) - (flymake-log :debug "starting syntax check as new-line has been seen") - (flymake-start t)) (flymake--schedule-timer-maybe))) (defun flymake-after-save-hook () --=-=-=--