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: Tue, 19 Mar 2019 22:46:07 +0200 Organization: LINKOV.NET Message-ID: <878sxak3ew.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> 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="65684"; 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 Tue Mar 19 22:17:00 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 1h6M6T-000GwM-C0 for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2019 22:16:57 +0100 Original-Received: from localhost ([127.0.0.1]:37348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6M6S-0002wO-8C for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2019 17:16:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6M4v-0001bs-PK for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 17:15:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6Ly1-0003Lk-Gd for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 17:08:15 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37421) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h6Lxq-0003Es-A6 for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 17:08:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h6Lxq-0003Tg-2R for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2019 17:08: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: Tue, 19 Mar 2019 21:08: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.155302966613316 (code B ref 34294); Tue, 19 Mar 2019 21:08:02 +0000 Original-Received: (at 34294) by debbugs.gnu.org; 19 Mar 2019 21:07:46 +0000 Original-Received: from localhost ([127.0.0.1]:50959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6LxZ-0003Sd-H6 for submit@debbugs.gnu.org; Tue, 19 Mar 2019 17:07:46 -0400 Original-Received: from ostrich.birch.relay.mailchannels.net ([23.83.209.138]:31106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h6LxW-0003SK-Gi for 34294@debbugs.gnu.org; Tue, 19 Mar 2019 17:07:44 -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 B58641246F4; Tue, 19 Mar 2019 21:07:40 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a70.g.dreamhost.com (unknown [100.96.35.41]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 39009125153; Tue, 19 Mar 2019 21:07:40 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a70.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.16.3); Tue, 19 Mar 2019 21:07:40 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Illustrious-Trouble: 64634cd5709977f5_1553029660468_659469364 X-MC-Loop-Signature: 1553029660468:3243367431 X-MC-Ingress-Time: 1553029660467 Original-Received: from pdx1-sub0-mail-a70.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a70.g.dreamhost.com (Postfix) with ESMTP id C85A08063F; Tue, 19 Mar 2019 14:07:39 -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=sMJYHFzZ8IKe6cDlpeh6ZWaIGGw=; b= UQNYrX6RF93SvXDLoXz6km/i1X9nEd89/szsDmpBOmzer0ocgsGu97k/WTSJTRwy 8IJqvhELyI68DKCzockv0FH6zNmGpEHy61M1n8XkkVLUoyZaT2TVEj5fSvgCwkcC 8o9DsBM4g3XpFBAl9ediUfELNpaaIs5LKaiOaAqN5Rc= Original-Received: from mail.jurta.org (m91-129-106-13.cust.tele2.ee [91.129.106.13]) (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-a70.g.dreamhost.com (Postfix) with ESMTPSA id 390D480622; Tue, 19 Mar 2019 14:07:37 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a70 In-Reply-To: ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Mon, 18 Mar 2019 21:43:05 +0000") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedutddrieeggddugeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdeirddufeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdeirddufedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehjohgrohhtrghvohhrrgesghhmrghilhdrtghomhenucevlhhushhtvghrufhiiigvpedt 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:156521 Archived-At: --=-=-= Content-Type: text/plain > 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. >> > -(defcustom flymake-start-syntax-check-on-newline t >> > +(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) > > I think we should change this to default to nil. > > 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. Maybe, I have no opinion about this. > If you obsolete the variable, you can remove it from the > manual, too. I forgot that it was documented in the manual, so I added its renaming in the manual to the patch too: --=-=-= Content-Type: text/x-diff; charset=iso-8859-1 Content-Disposition: inline; filename=0001-lisp-progmodes-flymake.el-Rename-flymake-start-on-ne.patch Content-Transfer-Encoding: quoted-printable >From 910081f77a65a7758c27ee9a74f20e74596b6697 Wed Feb 17 00:00:00 2019 From: Juri Linkov Date: Wed, 17 Feb 2019 22:10:20 +0200 Subject: [PATCH] * lisp/progmodes/flymake.el: Rename flymake-start-on-new= line. To: 34294@debbugs.gnu.org * lisp/progmodes/flymake.el (flymake-start-on-newline): Rename from flymake-start-syntax-check-on-newline. (flymake-start-syntax-check-on-newline): Define obsolete alias. (flymake-no-changes-timeout): Add customization option nil. (Bug#34294) --- etc/TODO | 9 --------- lisp/progmodes/flymake.el | 35 +++++++++++++++++++---------------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/etc/TODO b/etc/TODO index ccb82cd296..dc594a007e 100644 --- a/etc/TODO +++ b/etc/TODO @@ -143,15 +143,6 @@ See the 'test' directory for examples. =20 * Small but important fixes needed in existing features: =20 -** Flymake's customization mechanism needs to be both simpler (fewer -levels of indirection) and better documented, so it is easier to -understand. I find it quite hard to figure out what compilation -command it will use. - -I suggest totally rewriting that part of Flymake, using the simplest -mechanism that suffices for the specific needs. That will be easy -for users to customize. - ** Distribute a bar cursor of width > 1 evenly between the two glyphs on each side of the bar (what to do at the edges?). =20 diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 894203ca5a..4608d1c973 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -89,7 +89,7 @@ Using Flymake =20 @item a newline character is added to the buffer, unless -@code{flymake-start-syntax-check-on-newline} is nil; +@code{flymake-start-on-newline} is nil; =20 @item some changes were made to the buffer more than @code{0.5} seconds ago @@ -222,7 +222,7 @@ Customizable variables started after this many seconds, unless the user makes another change, which resets the timer. =20 -@item flymake-start-syntax-check-on-newline +@item flymake-start-on-newline A boolean flag indicating whether to start syntax check immediately after a newline character is inserted into the buffer. =20 diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 261e50a613..ddf12328da 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -4,7 +4,7 @@ =20 ;; Author: Pavel Kobyakov ;; Maintainer: Jo=E3o T=E1vora -;; Version: 1.0.5 +;; Version: 1.0.6 ;; Package-Requires: ((emacs "26.1")) ;; Keywords: c languages tools =20 @@ -38,10 +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-syntax-check-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-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= . ;; ;; Shortly after each check, a summary of collected diagnostics should ;; appear in the mode-line. If it doesn't, there might not be a @@ -178,14 +177,19 @@ flymake-fringe-indicator-position (const right-fringe) (const :tag "No fringe indicators" nil))) =20 -(defcustom flymake-start-syntax-check-on-newline t +(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) =20 (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." - :type 'number) +If nil, never start checking buffer automatically like this. +You may also want to disable `flymake-start-on-newline'." + :type '(choice (number :tag "Timeout in seconds") + (const :tag "No check on timeout" nil))) =20 (defcustom flymake-gui-warnings-enabled t "Enables/disables GUI warnings." @@ -203,7 +207,7 @@ flymake-start-on-flymake-mode :type 'boolean) =20 (defcustom flymake-start-on-save-buffer t - "If non-nil start syntax check when a buffer is saved. + "If non-nil, start syntax check when a buffer is saved. Specifically, start it when the saved buffer is actually displayed." :version "27.1" :type 'boolean) @@ -939,12 +943,11 @@ flymake-mode called backends, and visually annotates the buffer with the results. =20 -Flymake performs these checks while the user is editing. The -customization variables `flymake-start-on-flymake-mode', -`flymake-no-changes-timeout' and -`flymake-start-syntax-check-on-newline' determine the exact -circumstances whereupon Flymake decides to initiate a check of -the buffer. +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. =20 The commands `flymake-goto-next-error' and `flymake-goto-prev-error' can be used to navigate among Flymake @@ -1036,7 +1039,7 @@ 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-syntax-check-on-newline (equal new-text "\n= ")) + (when (and flymake-start-on-newline (equal new-text "\n")) (flymake-log :debug "starting syntax check as new-line has been se= en") (flymake-start t)) (flymake--schedule-timer-maybe))) --=20 2.17.1 --=-=-=--