GNU bug report logs - #32350
26.1; Disabling flymake from file-local eval is buggy

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Thu, 2 Aug 2018 21:03:01 UTC

Severity: minor

Found in version 26.1

Full log


Message #11 received at 32350 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 32350 <at> debbugs.gnu.org
Subject: Re: bug#32350: 26.1; Disabling flymake from file-local eval is buggy
Date: Thu, 04 Oct 2018 16:04:16 +0100
Carlos Pita <carlosjosepita <at> gmail.com> writes:

> Just try putting this in test.el and reopening it:
>
>     ;; -*- eval: (flymake-mode -1) -*-
>
>     (1 1)
>
> Flymake will be off, it won't write anything to the modeline but the
> fringe and in-buffer underline indicators will still be there.
>
> If you eval the same expression using M-: after the buffer is loaded
> flymake mode is fully turned off as expected.

Hi Carlos,

Perhaps the best way to turn off flymake on a file-by-file basis is to
use the flymake-diagnostic-functions local variable instead, with the
added benefit that it won't be risky if you set it to a null value.

    flymake-diagnostic-functions is a variable defined in `flymake.el'.
    Its value is nil
     
      This variable may be risky if used as a file-local variable.
      This variable is safe as a file local variable if its value
      satisfies the predicate `null'.

I don't know how hard it is to make mode-specific eval's work properly
from file-local-variables but I would suspect flymake-mode isn't the
only mode affected by this.

João




This bug report was last modified 6 years and 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.