bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34294: 27.0.50; flymake-start-on-save-buffer has no effect


From: Juri Linkov
Subject: bug#34294: 27.0.50; flymake-start-on-save-buffer has no effect
Date: Sun, 03 Feb 2019 22:42:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> I have flymake-start-on-save-buffer customized to 't' to check syntax
>> only when a buffer is saved, but it still checks the unfinished work
>> while edits are in progress, showing the errors that make no sense
>> until the buffer is saved
>
> They "make sense" if you were to interpret/compile the buffer's
> contents at that moment.  It's called fly-make for a reason ;-).

I just want flymake to fly a little lower ;-)

>> , even when flymake-start-syntax-check-on-newline
>> and flymake-start-on-flymake-mode are nil.
>> Is it possible to customize flymake to kick in only on saving?
>
> You can set flymake-no-changes-timeout to nil. See its docstring.
>
> If that works, you can probably close this bug.

Thanks, I'll try to set flymake-no-changes-timeout to nil.

Meanwhile, a few additional suggestions:

1. The defcustom definition of flymake-no-changes-timeout
   currently doesn't allow customizing its value to nil,
   because it's type is only 'number.  It could provide
   an option for `nil'.

2. Naming inconsistency - there are following customizable variables:

(defcustom flymake-start-on-flymake-mode t
(defcustom flymake-start-on-save-buffer t
(defcustom flymake-start-syntax-check-on-newline t

The last is unnecessary long and could be simplified to just:

(defcustom flymake-start-on-newline t

Please compare it with another variable already renamed with:

(define-obsolete-variable-alias 'flymake-start-syntax-check-on-find-file
  'flymake-start-on-flymake-mode "26.1")

3. Maybe the documentation could be improved with the docstring of
flymake-start-on-save-buffer having a hint about disabling
flymake-no-changes-timeout?

For example, etc/TODO has such entry:

  ** 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.

4. Also I found these related entries in the same etc/TODO file:

  ** Display something in the margin on lines that have compilation errors.

  ** Allow fringe indicators to display a tooltip (provide a help-echo 
property?)

What do you think about displaying a tooltip on the fringe indicator
with the same text that is displayed on the tooltip over the location
of the error in the source buffer?  It's easier to hover on the fringe
than finding the location in the buffer to hover.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]